14 Replies Latest reply: Aug 24, 2017 11:24 AM by David Pastrana RSS

    Qlik Engine API Does Not Work after June 2017 update

    Cristian Hainic

      Hi,

       

      With the June 2017 upgrade of the Qlik server, most of the Qlik Engine API calls fail now (GetConnections, SetScript, GetScript, etc.). Did anyone experience this issue?

       

      I tested the Engine API in the Engine API Explorer in the Dev Hub and the calls work there. But, using the exact same parameters through a websocket connection, the Engine API returns {'code': -32602, 'parameter': 'Invalid handle', 'message': 'Invalid Params'}

       

      The handle and parameters I send are exactly the ones in the Engine API Explorer. Can anyone relate to this issue?

       

      Thanks,

       

      Chris

        • Re: Qlik Engine API Does Not Work after June 2017 update
          Øystein Kolsrud

          You'll probably need to add the method calls you use. Can you attach an example? From the "invalid handle" string, I would suspect that there is something fishy with how you use the handle. How do you get hold of the handle and how do you use it?

            • Re: Qlik Engine API Does Not Work after June 2017 update
              Cristian Hainic

              Hi Øystein,

               

              Sure, below flow in the client I've implemented. Everything is pretty much hardcoded, so I really can't see what is the matter.

               

              First, I open an app by sending this:

               

              data = {

                 "jsonrpc": "2.0",
                 "id": 2,
                 "method": "OpenDoc",
                 "handle": -1,
                 "params": [

                   {"qDocName": "293dght3-cd32-40ff-99afF-380e46c384a3"}

                   ],
              }

               

              The server responds:

              {

                   'jsonrpc': '2.0',

                   'id': 2,

                    'result': {

                        'qReturn': {

                             'qType': 'Doc',

                              'qHandle': 1,

                              'qGenericId': '293Dght3-CD32-40FF-99AF-380E46C384A3'

                   }}, 'change': [1]

              }

               

              Then, I send through the websocket connection a method such as GetConnections(), formatted as this:

               

              data = {

                   "jsonrpc": "2.0",
                   "id": 2,
                   "method": "GetConnections",
                   "handle": 1,
                   "params": [],

              }

               

              To which the server responds with an error containing the line I pasted in my question:

               

              {'jsonrpc': '2.0', 'id': 2, 'error': {'code': -32602, 'parameter': 'Invalid handle', 'message': 'Invalid Params'}}

               

              Please reply should you need any additional info on this. My initial thought was that something had changed along with the June 2017 update, because this worked perfectly (I actually got all the connections with the GetConnections() method) before updating the Qlik server.

               

              Thank you,

               

              Chris