Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Apr 25, 2023 4:50:07 AM
Jun 9, 2020 6:00:53 PM
This is a sample to create a task triggered after another one with Qlik Sense Repository API.
This example is provided as is. Further questions should be directed to the Qlik Sense API and Integration forums
$body = '{ "task": {"app": { "id": "7c72cb1c-63de-4246-9e3b-55de2202f0bb" }, "name": "My New Task" }, "compositeEvents": [ { "timeConstraint":{ "days":0, "hours":0, "minutes":360, "seconds":0 }, "compositeRules":[ { "reloadTask":{ "id": "da5da832-82cc-4e09-bf6d-adb2f75c797c" }, "ruleState":1 } ], "name":"Trigger (successful) from depending Task", "enabled": true, "eventType": 1 }] }' $hdrs = @{} $hdrs.Add("X-Qlik-xrfkey","iX83QmNlvu87yyAB") $hdrs.Add("X-Qlik-User","UserDirectory=internal;UserId=sa_repository") $url = "https://qlikserver1.domain.local:4242/qrs/ReloadTask/create?xrfkey=iX83QmNlvu87yyAB" $cert = Get-ChildItem -Path "Cert:\CurrentUser\My" | Where {$_.Subject -like '*QlikClient*'} Invoke-RestMethod -Uri $url -Method Post -Body $body -ContentType 'application/json' -Headers $hdrs -Certificate $cert
In the above sample, 7c72cb1c-63de-4246-9e3b-55de2202f0bb is the app ID of the app to reload, and da5da832-82cc-4e09-bf6d-adb2f75c797c is the task ID after which this reload task will be triggered.
Thanks, just want I need it. !
Does it worked?
Hello @sai_09
We can confirm that the methods in this article are still valid.
If you require assistance implementing the example, I recommend posting in our Qlik Sense API and Integration forums.
All the best,
Sonja