Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
generalfinance
Contributor III
Contributor III

00024962: QRS API

Hi Joseph,

Excuse me if to write again, but now that I understand how it work postman, I'd like extract all task in failed.
I see that you can filter by state in this case I am interested at the status Failed which corresponds to number 8, but at the same time I would like to filter by task and have the task id with description.
What kind of get or post should I do?
I found this guide
https://help.qlik.com/en-US/sense-developer/November2021/APIs/RepositoryServiceAPI/index.html?page=1...

Thank you for support

Labels (1)
  • API

1 Solution

Accepted Solutions
Øystein_Kolsrud
Employee
Employee

The endpoint you are pointing to is probably what you want. If you only want the tasks that have latest execution result "Finished Failed", then you should filter that endpoint on that. Like this:

GET /qrs/reloadtask?filter=operational.lastExecutionResult.status eq 8

The full list of enumeration values to use for that status property can be found here:

https://help.qlik.com/en-US/sense-developer/February2022/APIs/RepositoryServiceAPI/index.html?page=1...

View solution in original post

11 Replies
Øystein_Kolsrud
Employee
Employee

The endpoint you are pointing to is probably what you want. If you only want the tasks that have latest execution result "Finished Failed", then you should filter that endpoint on that. Like this:

GET /qrs/reloadtask?filter=operational.lastExecutionResult.status eq 8

The full list of enumeration values to use for that status property can be found here:

https://help.qlik.com/en-US/sense-developer/February2022/APIs/RepositoryServiceAPI/index.html?page=1...

generalfinance
Contributor III
Contributor III
Author

Thanks so much for the support, that was just what I was interested in getting.

Have a nice day

Marco

generalfinance
Contributor III
Contributor III
Author

Hi Joseph,

With postman I get the response correct in format json, but I would like get the same thing with monitoring system PRTG Passler, but I have this error, you have idea if is possible do or if someone has already done so?

A thousand thanks.

generalfinance_0-1646325087304.png

 

generalfinance
Contributor III
Contributor III
Author

Hi, thanks for support, if you a wanted a check a specific task in this case i know the id for example bdcc21ec-265e-4e6c-9883-c60443fb4f22, How can i do?
I tried with this string but it doesn't work

GET 7qrs/reloadtask/"bdcc21ec-265e-4e6c-9883-c60443fb4f22"?filter=operational.lastExecutionResult.status eq 8&Xrfkey=***************

Another question, is there another way to get without postman but using a browser?

Thank you.

Øystein_Kolsrud
Employee
Employee

You can call GET requests by just typing the endpoint in the browser, but you'll need to add a xrfkey. The same value needs to be provided both in a header and as part of the URL:

https://help.qlik.com/en-US/sense-developer/February2022/Subsystems/RepositoryServiceAPI/Content/Sen...

So if you are already logged in (just go to the hub or qmc) and add the header "X-Qlik-Xrfkey" with value "0123456789abcdef", then you can call endpoints like this:

https://<server>/qrs/about?xrfkey=0123456789abcdef

 You'll probably need some plugin to set the header though. Here's an example:

https://chrome.google.com/webstore/detail/modheader/idgpnmonknjnojddfkpgkljpfnnfcklj

But this approach only allow you to call GET endpoints.

generalfinance
Contributor III
Contributor III
Author

HI,

I was able to test the same call with the browser and with ModHeader, but in this case I'm doing filtering all the tasks that are in fail, if I just wanted to filter a specific task what is the correct syntax?
Another thing I didn't understand every task must have its own X-Qlik-Xrfkey? If so, how can I recover it?

https://server:4242/qrs/reloadtask?filter=operational.lastExecutionResult.status%20eq%208&Xrfkey=012...

Thanks for the support.

 

 

Øystein_Kolsrud
Employee
Employee

Filtering on id is the typical thing to do if you want a specific task. Something like this:

 

GET /qrs/reloadtask?filter=id eq <id>

 

Or simply like this:

 

GET /qrs/reloadtask/<id>

 

generalfinance
Contributor III
Contributor III
Author

Hi,

I built the get as follows:

https: //server: 4242 /qrs /reloadtask / "bdcc21ec-265e-4e6c-9883-c60443fb4f22 & Xrfkey" = 012345789abbcdef

but I get 

XSRF prevention check failed. Possible XSRF discovered.
 
Could it be that by directly calling a specific id, the correct Xrfkey must be found?
 
Thank you
 
 
 

 

Øystein_Kolsrud
Employee
Employee

You shouldn't have the quotes in the url. It should look like this:

https://server: 4242/qrs/reloadtask/bdcc21ec-265e-4e6c-9883-c60443fb4f22?Xrfkey=012345789abbcdef