Skip to main content
Announcements
Qlik Connect 2025: 3 days of full immersion in data, analytics, and AI. May 13-15 | Orlando, FL: Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
dgonzalez1
Partner - Contributor
Partner - Contributor

Retrieve the Reload Task Id that triggered the Application reload via QRS.

We have one application that is loading data from multiple databases. We set custom properties on the reload tasks to indicate the location of the database and the environment. We need to determine which reload task is running so that we can control the access to the appropriate databases. 

Example:

We have one Qlik Sense App 'Extract App' in the 'Dev Stream'.

We have 3 scheduled Tasks each triggering the same 'Extract App' at different times. Each task has a custom property 'Customer Name'. The Task configuration looks like this:

Task 1:  Execute daily @12pm / Customer Name = 'Customer1' / Trigger App 'Extract App'

Task 2:  Execute daily @1pm / Customer Name = 'Customer2' / Trigger App 'Extract App'

Task 3:  Execute daily @2pm / Customer Name = 'Customer3' / Trigger App 'Extract App'

When 'Extract App' is running, how can I determine which Task triggered the reload?

Can anyone help us get this information via the QRS API?

Labels (1)
  • API

1 Reply
Marc
Employee
Employee

Something like this will return the "running" task associated with the App you are reloading.

you will need the ReloadTask/Full api.  /qrs/reloadtask/full

called with a filter for the App and Operational Status 

filter=App.id eq <YourAppID> and operational.lastexecutionresult.status eq Running

https://<server>/qrs/reloadtask/full?filter=App.id%20eq%<AppID>%20and%20operational.lastexecutionres...

e.g.

https://senseserver.domain.local/qrs/reloadtask/full?filter=App.id%20eq%00000000-0000-0000-0000-0000...

if you are calling this from within the Load Script of the running App, you can use the System Function DocumentName() to dynamically get the AppID.

 

NB: If you are reloading from the Data Load editor you may need to handle a empty response