Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
We were able to export the sheets in to JSON using Qlik API by creating a session object using CreateSessionObject method, getting the layout for that session using the GetLayout method. And later, we were fetching the qid of each sheet from the obtained layouts and call GetObject method to fetch the handle of the sheet. And then we call GetFullPropertyTree for that handle to extract the json from it.
This is how the result of the GetObject looked like for the sheets:
{'id': 21, 'jsonrpc': '2.0', 'result': {'qReturn': {'qGenericId': '9963e417-d84d-4ce8-8ca1-d33f5a74bb4c', 'qGenericType': 'sheet', 'qHandle': 10, 'qType': 'GenericObject'}}}
However, upon trying the same for the bookmarks, the GetObject method using the bookmark's qid returns handle as none.
{'id': 25, 'jsonrpc': '2.0', 'result': {'qReturn': {'qHandle': None, 'qType': None}}}
Any help on what could cause this is really appreciated. Also, is there any other way to get bookmarks as JSON using the Qlik Sense APIs?
You need to use the GetBookmark method
{
"handle": 1,
"method": "GetBookmark",
"params": {
"qId": ""
}
}
I was able to get the handle of the bookmark using 'GetBookmark' method but passing it to 'GetFullPropertyTree' method did not fetch details about the bookmark. So, I ended up using much simpler approach by calling 'GetBookmarks' method.
You need to use the GetBookmark method
{
"handle": 1,
"method": "GetBookmark",
"params": {
"qId": ""
}
}
I was able to get the handle of the bookmark using 'GetBookmark' method but passing it to 'GetFullPropertyTree' method did not fetch details about the bookmark. So, I ended up using much simpler approach by calling 'GetBookmarks' method.