Fetch task queue cumulative statistics

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

TODO: Resource-level docs

Path parameters

  • WorkspaceSid string Required

    The SID of the Workspace with the TaskQueue to fetch.

  • TaskQueueSid string Required

    The SID of the TaskQueue for which to fetch statistics.

Query parameters

  • EndDate string(date-time)

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

  • Minutes integer

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

  • StartDate string(date-time)

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

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

  • 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. TaskRouter will calculate statistics on up to 10,000 Tasks/Reservations for any given threshold.

Responses

  • OK

    Hide response attributes Show response attributes object
    • account_sid string | null

      The SID of the Account that created the resource

      Minimum length is 34, maximum length is 34. Format should match the following pattern: ^AC[0-9a-fA-F]{32}$.

    • The average time in seconds between Task creation and acceptance

    • end_time string(date-time) | null

      The end of the interval during which these statistics were calculated

    • The total number of Reservations accepted for Tasks in the TaskQueue

    • The total number of Reservations canceled for Tasks in the TaskQueue

    • reservations_created integer | null

      The total number of Reservations created for Tasks in the TaskQueue

    • The total number of Reservations rejected for Tasks in the TaskQueue

    • The total number of Reservations rescinded

    • The total number of Reservations that timed out for Tasks in the TaskQueue

    • A list of objects that describe the Tasks canceled and reservations accepted above and below the specified thresholds

    • start_time string(date-time) | null

      The beginning of the interval during which these statistics were calculated

    • task_queue_sid string | null

      The SID of the TaskQueue from which these statistics were calculated

      Minimum length is 34, maximum length is 34. Format should match the following pattern: ^WQ[0-9a-fA-F]{32}$.

    • tasks_canceled integer | null

      The total number of Tasks canceled in the TaskQueue

    • tasks_completed integer | null

      The total number of Tasks completed in the TaskQueue

    • tasks_deleted integer | null

      The total number of Tasks deleted in the TaskQueue

    • tasks_entered integer | null

      The total number of Tasks entered into the TaskQueue

    • tasks_moved integer | null

      The total number of Tasks that were moved from one queue to another

    • url string(uri) | null

      The absolute URL of the TaskQueue statistics resource

    • The relative wait duration statistics for Tasks accepted while in the TaskQueue

    • The wait duration statistics for Tasks accepted while in the TaskQueue

    • The wait duration statistics for Tasks canceled while in the TaskQueue

    • workspace_sid string | null

      The SID of the Workspace that contains the TaskQueue

      Minimum length is 34, maximum length is 34. Format should match the following pattern: ^WS[0-9a-fA-F]{32}$.

GET /v1/Workspaces/{WorkspaceSid}/TaskQueues/{TaskQueueSid}/CumulativeStatistics
curl \
 -X GET https://taskrouter.twilio.com/v1/Workspaces/{WorkspaceSid}/TaskQueues/{TaskQueueSid}/CumulativeStatistics \
 --user "username:password"
Response examples (200)
{
  "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",
  "task_queue_sid": "string",
  "tasks_canceled": 42,
  "tasks_completed": 42,
  "tasks_deleted": 42,
  "tasks_entered": 42,
  "tasks_moved": 42,
  "url": "https://example.com",
  "workspace_sid": "string"
}
Response examples (200)
{
  "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",
  "task_queue_sid": "string",
  "tasks_canceled": 42,
  "tasks_completed": 42,
  "tasks_deleted": 42,
  "tasks_entered": 42,
  "tasks_moved": 42,
  "url": "https://example.com",
  "workspace_sid": "string"
}