NAME

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

SYNOPSIS

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

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

DESCRIPTION

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

WorkerStatisticsContext

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

fetch

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

Returns a WorkerStatisticsInstance.

The options are:

end_date

Only include usage that occurred on or before this date, 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.

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.

WorkerStatisticsInstance

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.

url

The absolute URL of the WorkerChannel statistics resource.

worker_sid

The SID of the Worker that contains the WorkerChannel.

workspace_sid

The SID of the Workspace that contains the WorkerChannel.

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.