Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Everyone knows the feature of creating a snapshot of an App visualization while making analyses. It remembers the data and the selection of the point when the snapshot was taken.
The question is, how would you programmically create such a snapshot?
I looked into the Chrome Devleopment tool's network protocoll under websockets / frames.
I found out that creating a snapshot in the client is done via CreateBookmark method (surprised that there is no CreateSnapshot method). I tried for a while to manually add obviously necessary keys in the Json struc (the orange marked properties), but there are hundreds more (e.g. storing the hypercube data in the object). I found nothing in the Qlik Sense Developer Help, so can somebody explain?
{
"handle": 1,
"method": "CreateBookmark",
"params": {
"qProp": {
"qInfo": {
"qId": "",
"qType": "snapshot"
},
"timestamp":"1474378569045",
"qMetaDef": {},
"sheetId":"kaPTZ",
"sourceObjectId": "ZPhfBpP",
"visualization":"kpi",
"visualizationType":"kpi"
}
}
}
What are the necessary steps to create an object snapshot?
Thanks
The Engine has no concept of "snapshots" since that is a client construct. You would create bookmarks (which the Engine does understands) and then you add multiple full-dynamic properties that the client expects to be able to render the snapshot properly in the client.
We currently don't publish our internal object model so your best bet is to inspect the traffic that goes back and forth and emulate it but simply you would take the model of the object your are "snapshotting" and add it to the generic bookmark in addition to some snapshot properties.
The Engine has no concept of "snapshots" since that is a client construct. You would create bookmarks (which the Engine does understands) and then you add multiple full-dynamic properties that the client expects to be able to render the snapshot properly in the client.
We currently don't publish our internal object model so your best bet is to inspect the traffic that goes back and forth and emulate it but simply you would take the model of the object your are "snapshotting" and add it to the generic bookmark in addition to some snapshot properties.