Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Sivanesan
Partner - Contributor II
Partner - Contributor II

What filters are supported for GET /task endpoint?

Hi Everyone

I am doing some API integration where I want to retrieve the status of a reload task and I came across GET /task to get the results. I wanted to check how I can filter it for a particular task. The document doesn't have the supported filters. Can some one guide me on how can I get the results for a specific task and also what values are there for "status" field. 

Sivanesan_0-1714099268293.png

 

Regards

Sivanesan

Labels (3)
1 Solution

Accepted Solutions
Levi_Turner
Employee
Employee

Filters: Virtually any of the returned values (ref https://help.qlik.com/en-US/sense-developer/February2024/Subsystems/RepositoryServiceAPI/Content/Sen...). Examples:

/qrs/task?filter=name eq 'Reload Operations Monitor'
/qrs/task?filter=enabled eq true

The /full path provides a richer set of attributes to filter on moreover, I'd personally use /qrs/reloadtask/full for my filtering. Examples:

/qrs/reloadtask/full?filter=app.stream.name eq 'Monitoring Apps'
/qrs/reloadtask/full?filter=app.published eq true
/qrs/reloadtask/full?filter=operational.lastExecutionResult.status ne 0

The status value maps to the enum recorded at /qrs/about/openapi/main. From a recent version:

    "TaskExecutionStatus": {
      "type": "integer",
      "enum": [
        0,
        1,
        2,
        3,
        4,
        5,
        6,
        7,
        8,
        9,
        10,
        11,
        12,
        13,
        14
      ],
      "x-enumNames": [
        "NeverStarted",
        "Triggered",
        "Started",
        "Queued",
        "AbortInitiated",
        "Aborting",
        "Aborted",
        "FinishedSuccess",
        "FinishedFail",
        "Skipped",
        "Retry",
        "Error",
        "Reset",
        "DistributionQueue",
        "DistributionRunning"
      ]
    }

 

View solution in original post

1 Reply
Levi_Turner
Employee
Employee

Filters: Virtually any of the returned values (ref https://help.qlik.com/en-US/sense-developer/February2024/Subsystems/RepositoryServiceAPI/Content/Sen...). Examples:

/qrs/task?filter=name eq 'Reload Operations Monitor'
/qrs/task?filter=enabled eq true

The /full path provides a richer set of attributes to filter on moreover, I'd personally use /qrs/reloadtask/full for my filtering. Examples:

/qrs/reloadtask/full?filter=app.stream.name eq 'Monitoring Apps'
/qrs/reloadtask/full?filter=app.published eq true
/qrs/reloadtask/full?filter=operational.lastExecutionResult.status ne 0

The status value maps to the enum recorded at /qrs/about/openapi/main. From a recent version:

    "TaskExecutionStatus": {
      "type": "integer",
      "enum": [
        0,
        1,
        2,
        3,
        4,
        5,
        6,
        7,
        8,
        9,
        10,
        11,
        12,
        13,
        14
      ],
      "x-enumNames": [
        "NeverStarted",
        "Triggered",
        "Started",
        "Queued",
        "AbortInitiated",
        "Aborting",
        "Aborted",
        "FinishedSuccess",
        "FinishedFail",
        "Skipped",
        "Retry",
        "Error",
        "Reset",
        "DistributionQueue",
        "DistributionRunning"
      ]
    }