Fetch a Task Queue Real Time Statistics in bulk for the array of TaskQueue SIDs, support upto 50 in a request.

POST /v1/Workspaces/{WorkspaceSid}/TaskQueues/RealTimeStatistics

Fetch a Task Queue Real Time Statistics in bulk for the array of TaskQueue SIDs, support upto 50 in a request.

Path parameters

  • WorkspaceSid string Required

    The unique SID identifier of the Workspace.

    Minimum length is 34, maximum length is 34. Format should match the following pattern: ^WS[0-9a-fA-F]{32}$.

application/json

Body

object object

Responses

  • 200 application/json

    OK

    Hide headers attributes Show headers attributes
    • X-Rate-Limit-Limit string
    • X-Rate-Limit-Remaining string
    • X-Rate-Limit-Config string
    • Access-Control-Allow-Origin string

      Specify the origin(s) allowed to access the resource

    • Access-Control-Allow-Methods string

      Specify the HTTP methods allowed when accessing the resource

    • Access-Control-Allow-Headers string

      Specify the headers allowed when accessing the resource

    • Access-Control-Allow-Credentials boolean

      Indicates whether the browser should include credentials

    • Access-Control-Expose-Headers string

      Headers exposed to the client

    Hide response attributes Show response attributes object
    • account_sid string | null

      The SID of the Account that created the TaskQueue resource.

      Minimum length is 34, maximum length is 34. Format should match the following pattern: ^AC[0-9a-fA-F]{32}$.

    • workspace_sid string | null

      The SID of the Workspace that contains the TaskQueue.

      Minimum length is 34, maximum length is 34. Format should match the following pattern: ^WS[0-9a-fA-F]{32}$.

    • task_queue_data array | null

      The real-time statistics for each requested TaskQueue SID. task_queue_data returns the following attributes:

      task_queue_sid: The SID of the TaskQueue from which these statistics were calculated.

      total_available_workers: The total number of Workers available for Tasks in the TaskQueue.

      total_eligible_workers: The total number of Workers eligible for Tasks in the TaskQueue, regardless of their Activity state.

      total_tasks: The total number of Tasks.

      longest_task_waiting_age: The age of the longest waiting Task.

      longest_task_waiting_sid: The SID of the longest waiting Task.

      tasks_by_status: The number of Tasks grouped by their current status.

      tasks_by_priority: The number of Tasks grouped by priority.

      activity_statistics: The number of current Workers grouped by Activity.

    • task_queue_response_count integer

      The number of TaskQueue statistics received in task_queue_data.

      Default value is 0.

    • url string(uri) | null

      The absolute URL of the TaskQueue statistics resource.

POST /v1/Workspaces/{WorkspaceSid}/TaskQueues/RealTimeStatistics
curl \
 --request POST 'https://taskrouter.twilio.com/v1/Workspaces/{WorkspaceSid}/TaskQueues/RealTimeStatistics' \
 --user "username:password" \
 --header "Content-Type: application/json"
Request examples
{}
Response examples (200)
{
  "url": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/TaskQueues/RealTimeStatistics",
  "account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
  "workspace_sid": "WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
  "task_queue_data": [
    {
      "total_tasks": 100,
      "task_queue_sid": "WQaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
      "tasks_by_status": {
        "pending": 0,
        "assigned": 0,
        "reserved": 0,
        "wrapping": 0
      },
      "tasks_by_priority": {},
      "activity_statistics": [
        {
          "sid": "WAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
          "workers": 0,
          "friendly_name": "Idle"
        },
        {
          "sid": "WAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
          "workers": 9,
          "friendly_name": "Busy"
        },
        {
          "sid": "WAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
          "workers": 6,
          "friendly_name": "Offline"
        },
        {
          "sid": "WAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
          "workers": 0,
          "friendly_name": "Reserved"
        }
      ],
      "total_eligible_workers": 100,
      "total_available_workers": 100,
      "longest_task_waiting_age": 100,
      "longest_task_waiting_sid": "WTaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
    }
  ],
  "task_queue_response_count": 100
}