TaskrouterTask Queue Statistics

Fetch Task Queue Statistics

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

Authorization

accountSid_authToken
AuthorizationBasic <token>

In: header

Path Parameters

WorkspaceSid*string

The SID of the Workspace with the TaskQueue to fetch.

Match^WS[0-9a-fA-F]{32}$
Length34 <= length <= 34
TaskQueueSid*string

The SID of the TaskQueue for which to fetch statistics.

Match^WQ[0-9a-fA-F]{32}$
Length34 <= length <= 34

Query Parameters

EndDate?string

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

Formatdate-time
Minutes?integer

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

StartDate?string

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

Formatdate-time
TaskChannel?string

Only calculate real-time and cumulative statistics for the specified 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.

Response Body

application/json

curl -X GET "https://example.com/v1/Workspaces/stringstringstringstringstringstri/TaskQueues/stringstringstringstringstringstri/Statistics?EndDate=2008-01-02T00%3A00%3A00Z&Minutes=1&StartDate=2008-01-02T00%3A00%3A00Z"
{  "account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",  "url": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/TaskQueues/WQaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Statistics",  "cumulative": {    "avg_task_acceptance_time": 0,    "end_time": "2015-08-18T08:42:34Z",    "reservations_accepted": 0,    "reservations_canceled": 0,    "reservations_created": 0,    "reservations_rejected": 0,    "reservations_rescinded": 0,    "reservations_timed_out": 0,    "start_time": "2015-08-18T08:27:34Z",    "tasks_canceled": 0,    "tasks_deleted": 0,    "tasks_entered": 0,    "tasks_moved": 0  },  "realtime": {    "activity_statistics": [      {        "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",        "sid": "WAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",        "workers": 0      }    ],    "longest_task_waiting_age": 0,    "longest_task_waiting_sid": "WTaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",    "tasks_by_status": {      "assigned": 0,      "pending": 0,      "reserved": 0,      "wrapping": 0    },    "total_available_workers": 0,    "total_eligible_workers": 0,    "total_tasks": 0  },  "task_queue_sid": "WQaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",  "workspace_sid": "WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"}