TaskrouterWorkflow Cumulative Statistics

Fetch Workflow Cumulative Statistics

GET
/v1/Workspaces/{WorkspaceSid}/Workflows/{WorkflowSid}/CumulativeStatistics

Authorization

accountSid_authToken
AuthorizationBasic <token>

In: header

Path Parameters

WorkspaceSid*string

The SID of the Workspace with the resource to fetch.

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

Returns the list of Tasks that are being controlled by the Workflow with the specified Sid value.

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

Query Parameters

EndDate?string

Only include usage that occurred on or before this date, 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 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
TaskChannel?string

Only calculate cumulative 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. 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.

Response Body

application/json

curl -X GET "https://example.com/v1/Workspaces/stringstringstringstringstringstri/Workflows/stringstringstringstringstringstri/CumulativeStatistics?EndDate=2015-07-30T20%3A00%3A00Z&StartDate=2015-07-30T20%3A00%3A00Z"
{  "avg_task_acceptance_time": 100,  "tasks_canceled": 100,  "start_time": "2015-07-30T20:00:00Z",  "account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",  "tasks_moved": 100,  "tasks_entered": 100,  "wait_duration_until_canceled": {    "avg": 0,    "min": 0,    "max": 0,    "total": 0  },  "wait_duration_until_accepted": {    "avg": 0,    "min": 0,    "max": 0,    "total": 0  },  "split_by_wait_time": {    "5": {      "above": {        "tasks_canceled": 0,        "reservations_accepted": 0      },      "below": {        "tasks_canceled": 0,        "reservations_accepted": 0      }    },    "10": {      "above": {        "tasks_canceled": 0,        "reservations_accepted": 0      },      "below": {        "tasks_canceled": 0,        "reservations_accepted": 0      }    }  },  "reservations_canceled": 100,  "end_time": "2015-07-30T20:00:00Z",  "workflow_sid": "WWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",  "reservations_created": 100,  "reservations_accepted": 100,  "reservations_rescinded": 100,  "workspace_sid": "WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",  "reservations_rejected": 100,  "url": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Workflows/WWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/CumulativeStatistics",  "tasks_deleted": 100,  "tasks_timed_out_in_workflow": 100,  "tasks_completed": 100,  "reservations_timed_out": 100}