Skip to main content

Postman: Get task status with QRS API

No ratings
cancel
Showing results for 
Search instead for 
Did you mean: 
Damien_Villaret
Support
Support

Postman: Get task status with QRS API

Last Update:

May 5, 2021 10:15:21 AM

Updated By:

Andre_Sostizzo

Created date:

Jul 24, 2017 7:47:08 AM


This article describes how to use Postman to fetch task status as a table using the QRS API.

This is a simple way to fetch the task statuses as a table. There are also other ways to fetch task status as using the session ID together with /qrs/executionsession/ like described via link below:
Task: Start - Qlik Sense for Developers


For information on how to use Postman with Qlik APIs, refer to:
QRS API using Xrfkey header in Postman Chrome Extension

 

Environment:

Qlik Sense Enterprise on Windows 

 

Resolution:

Example: 

POST https://qlikserver1.domain.local/qrs/Task/table?orderAscending=true&skip=0&sortColumn=name&take=200&xrfkey=LrVKbOV7HAVjFMTF 

Request headers:
X-Qlik-xrfkey: LrVKbOV7HAVjFMTF

Request Body:
{"entity":"Task","columns":[{"name":"id","columnType":"Property","definition":"id"},{"name":"status","columnType":"Property","definition":"operational.lastExecutionResult.status"}]}


A response formatted like below should be returned:

{
    "id": "5caf7b71-d289-49eb-8e7f-2954f38e6eda",
    "columnNames": [
        "id",
        "status"
    ],
    "rows": [
        [
            "33f925cc-b872-4191-91b8-4878999ec2ff",
            7
        ],
        [
            "0a3dad33-cee2-4f29-affc-f320261f5104",
            7
        ],
        [
            "27137126-538b-4a4d-b68d-bcd76917dfeb",
            2
        ]
    ],
    "schemaPath": "Table"
}


Postman_37166.png

 

Possible values for "status" are:

"0: NeverStarted",
"1: Triggered",
"2: Started",
"3: Queued",
"4: AbortInitiated",
"5: Aborting",
"6: Aborted",
"7: FinishedSuccess",
"8: FinishedFail",
"9: Skipped",
"10: Retry",
"11: Error",
"12: Reset"

Labels (1)
Comments
generalfinance
Contributor III
Contributor III

HI Damien,

Have you already tried other tools besides postman to query qlik tasks?
I ask you why I would need to have our PRTG monitoring system talk to Qlik, but I have no way to pass them the two keys like I do as postman.

Cannot load endpoint https: // qlikserver: 4242 / qrs / reloadtask / bdcc21ec-265e-4e6c-9883-c60443fb4f22? Xrfkey = cWbA392PyaYQ2U0K: expected status 200 OK but got 403 No client certificate supplied.


Your every suggestion is appreciated.

A thousand thanks

 

certfile.jpg

Contributors
Version history
Last update:
‎2021-05-05 10:15 AM
Updated by: