NAME

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

SYNOPSIS

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

my $workspace_real_time_statistics = $client->taskrouter->v1->workspaces($workspace_sid)->real_time_statistics->fetch;

DESCRIPTION

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

WorkspaceRealTimeStatisticsContext

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

fetch

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

Returns a WorkspaceRealTimeStatisticsInstance.

The options are:

task_channel

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

WorkspaceRealTimeStatisticsInstance

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.

activity_statistics

The number of current Workers by Activity.

longest_task_waiting_age

The age of the longest waiting Task.

longest_task_waiting_sid

The SID of the longest waiting Task.

tasks_by_priority

The number of Tasks by priority. For example: {"0": "10", "99": "5"} shows 10 Tasks at priority 0 and 5 at priority 99.

tasks_by_status

The number of Tasks by their current status. For example: {"pending": "1", "reserved": "3", "assigned": "2", "completed": "5"}.

total_tasks

The total number of Tasks.

total_workers

The total number of Workers in 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.