Fetch workers real time statistics

GET /v1/Workspaces/{WorkspaceSid}/Workers/RealTimeStatistics

Path parameters

  • WorkspaceSid string Required

    The SID of the Workspace with the resource 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 Worker 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.

    • total_workers integer

      The total number of Workers.

      Default value is 0.

    • workspace_sid string | null

      The SID of the Workspace that contains the Workers.

      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 Workers statistics resource.

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