NAME

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

SYNOPSIS

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

for my $event ($client->taskrouter->v1->workspaces($workspace_sid)->events->read({}, 20)) {
  ...
}
my $event = $client->taskrouter->v1->workspaces($workspace_sid)->events($sid)->fetch;

DESCRIPTION

This file holds EventList, EventPage, EventContext and EventInstance. Methods that make a request throw Twilio::Exceptions::RestException on an error response.

EventList

Returned by $client->taskrouter->v1->workspaces($workspace_sid)->events. See also Twilio::ListResource.

read

my @records = $client->taskrouter->v1->workspaces($workspace_sid)->events->read(\%options, $limit, $page_size);

Returns the records as a list, fetching as many pages as it needs.

The options are:

end_date

Only include Events 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.

event_type

The type of Events to read. Returns only Events of the type specified.

minutes

The period of events to read in minutes. Returns only Events that occurred since this many minutes in the past. The default is 15 minutes. Task Attributes for Events occuring more 43,200 minutes ago will be redacted.

reservation_sid

The SID of the Reservation with the Events to read. Returns only Events that pertain to the specified Reservation.

sid

The SID of the Event resource to read.

start_date

Only include Events from on or after this date and time, specified in ISO 8601 format. Task Attributes for Events older than 30 days will be redacted. A string, or an object with an epoch method. See "iso8601_date_time" in Twilio::Serialize.

task_channel

The TaskChannel with the Events to read. Returns only the Events that pertain to the specified TaskChannel.

task_queue_sid

The SID of the TaskQueue with the Events to read. Returns only the Events that pertain to the specified TaskQueue.

task_sid

The SID of the Task with the Events to read. Returns only the Events that pertain to the specified Task.

worker_sid

The SID of the Worker with the Events to read. Returns only the Events that pertain to the specified Worker.

workflow_sid

The SID of the Workflow with the Events to read. Returns only the Events that pertain to the specified Workflow.

stream

my $stream = $client->taskrouter->v1->workspaces($workspace_sid)->events->stream(\%options, $limit, $page_size);

Takes the same arguments as "read", and returns a Twilio::Stream.

page

my $page = $client->taskrouter->v1->workspaces($workspace_sid)->events->page(\%options, $page_size, $page_token, $page_number);

Fetches one page, and returns a Twilio::Page.

get_page

my $page = $client->taskrouter->v1->workspaces($workspace_sid)->events->get_page($url);

Fetches the page at a URL given by Twilio.

get_context

my $context = $client->taskrouter->v1->workspaces($workspace_sid)->events->get_context($sid);

Returns a EventContext, and makes no request.

EventPage

A Twilio::Page of EventInstance objects.

records_key

build_instance

Used by Twilio::Page.

EventContext

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

fetch

my $event = $client->taskrouter->v1->workspaces($workspace_sid)->events($sid)->fetch;

Returns a EventInstance.

EventInstance

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

actor_sid

The SID of the resource that triggered the event.

actor_type

The type of resource that triggered the event.

actor_url

The absolute URL of the resource that triggered the event.

description

A description of the event.

event_data

Data about the event. For more information, see Event types.

event_date

The time the event was sent, specified in ISO 8601 format. A Time::Piece object in UTC. See "date_time" in Twilio::Deserialize.

event_date_ms

The time the event was sent in milliseconds.

event_type

The identifier for the event.

resource_sid

The SID of the object the event is most relevant to, such as a TaskSid, ReservationSid, or a WorkerSid.

resource_type

The type of object the event is most relevant to, such as a Task, Reservation, or a Worker).

resource_url

The URL of the resource the event is most relevant to.

sid

The unique string that we created to identify the Event resource.

source

Where the Event originated.

source_ip_address

The IP from which the Event originated.

url

The absolute URL of the Event resource.

workspace_sid

The SID of the Workspace that contains the Event.

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.