Fetch workspace real time statistics

GET /v1/Workspaces/{WorkspaceSid}/RealTimeStatistics

Path parameters

  • WorkspaceSid string Required

    The SID of the Workspace to fetch.

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

Query parameters

  • TaskChannel string

    Only calculate real-time statistics on this TaskChannel. Can be the TaskChannel's SID or its unique_name, such as voice, sms, or default.

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 Workspace resource.

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

    • activity_statistics array | null

      The number of current Workers by Activity.

    • longest_task_waiting_age integer

      The age of the longest waiting Task.

      Default value is 0.

    • longest_task_waiting_sid string | null

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

    • tasks_by_priority

      The number of Tasks by priority. For example: {"0": "10", "99": "5"} shows 10 Tasks at priority 0 and 5 at priority 99.

    • tasks_by_status

      The number of Tasks by their current status. For example: {"pending": "1", "reserved": "3", "assigned": "2", "completed": "5"}.

    • total_tasks integer

      The total number of Tasks.

      Default value is 0.

    • total_workers integer

      The total number of Workers in the Workspace.

      Default value is 0.

    • workspace_sid string | null

      The SID of the Workspace.

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

    • url string(uri) | null

      The absolute URL of the Workspace statistics resource.

GET /v1/Workspaces/{WorkspaceSid}/RealTimeStatistics
curl \
 --request GET 'https://taskrouter.twilio.com/v1/Workspaces/{WorkspaceSid}/RealTimeStatistics' \
 --user "username:password"
Response examples (200)
{
  "url": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/RealTimeStatistics",
  "account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
  "total_tasks": 100,
  "total_workers": 100,
  "workspace_sid": "WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
  "tasks_by_status": {},
  "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"
    }
  ],
  "longest_task_waiting_age": 100,
  "longest_task_waiting_sid": "WTaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
}