TaskrouterWorker Statistics

Fetch Worker Instance Statistics

GET
/v1/Workspaces/{WorkspaceSid}/Workers/{WorkerSid}/Statistics

Authorization

accountSid_authToken
AuthorizationBasic <token>

In: header

Path Parameters

WorkspaceSid*string

The SID of the Workspace with the WorkerChannel to fetch.

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

The SID of the Worker with the WorkerChannel to fetch.

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

Query Parameters

Minutes?integer

Only calculate statistics since this many minutes in the past. The default 15 minutes. This is helpful for displaying statistics for the last 15 minutes, 240 minutes (4 hours), and 480 minutes (8 hours) to see trends.

StartDate?string

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

Formatdate-time
EndDate?string

Only include usage that occurred on or before this date, specified in GMT as an ISO 8601 date-time.

Formatdate-time
TaskChannel?string

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

Response Body

application/json

curl -X GET "https://example.com/v1/Workspaces/stringstringstringstringstringstri/Workers/stringstringstringstringstringstri/Statistics?Minutes=1&StartDate=2008-01-02T00%3A00%3A00Z&EndDate=2008-01-02T00%3A00%3A00Z"
{  "cumulative": {    "reservations_created": 100,    "reservations_accepted": 100,    "reservations_rejected": 100,    "reservations_timed_out": 100,    "reservations_canceled": 100,    "reservations_rescinded": 100,    "activity_durations": [      {        "max": 0,        "min": 900,        "sid": "WAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",        "friendly_name": "Offline",        "avg": 1080,        "total": 5400      },      {        "max": 0,        "min": 900,        "sid": "WAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",        "friendly_name": "Busy",        "avg": 1012,        "total": 8100      },      {        "max": 0,        "min": 0,        "sid": "WAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",        "friendly_name": "Idle",        "avg": 0,        "total": 0      },      {        "max": 0,        "min": 0,        "sid": "WAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",        "friendly_name": "Reserved",        "avg": 0,        "total": 0      }    ],    "start_time": "2008-01-02T00:00:00Z",    "end_time": "2008-01-02T00:00:00Z"  },  "account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",  "workspace_sid": "WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",  "worker_sid": "WKaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",  "url": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Workers/WKaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Statistics"}