Skip to main content

Suggest an Idea

Vote for your favorite Qlik product ideas and add your own suggestions.

Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE

Qlik Sense Application Variable access through QRS Api (for script)

simonaubert
Partner - Specialist II
Partner - Specialist II

Qlik Sense Application Variable access through QRS Api (for script)

Hello all,

As of today, we use some QRS Api for monitoring but also for chaining task, launching task,etc.

There is a cool documentation here : https://help.qlik.com/en-US/sense-developer/February2021/APIs/RepositoryServiceAPI/index.html?page=0

One of my need, however, is not covered : how to get  the variable and the variable values in an application ? The minimum would be the script variables .

 

A use case : we set the version of our application in variable. But sometimes, the developer forget to change it... or the delivery takes the bad version. So I want to check if the version corresponds with our versioning system.


image.png
Best regards,

Simon

Bi Consultant (Dataviz & Dataprep) @ Business & Decision
8 Comments
Meghann_MacDonald

My favorite meme yet...

Nathan1
Contributor III
Contributor III

I'm not a Qlik employee and I may be missing the point of what you want, but I believe the issue here would be that variables aren't stored in the repository and so you can't fetch them with the QRS API (I haven't traipsed through the repository in quite some time, so I may be wrong here)? 

What you can do though is fetch variables using the Qlik Engine API.   I've pasted an image below of a variable I've grabbed from one of my apps using the Engine API explorer.  Docs for the Engine API can be found here:  https://help.qlik.com/en-US/sense-developer/February2021/Subsystems/EngineAPI/Content/Sense_EngineAP...

sense_engine_api.png

simonaubert
Partner - Specialist II
Partner - Specialist II

@Meghann_MacDonaldThanks, it is an original content.

simonaubert
Partner - Specialist II
Partner - Specialist II

Hello @Nathan1 

Thanks but yes, I know that, I have also found a mashup extension that gives the variable once you select an app. But I try to get it in script and all I know to query in script is the QRS API.

Best regards,

Simon

Nathan1
Contributor III
Contributor III

Ok cool.  No problem.  I think the fundamental issue here may be that the QRS API is just an interface to the PostGres repository and the repository doesn't actually contain that info (i.e. all the sheets including user-generated ones as well as variables and script and everything sits in the app itself).

I've previously done connections to the Engine  API using Python and PHP.  It's unfortunately not possible to do from the Qliksense load script (because of websockets stuff).  If you're interested though, I'm sure I could put something together in Python or maybe even Powershell that you can use to fetch variables out if that'd be suitable for your needs?

simonaubert
Partner - Specialist II
Partner - Specialist II

Hello @Nathan1 


Very nice proposition and I would be tempted to say yes. But to be honest, I really need in script, because I plan join it/control it wih some business logic.

"the repository doesn't actually contain that info (i.e. all the sheets including user-generated ones as well as variables and script and everything sits in the app itself)"

But there is already an endpoint to retrieve the app objects like sheeets, master item, etc.. so I guess Qlik does not have a huge effort to put also the variables.

Best regards,

Simon

Meghann_MacDonald

From now on, please track this idea from the Ideation portal. 

Link to new idea

Meghann

NOTE: Upon clicking this link 2 tabs may open - please feel free to close the one with a login page. If you only see 1 tab with the login page, please try clicking this link first: Authenticate me! then try the link above again. Ensure pop-up blocker is off.

Ideation
Explorer II
Explorer II
 
Status changed to: Closed - Archived