Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello Qlik Community,
I am exploring the possibility of creating a data connection in Qlik SaaS that can access itself using the REST API to extract data from a table or visualization in the frontend. Specifically, I want to set up a REST connection that pulls data from a table (or hypercube) already present in the app, using Qlik's own API.
So far I have found these useful sources, specifically for Qlik Saas:
https://github.com/kolsrud/qlik_rest_sdk
https://qlik.dev/apis/rest/reports/
Has anyone successfully set up a REST connection to the Qlik SaaS frontend? If so, what are the necessary steps for authentication (using an API token or OAuth), and how do I correctly configure the REST connection to pull data from specific objects, such as table?
I have already tried doing this by creating an automation, but unfortunately there is a cap of 100.000 rows. (Get straight table from frontend)
I am looking for guidance on:
1. How to pass the correct authentication headers and body parameters?
2. Any limitations or considerations regarding API quotas and performance when using the API in this way.
Any insights, sample code, or Qlik template app would be greatly appreciated!
Thank you in advance for your help!
Are you saying that you in one and the same app want the load script to open a connection to the app's frontend charts/tables/whatever and retrive data from frontend during reload of the app?
Hopefully I have misunderstood, but if that actually is what you're saying: it's not possible.
During reload, all data is emptied from the app (well, unless you're doing a partial reload), so there's no data available in frontend or in any end until the reload is finished.
Thank you so much for responding, would it still be technically possible to split this into two separate apps?
Essentially, I am looking for a way to extract data (that has been through set analysis calculations) from the frontend and store it on a server, such as Sharepoint of SFTP.
I have noticed for example that there is a page on the Qlik dev website about temporary contents, these POST/GET API's are being called while trying to manually download a table from the frontend into Excel using the 'Download' button from the left mouse button menu.
https://qlik.dev/apis/rest/temp-contents/#post-v1-temp-contents-files
I can't say for sure that it wouldn't be possible to find such a solution. But I am sure that I would have tried to solve this issue in load script. Are you absolutely sure that you need set analysis to make the calculations you want? I'm thinking it should be possible to write something in your load script that achieves what you want. I'm thinking that there's probably nothing you can do in set analysis that you couldn't achieve in load script instead.
There are situations where you want calculations only in front end, and therefore you use set analysis. But in your case you want to use the calculation result in the backend/data model/script, and then you should do those calculations in backend. I strongly believe that you are trying to go down an unnecessary and complicated path. But of course, I don't have the whole picture here.
I'm trying to do this to. My goal has been to get a list of applications and the streams they are in for our entire portal using an API end point like so. It would be nice to create an application with data on our applications.
https://<ourtenant>.us.qlikcloud.com/api/v1/apps
I managed to extract the data from the frontend due to an automation, splitting and looping up the table so it will always stay within the 100K rows limit. Save the data files on an external server such as SFTP, load all the data using the data filenames with a wildcard and save the data to the desired file storage.
So:
Loop and split the table in multiple different CSV files with a loop under 100K -> Concatenate all the different files with a new app and qlik script and save them on a different fileserver.
Unfortunately the API way was not an solution.
Hi @Enphad,
At IPC Global we developed a Server Side Extension that exposes Qlik Sense Chart Data through a REST API Endpoint, so other applications and platforms that supports REST APIs can consume data from Qlik Sense Applications - we call it inProcess Data Extractor.
With that said, look for Enigma.js - https://qlik.dev/toolkits/enigma-js/. This is the framework that will allow you to get data from Qlik charts.
Regards,
Mark Costa
Read more at Data Voyagers - datavoyagers.net
Follow me on my LinkedIn | Know IPC Global at ipc-global.com
Hi Mark,
Thank you for letting me know, but does the enigma devkit also work for Qlik Cloud?
I know for example that there is one API, that contains the function to extract data from a frontend table for Qlik Sense on premise. But the same API is not compatible with Qlik Cloud.
Yes. it is compatible with Qlik Cloud.
Read more at Data Voyagers - datavoyagers.net
Follow me on my LinkedIn | Know IPC Global at ipc-global.com