Qlik Community

Qlik Sense App Development

Discussion board where members can learn more about Qlik Sense App Development and Usage.

cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Creator
Creator

Open an App by connecting to Qlik Sense Engine API using python

Hi All,

I am able to connect to Qlik Sense Desktop Engine API using this below python script :

from websocket import create_connection

import json

ws = create_connection("ws://localhost:4848/app/")

data=json.dumps({

'jsonrpc': '2.0',

'id': 2,

'method': 'DoReload',

'handle': 1,

'params': ['C:\\Users\\sbhowmik\\Documents\\Qlik\\Sense\\Apps\\Test.qvf']

}

# sort_keys=True,

#indent=4,

#separators=(',', ': ')
)

print("Sending req...")

ws.send(data)

print("Sent")

print("Receiving...")

result = ws.recv()

print("Received '%s'" % result)

qclosed = ws.close()
print("Closed '%s'" % qclosed)

 

The message I get in return from engine is as below :

{"jsonrpc":"2.0","method":"OnConnected","params":{"qSessionState":"SESSION_CREATED"}}

>> Problem Statement : But, the app Test.qvf does not open up AND also, I do not get any QReturn message from the Engine API . I maybe doing something wrong here. Please help.

2 Replies
Highlighted
Creator
Creator

Re: Open an App by connecting to Qlik Sense Engine API using python

Hello,

Can anyone help me on this as this is quiet urgent.

 

Regards,

Sanchayan Bhowmik

Highlighted
Creator
Creator

Re: Open an App by connecting to Qlik Sense Engine API using python

Hi,

Continuously  receiving this Invalid Params message when connecting with Desktop engine API, even though after successful connection with API. Please look innto this :

'{"jsonrpc":"2.0","method":"OnConnected","params":{"qSessionState":"SESSION_CREATED"}}'

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

 

 

Regards,

Sanchayan Bhowmik