1 Reply Latest reply: Feb 20, 2018 4:55 AM by ahmad badi RSS

    How to pass parameters to the Rest API Get Method in Qlik Sense

    Murali Krishna

      Hi Team,

       

      Can you please let me know how to pass parameters to the Rest Connetor API Get Method in Qlik Sense. When I try to give param at Query Parameter in Rest Connector It says Request "Remote Server Returned an Error : (404) not found".

       

      Also Please let me know how to pass parameters Dynamically.

       

      Thanks,

      Murali

        • Re: How to pass parameters to the Rest API Get Method in Qlik Sense
          ahmad badi

          Good evening,

          Actually i am looking for this answer as well. This question has been posted since last year !!!!!! how come no one able to answer?

          I have written python script to get single object chart, and i am seeking for guide to know what are the parameters i need to pass??????????? please help me and my above friend.

           

          import requests

          import base64

          from json import dumps

          from pprint import pprint



          def connect_to_qlik_server():

              '''connect to qlik sense environment'''

             

              url = "http://localhost:4848/single/?appid=C%3A%5CUsers%5Cuser%5CDocuments%5CQlik%5CSense%5CApps%5CConsumer%20Sales.qvf&obj=akDGX&opt=nointeraction&select=clearall"

              #if url.status_code !=200:

               #   raise ApiError('GET/chart/ {}'.format(url.status_code))

              #else:

              data = dumps({

                    "jsonrpc": "2.0",

                    "id": 6,

                    "method": "DestroyChild",

                    "handle": 2,

                    "params": {

                      "qId": "LB02"

                      }

                    })

              #headers = {'User-Agent': 'User-Agent:Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.132 Safari/537.36'}

              headers = {'content-type':'application/json'}

              result = requests.get(url,data,headers=headers)


              print (result.content.decode())

                  #qlikJson = base64.b64decode(response)

           

          if __name__ == '__main__':

              connect_to_qlik_server()