Fetch task queue cumulative statistics

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

Path parameters

  • WorkspaceSid string Required

    The SID of the Workspace with the TaskQueue to fetch.

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

  • TaskQueueSid string Required

    The SID of the TaskQueue for which to fetch statistics.

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

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.

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

Responses

  • 200 application/json

    OK

    Hide headers attributes Show headers attributes
    • X-Rate-Limit-Limit string
    • X-Rate-Limit-Remaining string
    • X-Rate-Limit-Config string
    • Access-Control-Allow-Origin string

      Specify the origin(s) allowed to access the resource

    • Access-Control-Allow-Methods string

      Specify the HTTP methods allowed when accessing the resource

    • Access-Control-Allow-Headers string

      Specify the headers allowed when accessing the resource

    • Access-Control-Allow-Credentials boolean

      Indicates whether the browser should include credentials

    • Access-Control-Expose-Headers string

      Headers exposed to the client

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

      The SID of the Account that created the TaskQueue resource.

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

    • avg_task_acceptance_time integer

      The average time in seconds between Task creation and acceptance.

      Default value is 0.

    • start_time string(date-time) | null

      The beginning of the interval during which these statistics were calculated, in ISO 8601 format.

    • end_time string(date-time) | null

      The end of the interval during which these statistics were calculated, in ISO 8601 format.

    • reservations_created integer

      The total number of Reservations created for Tasks in the TaskQueue.

      Default value is 0.

    • reservations_accepted integer

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

      Default value is 0.

    • reservations_rejected integer

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

      Default value is 0.

    • reservations_timed_out integer

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

      Default value is 0.

    • reservations_canceled integer

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

      Default value is 0.

    • reservations_rescinded integer

      The total number of Reservations rescinded.

      Default value is 0.

    • split_by_wait_time

      A list of objects that describe the number of Tasks canceled and reservations accepted above and below the thresholds specified in seconds.

    • 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}$.

    • wait_duration_until_accepted

      The wait duration statistics (avg, min, max, total) for Tasks accepted while in the TaskQueue. Calculation is based on the time when the Tasks were created. For transfers, the wait duration is counted from the moment the Task was created, and not from when the transfer was initiated.

    • wait_duration_until_canceled

      The wait duration statistics (avg, min, max, total) for Tasks canceled while in the TaskQueue.

    • wait_duration_in_queue_until_accepted

      The relative wait duration statistics (avg, min, max, total) for Tasks accepted while in the TaskQueue. Calculation is based on the time when the Tasks entered the TaskQueue.

    • tasks_canceled integer

      The total number of Tasks canceled in the TaskQueue.

      Default value is 0.

    • tasks_completed integer

      The total number of Tasks completed in the TaskQueue.

      Default value is 0.

    • tasks_deleted integer

      The total number of Tasks deleted in the TaskQueue.

      Default value is 0.

    • tasks_entered integer

      The total number of Tasks entered into the TaskQueue.

      Default value is 0.

    • tasks_moved integer

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

      Default value is 0.

    • 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}$.

    • url string(uri) | null

      The absolute URL of the TaskQueue statistics resource.

GET /v1/Workspaces/{WorkspaceSid}/TaskQueues/{TaskQueueSid}/CumulativeStatistics
curl \
 --request GET 'https://taskrouter.twilio.com/v1/Workspaces/{WorkspaceSid}/TaskQueues/{TaskQueueSid}/CumulativeStatistics' \
 --user "username:password"
Response examples (200)
{
  "url": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/TaskQueues/WQaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/CumulativeStatistics",
  "end_time": "2015-07-30T20:00:00Z",
  "start_time": "2015-07-30T20:00:00Z",
  "account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
  "tasks_moved": 100,
  "tasks_deleted": 100,
  "tasks_entered": 100,
  "workspace_sid": "WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
  "task_queue_sid": "WQaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
  "tasks_canceled": 100,
  "tasks_completed": 100,
  "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_created": 100,
  "reservations_accepted": 100,
  "reservations_canceled": 100,
  "reservations_rejected": 100,
  "reservations_rescinded": 100,
  "reservations_timed_out": 100,
  "avg_task_acceptance_time": 100,
  "wait_duration_until_accepted": {
    "avg": 0,
    "max": 0,
    "min": 0,
    "total": 0
  },
  "wait_duration_until_canceled": {
    "avg": 0,
    "max": 0,
    "min": 0,
    "total": 0
  },
  "wait_duration_in_queue_until_accepted": {
    "avg": 0,
    "max": 0,
    "min": 0,
    "total": 0
  }
}