List task queues statistics

GET /v1/Workspaces/{WorkspaceSid}/TaskQueues/Statistics

Path parameters

  • WorkspaceSid string Required

    The SID of the Workspace with the TaskQueues to read.

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

Query parameters

  • EndDate string(date-time)

    Only calculate statistics from this date and time and earlier, specified in GMT as an ISO 8601 date-time.

  • FriendlyName string

    The friendly_name of the TaskQueue statistics to read.

  • Minutes integer

    Only calculate statistics since this many minutes in the past. The default is 15 minutes.

  • StartDate string(date-time)

    Only calculate statistics from this date and time and later, specified in ISO 8601 format.

  • TaskChannel string

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

  • SplitByWaitTime string

    A comma separated list of values that describes the thresholds, in seconds, to calculate statistics on. For each threshold specified, the number of Tasks canceled and reservations accepted above and below the specified thresholds in seconds are computed.

  • PageSize integer(int64)

    How many resources to return in each list page. The default is 50, and the maximum is 1000.

    Minimum value is 1, maximum value is 1000.

  • Page integer

    The page index. This value is simply for client state.

    Minimum value is 0.

  • PageToken string

    The page token. This is provided by the API.

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
    • task_queues_statistics array[object]
      Hide task_queues_statistics attributes Show task_queues_statistics 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}$.

      • cumulative

        An object that contains the cumulative statistics for the TaskQueues.

      • realtime

        An object that contains the real-time statistics for the TaskQueues.

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

      • workspace_sid string | null

        The SID of the Workspace that contains the TaskQueues.

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

    • meta object
      Hide meta attributes Show meta attributes object
      • first_page_url string(uri)
      • key string
      • next_page_url string(uri) | null
      • page integer
      • page_size integer
      • previous_page_url string(uri) | null
      • url string(uri)
GET /v1/Workspaces/{WorkspaceSid}/TaskQueues/Statistics
curl \
 --request GET 'https://taskrouter.twilio.com/v1/Workspaces/{WorkspaceSid}/TaskQueues/Statistics' \
 --user "username:password"
Response examples (200)
{
  "meta": {
    "key": "task_queues_statistics",
    "url": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/TaskQueues/Statistics?FriendlyName=friendly_name&StartDate=2008-01-02T00%3A00%3A00Z&EndDate=2008-01-02T00%3A00%3A00Z&Minutes=1&PageSize=50&Page=0",
    "page": 0,
    "page_size": 50,
    "next_page_url": null,
    "first_page_url": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/TaskQueues/Statistics?FriendlyName=friendly_name&StartDate=2008-01-02T00%3A00%3A00Z&EndDate=2008-01-02T00%3A00%3A00Z&Minutes=1&PageSize=50&Page=0",
    "previous_page_url": null
  },
  "task_queues_statistics": [
    {
      "realtime": {
        "total_tasks": 0,
        "tasks_by_status": {
          "pending": 0,
          "assigned": 0,
          "reserved": 0,
          "wrapping": 0
        },
        "activity_statistics": [
          {
            "sid": "WAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
            "workers": 0,
            "friendly_name": "Offline"
          },
          {
            "sid": "WAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
            "workers": 0,
            "friendly_name": "Idle"
          },
          {
            "sid": "WAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
            "workers": 0,
            "friendly_name": "80fa2beb-3a05-11e5-8fc8-98e0d9a1eb73"
          },
          {
            "sid": "WAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
            "workers": 0,
            "friendly_name": "Reserved"
          },
          {
            "sid": "WAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
            "workers": 0,
            "friendly_name": "Busy"
          },
          {
            "sid": "WAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
            "workers": 0,
            "friendly_name": "817ca1c5-3a05-11e5-9292-98e0d9a1eb73"
          }
        ],
        "total_eligible_workers": 0,
        "total_available_workers": 0,
        "longest_task_waiting_age": 0,
        "longest_task_waiting_sid": "WTaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
      },
      "cumulative": {
        "end_time": "2015-08-18T08:46:15Z",
        "start_time": "2015-08-18T08:31:15Z",
        "tasks_moved": 0,
        "tasks_deleted": 0,
        "tasks_entered": 0,
        "tasks_canceled": 0,
        "reservations_created": 0,
        "reservations_accepted": 0,
        "reservations_canceled": 0,
        "reservations_rejected": 0,
        "reservations_rescinded": 0,
        "reservations_timed_out": 0,
        "avg_task_acceptance_time": 0
      },
      "account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
      "workspace_sid": "WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
      "task_queue_sid": "WQaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
    }
  ]
}
{
  "meta": {
    "key": "task_queues_statistics",
    "url": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/TaskQueues/Statistics?FriendlyName=friendly_name&StartDate=2008-01-02T00%3A00%3A00Z&EndDate=2008-01-02T00%3A00%3A00Z&Minutes=1&PageSize=50&Page=0",
    "page": 0,
    "page_size": 50,
    "next_page_url": null,
    "first_page_url": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/TaskQueues/Statistics?FriendlyName=friendly_name&StartDate=2008-01-02T00%3A00%3A00Z&EndDate=2008-01-02T00%3A00%3A00Z&Minutes=1&PageSize=50&Page=0",
    "previous_page_url": null
  },
  "task_queues_statistics": []
}