Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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?
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":
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:
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":
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: