Qlik Community

Qlik Sense Integration, Extensions, & APIs

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

anders_uddenber
New Contributor III

Generate snapshot image programmatically

I'm trying to generate a snapshot programmatically, just like Qlik Sense is doing when I right click and select "Export as image".

What I've found is that I need to send a request to: 'http://localhost:9902/printing/export/object/image?requestId=92796cf5-2d7f-4a07-973d-2c843fc21a2a' using jQuery.

Data neccessary with this request is:

data: JSON.stringify({"imageType" : "Png", "captureSize":{"width":482,"height":472,"dpi":92}, "objTree": {"id":"fzrxtjq","type":"scatterplot","area":{"left":0,"top":0,"width":1,"height":1}, "children":[],"isExtension":false,"snapshotData":"N4IgJghklajsdkjsdkjsd.............."}}),

There is an id in there (fzrxtjq) but what I have two questions

Question 1:

How do I generate or get a requestId (eg 92796cf5-2d7f-4a07-973d-2c843fc21a2a)

Question 2:

the snapshotData looks like it's a base64 encoded string but it's not. How do I generate this string?

Community Browser