Skip to main content
Announcements
Global Transformation Awards submissions are open! SUBMIT YOUR STORY
cancel
Showing results for 
Search instead for 
Did you mean: 
ramnellutla
Contributor II
Contributor II

Export bookmarks to json using Qlik Sense API

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?

Labels (2)
2 Solutions

Accepted Solutions
lorenzoconforti
Specialist II
Specialist II

You need to use the GetBookmark method

 

{
"handle": 1,
"method": "GetBookmark",
"params": {
"qId": ""
}
}

View solution in original post

ramnellutla
Contributor II
Contributor II
Author

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. 

View solution in original post

2 Replies
lorenzoconforti
Specialist II
Specialist II

You need to use the GetBookmark method

 

{
"handle": 1,
"method": "GetBookmark",
"params": {
"qId": ""
}
}

ramnellutla
Contributor II
Contributor II
Author

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.