Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi i was trying to connect qlik engine API using python
How to connect python to Qlik sense server with certificates authentication?
I can connect to qlik successfully. and i tired to get the list of apps available in qlik server
{'params': [], 'handle': -1, 'name': 'GETAPPLIST', 'method': 'GetDocList'}
it gives the list of apps. after that i was trying to open or connect to the app using below json
{
"method": "OpenDoc",
"handle": -1,
"params": [
"714aad39-e1a2-485b-82c2-6150c681ef4e"
]
}
it throws error like
{"jsonrpc":"2.0","id":0,"error":{"code":1003,"parameter":"Could not find app","message":"App not found"}}
when i doing same in Engine Explorer it was opening the app. but through above code its not working
Can some one help here to solve the issue
Thanks
Hi,
I don't really know much about Python, but generally you should open a new socket when you open an app, so not try to call OpenDoc on an already existing socket. Not sure that is the problem in your case, though.
Erik Wetterberg
in that case i tried open this in new socket but same error
{
"method": "OpenDoc",
"handle": -1,
"params": [
"714aad39-e1a2-485b-82c2-6150c681ef4e"
]
}
HI,
You are supposed to include an id and the jsonrpc version too, but if that's the problem it's a very strange error message.
Erik Wetterberg
Erik
Added the lines in json still same error
"jsonrpc": "2.0",
"id": 0,
i believe something else i am missing
Thanks
The id should be a unique identifier for each message, so 1,2,3 etc.. It's what you use to tell which reply belongs to which request.
Erik Wetterberg
Changed the ID also
<websocket._core.WebSocket object at 0x00000000036937F0>
{"jsonrpc":"2.0","method":"OnConnected","params":{"qSessionState":"SESSION_ATTACHED"}}
{"jsonrpc":"2.0","id":1,"error":{"code":1003,"parameter":"Could not find app","message":"App not found"}}
SESSION_ATTACHED seems strange, means it's attaching to an already existing session, is that what you expected??
Erik Wetterberg
it is websocket session. i just printed to confirm the connection
Hi akl can you help here