Fetch workspace cumulative statistics

GET /v1/Workspaces/{WorkspaceSid}/CumulativeStatistics

Path parameters

  • WorkspaceSid string Required

    The SID of the Workspace to fetch.

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

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 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.

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 Workspace 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 that were created for Workers.

      Default value is 0.

    • reservations_accepted integer

      The total number of Reservations accepted by Workers.

      Default value is 0.

    • reservations_rejected integer

      The total number of Reservations that were rejected.

      Default value is 0.

    • reservations_timed_out integer

      The total number of Reservations that were timed out.

      Default value is 0.

    • reservations_canceled integer

      The total number of Reservations that were canceled.

      Default value is 0.

    • reservations_rescinded integer

      The total number of Reservations that were 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.

    • wait_duration_until_accepted

      The wait duration statistics (avg, min, max, total) for Tasks that were accepted.

    • wait_duration_until_canceled

      The wait duration statistics (avg, min, max, total) for Tasks that were canceled.

    • tasks_canceled integer

      The total number of Tasks that were canceled.

      Default value is 0.

    • tasks_completed integer

      The total number of Tasks that were completed.

      Default value is 0.

    • tasks_created integer

      The total number of Tasks created.

      Default value is 0.

    • tasks_deleted integer

      The total number of Tasks that were deleted.

      Default value is 0.

    • tasks_moved integer

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

      Default value is 0.

    • tasks_timed_out_in_workflow integer

      The total number of Tasks that were timed out of their Workflows (and deleted).

      Default value is 0.

    • workspace_sid string | null

      The SID of the Workspace.

      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 Workspace statistics resource.

GET /v1/Workspaces/{WorkspaceSid}/CumulativeStatistics
curl \
 --request GET 'https://taskrouter.twilio.com/v1/Workspaces/{WorkspaceSid}/CumulativeStatistics' \
 --user "username:password"
Response examples (200)
{
  "url": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/CumulativeStatistics",
  "end_time": "2015-07-30T20:00:00Z",
  "start_time": "2015-07-30T20:00:00Z",
  "account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
  "tasks_moved": 100,
  "tasks_created": 100,
  "tasks_deleted": 100,
  "workspace_sid": "WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
  "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,
  "tasks_timed_out_in_workflow": 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
  }
}