Fetch workflow cumulative statistics
TODO: Resource-level docs
Path parameters
-
The SID of the Workspace with the resource to fetch.
-
Returns the list of Tasks that are being controlled by the Workflow with the specified Sid value.
Query parameters
-
EndDate string(date-time)
Only include usage that occurred on or before this date, specified in GMT as an ISO 8601 date-time.
-
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(date-time)
Only calculate statistics from this date and time and later, specified in ISO 8601 format.
-
TaskChannel string
Only calculate cumulative statistics on this TaskChannel. Can be the TaskChannel's SID or its
unique_name
, such asvoice
,sms
, ordefault
. -
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. For example,
5,30
would show splits of Tasks that were canceled or accepted before and after 5 seconds and before and after 30 seconds. This can be used to show short abandoned Tasks or Tasks that failed to meet an SLA. TaskRouter will calculate statistics on up to 10,000 Tasks for any given threshold.
curl \
-X GET https://taskrouter.twilio.com/v1/Workspaces/{WorkspaceSid}/Workflows/{WorkflowSid}/CumulativeStatistics \
--user "username:password"
{
"account_sid": "string",
"avg_task_acceptance_time": 42,
"end_time": "2023-05-04T09:42:00+00:00",
"reservations_accepted": 42,
"reservations_canceled": 42,
"reservations_created": 42,
"reservations_rejected": 42,
"reservations_rescinded": 42,
"reservations_timed_out": 42,
"start_time": "2023-05-04T09:42:00+00:00",
"tasks_canceled": 42,
"tasks_completed": 42,
"tasks_deleted": 42,
"tasks_entered": 42,
"tasks_moved": 42,
"tasks_timed_out_in_workflow": 42,
"url": "https://example.com",
"workflow_sid": "string",
"workspace_sid": "string"
}
{
"account_sid": "string",
"avg_task_acceptance_time": 42,
"end_time": "2024-05-04T09:42:00+00:00",
"reservations_accepted": 42,
"reservations_canceled": 42,
"reservations_created": 42,
"reservations_rejected": 42,
"reservations_rescinded": 42,
"reservations_timed_out": 42,
"start_time": "2024-05-04T09:42:00+00:00",
"tasks_canceled": 42,
"tasks_completed": 42,
"tasks_deleted": 42,
"tasks_entered": 42,
"tasks_moved": 42,
"tasks_timed_out_in_workflow": 42,
"url": "https://example.com",
"workflow_sid": "string",
"workspace_sid": "string"
}