NAME

Twilio::Rest::Taskrouter::V1::Workspace::Worker::WorkersStatistics - The WorkersStatistics resource

SYNOPSIS

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

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

DESCRIPTION

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

WorkersStatisticsContext

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

fetch

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

Returns a WorkersStatisticsInstance.

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.

friendly_name

Only include Workers with friendly_name values that match this parameter.

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.

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.

task_queue_name

The friendly_name of the TaskQueue for which to fetch Worker statistics.

task_queue_sid

The SID of the TaskQueue for which to fetch Worker statistics.

WorkersStatisticsInstance

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

cumulative

An object that contains the cumulative statistics for the Worker.

realtime

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

url

The absolute URL of the Worker statistics resource.

workspace_sid

The SID of the Workspace that contains the Worker.

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.