Path parameters
-
The SID of the Workspace with the WorkerChannel to fetch.
Minimum length is
34
, maximum length is34
. Format should match the following pattern:^WS[0-9a-fA-F]{32}$
. -
The SID of the Worker with the WorkerChannel to fetch.
Minimum length is
34
, maximum length is34
. Format should match the following pattern:^WK[0-9a-fA-F]{32}$
.
Query parameters
-
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.
-
Only calculate statistics from this date and time and later, specified in ISO 8601 format.
-
Only include usage that occurred on or before this date, specified in GMT as an ISO 8601 date-time.
-
Only calculate statistics on this TaskChannel. Can be the TaskChannel's SID or its
unique_name
, such asvoice
,sms
, ordefault
.
curl \
--request GET 'https://taskrouter.twilio.com/v1/Workspaces/{WorkspaceSid}/Workers/{WorkerSid}/Statistics' \
--user "username:password"
{
"url": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Workers/WKaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Statistics",
"cumulative": {
"end_time": "2008-01-02T00:00:00Z",
"start_time": "2008-01-02T00:00:00Z",
"activity_durations": [
{
"avg": 1080,
"max": 0,
"min": 900,
"sid": "WAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"total": 5400,
"friendly_name": "Offline"
},
{
"avg": 1012,
"max": 0,
"min": 900,
"sid": "WAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"total": 8100,
"friendly_name": "Busy"
},
{
"avg": 0,
"max": 0,
"min": 0,
"sid": "WAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"total": 0,
"friendly_name": "Idle"
},
{
"avg": 0,
"max": 0,
"min": 0,
"sid": "WAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"total": 0,
"friendly_name": "Reserved"
}
],
"reservations_created": 100,
"reservations_accepted": 100,
"reservations_canceled": 100,
"reservations_rejected": 100,
"reservations_rescinded": 100,
"reservations_timed_out": 100
},
"worker_sid": "WKaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"workspace_sid": "WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
}