Skip to main content
Announcements
Live today at 11 AM ET. Get your questions about Qlik Connect answered, or just listen in. SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
ChristofSchwarz
Partner Ambassador
Partner Ambassador

Qlik Sense Engine API: How to create a Snapshot of an object?

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.

Screenshot 2016-09-20 15.56.16.png

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


1 Solution

Accepted Solutions
Alexander_Thor
Employee
Employee

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.

View solution in original post

1 Reply
Alexander_Thor
Employee
Employee

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.