Qlik Community

Qlik Sense Integration, Extensions, & APIs

Discussion board where members can learn more about Integration, Extensions and API’s for Qlik Sense.

Announcements
BI & Data Trends 2021. Discover the top 10 trends emerging in today. Join us on Dec. 8th REGISTER
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Partner
Partner

Executing MasterObjectList and MasterObject via websocket

I have written a python script that connects to the websocket and pulls json representations of sheets, load scripts, bookmarks etc. in order to add apps to source control and track changes.  It turns out the one thing I am missing are Master Objects in the form of Shared Visualizations.

All of the documents I am finding show me how to get this info via the c# client, but is there a way to get this via calls to the websoket or via another web call?

Labels (3)
1 Solution

Accepted Solutions
Highlighted
Employee
Employee

You get them in pretty much the same way as you get sheets. You need to create a session object with properties that include an "AppObjectListDef" instance with type set to "masterobject":

https://help.qlik.com/en-US/sense-developer/September2020/APIs/EngineAPI/definitions-AppObjectListDe...

So call a method like this:

 

{
  "jsonrpc": "2.0",
  "id": 3,
  "method": "CreateSessionObject",
  "handle": 1,
  "params": [ { "qInfo": { "qType": "mylist" },
                "qAppObjectListDef": { "qType": "masterobject" }
              }
            ]
}

 

Then simply call "GetLayout" the handle returned by that call. The layout will now contain an instance of the following structure where each entry in the "qItems" property represents one master object:

https://help.qlik.com/en-US/sense-developer/September2020/APIs/EngineAPI/definitions-AppObjectList.h...

 

View solution in original post

1 Reply
Highlighted
Employee
Employee

You get them in pretty much the same way as you get sheets. You need to create a session object with properties that include an "AppObjectListDef" instance with type set to "masterobject":

https://help.qlik.com/en-US/sense-developer/September2020/APIs/EngineAPI/definitions-AppObjectListDe...

So call a method like this:

 

{
  "jsonrpc": "2.0",
  "id": 3,
  "method": "CreateSessionObject",
  "handle": 1,
  "params": [ { "qInfo": { "qType": "mylist" },
                "qAppObjectListDef": { "qType": "masterobject" }
              }
            ]
}

 

Then simply call "GetLayout" the handle returned by that call. The layout will now contain an instance of the following structure where each entry in the "qItems" property represents one master object:

https://help.qlik.com/en-US/sense-developer/September2020/APIs/EngineAPI/definitions-AppObjectList.h...

 

View solution in original post