Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Task Status

Hi

we would like to monitor the Qliksense Task Status from Third party tool. Kindly let us know how to check the Task Status.

1. PostgresQL Query

2. API

Regards

Arul

2 Replies
Levi_Turner
Employee
Employee

GET /qrs/reloadtask/{TASK_ID}

Example response:

{

  "id": "f1915a03-936f-41dd-8e85-24cb447fec00",

  "createdDate": "2017-10-17T15:36:03.014Z",

  "modifiedDate": "2017-10-30T11:33:47.402Z",

  "modifiedByUserName": "DOMAIN\\USERID",

  "customProperties": [],

  "app": {

    "id": "12f964b0-fc25-4de6-9803-30749b21d192",

    "name": "APPNAME",

    "appId": "",

    "publishTime": "2018-04-20T22:22:39.021Z",

    "published": true,

    "stream": {

      "id": "aaec8d41-5201-43ab-809f-3063750dfafd",

      "name": "STREAMNAME",

      "privileges": null

    },

    "savedInProductVersion": "12.108.6",

    "migrationHash": "98d482c3f964dccf69cbfb9a00e0c048ea6eb221",

    "availabilityStatus": 0,

    "privileges": null

  },

  "isManuallyTriggered": false,

  "operational": {

    "id": "e0a3a7e9-623b-4c45-9339-d68e02147b54",

    "lastExecutionResult": {

      "id": "53cf668e-6ea3-43cb-8199-e3aae1b80612",

      "executingNodeName": "SERVERNAME.COMANY.COM",

      "status": 2,

      "startTime": "2018-05-14T14:05:29.136Z",

      "stopTime": "1753-01-01T00:00:00Z",

      "duration": 0,

      "fileReferenceID": "00000000-0000-0000-0000-000000000000",

      "scriptLogAvailable": false,

      "details": [

        {

          "id": "585ec833-6be4-4c02-b6dc-5dd9926fd613",

          "detailsType": 2,

          "message": "Trying to start task. Sending task to slave scheduler SERVERNAME.COMPANY.COM",

          "detailCreatedDate": "2018-05-14T14:05:29.351Z",

          "privileges": null

        },

        {

          "id": "ccac7ea5-3842-439e-ba0f-05c8f1fbc7e7",

          "detailsType": 2,

          "message": "Changing task state to Triggered",

          "detailCreatedDate": "2018-05-14T14:05:29.137Z",

          "privileges": null

        },

        {

          "id": "f58eb4a0-cd1f-40e9-b823-93f787c333e3",

          "detailsType": 2,

          "message": "Changing task state from Triggered to Started",

          "detailCreatedDate": "2018-05-14T14:05:29.49Z",

          "privileges": null

        }

      ],

      "privileges": null

    },

    "nextExecution": "2018-05-14T14:20:59Z",

    "privileges": null

  },

  "name": "TASKNAME",

  "taskType": 0,

  "enabled": true,

  "taskSessionTimeout": 1440,

  "maxRetries": 0,

  "tags": [],

  "privileges": null,

  "schemaPath": "ReloadTask"

}

From GET /qrs/about/api/enums we can see the translation of the detailsType to a semantic status:

"StatusEnum": {

    "values": [

      "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"

    ],

    "usages": [

      "ExecutionResult.Status"

    ]

Hope that helps.

Anonymous
Not applicable
Author

Hi Turner,

Thanks for your reply. Also i got the result from my postgresql.

Select * from public."ExecutionResults"

where "ExecutionResults"."TaskID"='32781ecd-824f-4fe8-b4f2-f2c3ff18dce9'

  order by "ExecutionResults"."StopTime" desc

limit 1