Skip to main content
Announcements
Qlik Introduces a New Era of Visualization! READ ALL ABOUT IT
cancel
Showing results for 
Search instead for 
Did you mean: 
johnmorgan
Partner - Contributor III
Partner - Contributor III

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
Øystein_Kolsrud
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
Øystein_Kolsrud
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...