Skip to content

Get Poll Data for All Tasks

Endpoint: GET /api/tasks/queue/polldata/all

Gets the last poll data for all the tasks in the Conductor task queue. The filter parameters can be used to refine the request based on your requirements. Multiple filters are applied with AND logic and can be combined (worker + queue + lastPoll).

Query parameters

Parameter Description Type Required/ Optional
workerSize The number of worker instances polling for all the tasks in the queue. integer Optional.
workerOpt Option to filter based on the worker size. Supported values:
  • GT (Greater than)
  • LT (Less than)
string Required if workerSize is used.
queueSize The total number of tasks in the queue waiting to be executed. integer Optional.
queueOpt Option to filter based on the queue size. Supported values:
  • GT (Greater than)
  • LT (Less than)
string Required if queueSize is used.
lastPollTimeSize The last polled time in Unix timestamp format. integer Optional.
lastPollTimeOpt Option to filter based on the last poll time. Supported values:
  • GT (Greater than)
  • LT (Less than)
string Required if lastPollTimeSize is used.

Response

Returns a map containing queueData and an array of pollData.

  • queueData: Indicates the size and poll count of each task.
  • pollData: Includes the queueName, workerId, and lastPollTime for each task.
  • queueName: The name of the task queue. For predefined tasks, this returns the task type, such as HTTP. For user-defined tasks, it returns the task definition name, such as python_worker.
  • workerId: The worker name from which the task is being polled, which is the hostname of the pod where the worker is running.
  • lastPollTime: The last polled time in Unix timestamp format.

If a worker has not picked up the task, no pollData will be available, and the array will be empty.

Examples

Get the last poll data for tasks with a queue size greater than 7

Request

curl -X 'GET' \
  'https://<YOUR-SERVER-URL>/api/tasks/queue/polldata/all?queueSize=7&queueOpt=GT' \
  -H 'accept: */*' \
  -H 'X-Authorization: <TOKEN>'

Response

{
  "queueData": {
    "_deciderQueue": {
      "size": 31
    },
    "WAIT": {
      "pollerCount": 1,
      "size": 18
    },
    "_batch_upload_queue0": {
      "size": 15
    }
  },
  "pollData": [
    {
      "queueName": "WAIT",
      "workerId": "acme-workers-deployment-5cf6957cdf-rn2pd",
      "lastPollTime": 1735561620048
    }
  ]
}

Here, pollData is available only for the WAIT task, as it is the only one the worker has picked up, while the rest of the tasks are in the queue awaiting workers.

Get the last poll data for tasks with a worker size greater than 1 and a queue size greater than 10

Request

curl -X 'GET' \
  'https://<YOUR-SERVER-URL>/api/tasks/queue/polldata/all?workerSize=1&workerOpt=GT&queueSize=10&queueOpt=GT' \
  -H 'accept: */*' \
  -H 'X-Authorization: <TOKEN>'

Response

{
  "queueData": {
    "WAIT": {
      "pollerCount": 2,
      "size": 752
    }
  },
  "pollData": [
    {
      "queueName": "WAIT",
      "workerId": "orkes-workers-deployment-676bf44f66-564j5",
      "lastPollTime": 1753108836394
    },
    {
      "queueName": "WAIT",
      "workerId": "orkes-workers-deployment-676bf44f66-fjfxr",
      "lastPollTime": 1753108836359
    }
  ]
}