NAME

Twilio::Rest::Taskrouter::V1::Workspace::WorkspaceStatistics - The WorkspaceStatistics resource

SYNOPSIS

my $client = Twilio::Rest::Client->new($account_sid, $auth_token);

my $workspace_statistics = $client->taskrouter->v1->workspaces($workspace_sid)->statistics->fetch;

DESCRIPTION

This file holds WorkspaceStatisticsContext and WorkspaceStatisticsInstance. Methods that make a request throw Twilio::Exceptions::RestException on an error response.

WorkspaceStatisticsContext

Returned by $client->taskrouter->v1->workspaces($workspace_sid)->statistics. It makes no request until one of these methods is called.

fetch

my $workspace_statistics = $client->taskrouter->v1->workspaces($workspace_sid)->statistics->fetch(\%options);

Returns a WorkspaceStatisticsInstance.

The options are:

end_date

Only calculate statistics from this date and time and earlier, specified in GMT as an ISO 8601 date-time. A string, or an object with an epoch method. See "iso8601_date_time" in Twilio::Serialize.

minutes

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.

split_by_wait_time

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.

start_date

Only calculate statistics from this date and time and later, specified in ISO 8601 format. A string, or an object with an epoch method. See "iso8601_date_time" in Twilio::Serialize.

task_channel

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

WorkspaceStatisticsInstance

See also Twilio::InstanceResource.

It has fetch, which work as they do on the context.

Its fields are:

account_sid

The SID of the Account that created the Workspace resource.

cumulative

An object that contains the cumulative statistics for the Workspace.

realtime

An object that contains the real-time statistics for the Workspace.

url

The absolute URL of the Workspace statistics resource.

workspace_sid

The SID of the Workspace.

CONSTRUCTORS

new

Objects here come from the methods above, so there is no need to call new directly.

LICENSE

Copyright (c) 2026 Francisco Zarabozo. Released under the MIT License.