Fetch task queue real time statistics

GET /v1/Workspaces/{WorkspaceSid}/TaskQueues/{TaskQueueSid}/RealTimeStatistics

TODO: Resource-level docs

Path parameters

  • WorkspaceSid string Required

    The SID of the Workspace with the TaskQueue to fetch.

  • TaskQueueSid string Required

    The SID of the TaskQueue for which to fetch statistics.

Query parameters

  • The TaskChannel for which to fetch statistics. Can be the TaskChannel's SID or its unique_name, such as voice, sms, or default.

Responses

  • OK

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

      The SID of the Account that created the resource

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

    • The number of current Workers by Activity

    • The relative age in the TaskQueue for the longest waiting Task.

    • The SID of the Task waiting in the TaskQueue the longest.

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

    • The age of the longest waiting Task

    • The SID of the longest waiting Task

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

    • task_queue_sid string | null

      The SID of the TaskQueue from which these statistics were calculated

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

    • The number of Tasks by priority

    • The number of Tasks by their current status

    • The total number of Workers available for Tasks in the TaskQueue

    • The total number of Workers eligible for Tasks in the TaskQueue, independent of their Activity state

    • total_tasks integer | null

      The total number of Tasks

    • url string(uri) | null

      The absolute URL of the TaskQueue statistics resource

    • 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}$.

GET /v1/Workspaces/{WorkspaceSid}/TaskQueues/{TaskQueueSid}/RealTimeStatistics
curl \
 -X GET https://taskrouter.twilio.com/v1/Workspaces/{WorkspaceSid}/TaskQueues/{TaskQueueSid}/RealTimeStatistics \
 --user "username:password"
Response examples (200)
{
  "account_sid": "string",
  "activity_statistics": [],
  "longest_relative_task_age_in_queue": 42,
  "longest_relative_task_sid_in_queue": "string",
  "longest_task_waiting_age": 42,
  "longest_task_waiting_sid": "string",
  "task_queue_sid": "string",
  "total_available_workers": 42,
  "total_eligible_workers": 42,
  "total_tasks": 42,
  "url": "https://example.com",
  "workspace_sid": "string"
}
Response examples (200)
{
  "account_sid": "string",
  "activity_statistics": [],
  "longest_relative_task_age_in_queue": 42,
  "longest_relative_task_sid_in_queue": "string",
  "longest_task_waiting_age": 42,
  "longest_task_waiting_sid": "string",
  "task_queue_sid": "string",
  "total_available_workers": 42,
  "total_eligible_workers": 42,
  "total_tasks": 42,
  "url": "https://example.com",
  "workspace_sid": "string"
}