twilio.rest.taskrouter.v1.workspace package¶
Subpackages¶
- twilio.rest.taskrouter.v1.workspace.task package
- twilio.rest.taskrouter.v1.workspace.task_queue package
- Submodules
- twilio.rest.taskrouter.v1.workspace.task_queue.task_queue_cumulative_statistics module
- twilio.rest.taskrouter.v1.workspace.task_queue.task_queue_real_time_statistics module
- twilio.rest.taskrouter.v1.workspace.task_queue.task_queue_statistics module
- twilio.rest.taskrouter.v1.workspace.task_queue.task_queues_statistics module
- Module contents
- twilio.rest.taskrouter.v1.workspace.worker package
- Submodules
- twilio.rest.taskrouter.v1.workspace.worker.reservation module
- twilio.rest.taskrouter.v1.workspace.worker.worker_channel module
- twilio.rest.taskrouter.v1.workspace.worker.worker_statistics module
- twilio.rest.taskrouter.v1.workspace.worker.workers_cumulative_statistics module
- twilio.rest.taskrouter.v1.workspace.worker.workers_real_time_statistics module
- twilio.rest.taskrouter.v1.workspace.worker.workers_statistics module
- Module contents
- twilio.rest.taskrouter.v1.workspace.workflow package
Submodules¶
twilio.rest.taskrouter.v1.workspace.activity module¶
This code was generated by / _ _ _| _ _
(_)/(_)(_|/| |(/_ v1.0.0 / /
-
class
twilio.rest.taskrouter.v1.workspace.activity.
ActivityContext
(version, workspace_sid, sid)[source]¶ Bases:
twilio.base.instance_context.InstanceContext
-
delete
()[source]¶ Deletes the ActivityInstance
Returns: True if delete succeeds, False otherwise Return type: bool
-
fetch
()[source]¶ Fetch the ActivityInstance
Returns: The fetched ActivityInstance Return type: twilio.rest.taskrouter.v1.workspace.activity.ActivityInstance
-
update
(friendly_name=<object object>)[source]¶ Update the ActivityInstance
Parameters: friendly_name (unicode) – A string to describe the Activity resource Returns: The updated ActivityInstance Return type: twilio.rest.taskrouter.v1.workspace.activity.ActivityInstance
-
-
class
twilio.rest.taskrouter.v1.workspace.activity.
ActivityInstance
(version, payload, workspace_sid, sid=None)[source]¶ Bases:
twilio.base.instance_resource.InstanceResource
-
account_sid
¶ Returns: The SID of the Account that created the resource Return type: unicode
-
available
¶ Returns: Whether the Worker should be eligible to receive a Task when it occupies the Activity Return type: bool
-
date_created
¶ Returns: The ISO 8601 date and time in GMT when the resource was created Return type: datetime
-
date_updated
¶ Returns: The ISO 8601 date and time in GMT when the resource was last updated Return type: datetime
-
delete
()[source]¶ Deletes the ActivityInstance
Returns: True if delete succeeds, False otherwise Return type: bool
-
fetch
()[source]¶ Fetch the ActivityInstance
Returns: The fetched ActivityInstance Return type: twilio.rest.taskrouter.v1.workspace.activity.ActivityInstance
-
friendly_name
¶ Returns: The string that you assigned to describe the Activity resource Return type: unicode
-
links
¶ Returns: The links Return type: unicode
-
sid
¶ Returns: The unique string that identifies the resource Return type: unicode
-
update
(friendly_name=<object object>)[source]¶ Update the ActivityInstance
Parameters: friendly_name (unicode) – A string to describe the Activity resource Returns: The updated ActivityInstance Return type: twilio.rest.taskrouter.v1.workspace.activity.ActivityInstance
-
url
¶ Returns: The absolute URL of the Activity resource Return type: unicode
-
workspace_sid
¶ Returns: The SID of the Workspace that contains the Activity Return type: unicode
-
-
class
twilio.rest.taskrouter.v1.workspace.activity.
ActivityList
(version, workspace_sid)[source]¶ Bases:
twilio.base.list_resource.ListResource
-
create
(friendly_name, available=<object object>)[source]¶ Create the ActivityInstance
Parameters: - friendly_name (unicode) – A string to describe the Activity resource
- available (bool) – Whether the Worker should be eligible to receive a Task when it occupies the Activity
Returns: The created ActivityInstance
Return type: twilio.rest.taskrouter.v1.workspace.activity.ActivityInstance
-
get
(sid)[source]¶ Constructs a ActivityContext
Parameters: sid – The SID of the resource to fetch Returns: twilio.rest.taskrouter.v1.workspace.activity.ActivityContext Return type: twilio.rest.taskrouter.v1.workspace.activity.ActivityContext
-
get_page
(target_url)[source]¶ Retrieve a specific page of ActivityInstance records from the API. Request is executed immediately
Parameters: target_url (str) – API-generated URL for the requested results page Returns: Page of ActivityInstance Return type: twilio.rest.taskrouter.v1.workspace.activity.ActivityPage
-
list
(friendly_name=<object object>, available=<object object>, limit=None, page_size=None)[source]¶ Lists ActivityInstance records from the API as a list. Unlike stream(), this operation is eager and will load limit records into memory before returning.
Parameters: - friendly_name (unicode) – The friendly_name of the Activity resources to read
- available (unicode) – Whether to return activities that are available or unavailable
- limit (int) – Upper limit for the number of records to return. list() guarantees never to return more than limit. Default is no limit
- page_size (int) – Number of records to fetch per request, when not set will use the default value of 50 records. If no page_size is defined but a limit is defined, list() will attempt to read the limit with the most efficient page size, i.e. min(limit, 1000)
Returns: Generator that will yield up to limit results
Return type: list[twilio.rest.taskrouter.v1.workspace.activity.ActivityInstance]
-
page
(friendly_name=<object object>, available=<object object>, page_token=<object object>, page_number=<object object>, page_size=<object object>)[source]¶ Retrieve a single page of ActivityInstance records from the API. Request is executed immediately
Parameters: - friendly_name (unicode) – The friendly_name of the Activity resources to read
- available (unicode) – Whether to return activities that are available or unavailable
- page_token (str) – PageToken provided by the API
- page_number (int) – Page Number, this value is simply for client state
- page_size (int) – Number of records to return, defaults to 50
Returns: Page of ActivityInstance
Return type:
-
stream
(friendly_name=<object object>, available=<object object>, limit=None, page_size=None)[source]¶ Streams ActivityInstance records from the API as a generator stream. This operation lazily loads records as efficiently as possible until the limit is reached. The results are returned as a generator, so this operation is memory efficient.
Parameters: - friendly_name (unicode) – The friendly_name of the Activity resources to read
- available (unicode) – Whether to return activities that are available or unavailable
- limit (int) – Upper limit for the number of records to return. stream() guarantees to never return more than limit. Default is no limit
- page_size (int) – Number of records to fetch per request, when not set will use the default value of 50 records. If no page_size is defined but a limit is defined, stream() will attempt to read the limit with the most efficient page size, i.e. min(limit, 1000)
Returns: Generator that will yield up to limit results
Return type: list[twilio.rest.taskrouter.v1.workspace.activity.ActivityInstance]
-
-
class
twilio.rest.taskrouter.v1.workspace.activity.
ActivityPage
(version, response, solution)[source]¶ Bases:
twilio.base.page.Page
-
get_instance
(payload)[source]¶ Build an instance of ActivityInstance
Parameters: payload (dict) – Payload response from the API Returns: twilio.rest.taskrouter.v1.workspace.activity.ActivityInstance Return type: twilio.rest.taskrouter.v1.workspace.activity.ActivityInstance
-
twilio.rest.taskrouter.v1.workspace.event module¶
This code was generated by / _ _ _| _ _
(_)/(_)(_|/| |(/_ v1.0.0 / /
-
class
twilio.rest.taskrouter.v1.workspace.event.
EventContext
(version, workspace_sid, sid)[source]¶ Bases:
twilio.base.instance_context.InstanceContext
-
fetch
()[source]¶ Fetch the EventInstance
Returns: The fetched EventInstance Return type: twilio.rest.taskrouter.v1.workspace.event.EventInstance
-
-
class
twilio.rest.taskrouter.v1.workspace.event.
EventInstance
(version, payload, workspace_sid, sid=None)[source]¶ Bases:
twilio.base.instance_resource.InstanceResource
-
account_sid
¶ Returns: The SID of the Account that created the resource Return type: unicode
-
actor_sid
¶ Returns: The SID of the resource that triggered the event Return type: unicode
-
actor_type
¶ Returns: The type of resource that triggered the event Return type: unicode
-
actor_url
¶ Returns: The absolute URL of the resource that triggered the event Return type: unicode
-
description
¶ Returns: A description of the event Return type: unicode
-
event_date
¶ Returns: The time the event was sent Return type: datetime
-
event_date_ms
¶ Returns: The time the event was sent in milliseconds Return type: unicode
-
event_type
¶ Returns: The identifier for the event Return type: unicode
-
fetch
()[source]¶ Fetch the EventInstance
Returns: The fetched EventInstance Return type: twilio.rest.taskrouter.v1.workspace.event.EventInstance
-
resource_sid
¶ Returns: The SID of the object the event is most relevant to Return type: unicode
-
resource_type
¶ Returns: The type of object the event is most relevant to Return type: unicode
-
resource_url
¶ Returns: The URL of the resource the event is most relevant to Return type: unicode
-
sid
¶ Returns: The unique string that identifies the resource Return type: unicode
-
source
¶ Returns: Where the Event originated Return type: unicode
-
source_ip_address
¶ Returns: The IP from which the Event originated Return type: unicode
-
url
¶ Returns: The absolute URL of the Event resource Return type: unicode
-
workspace_sid
¶ Returns: The SID of the Workspace that contains the Event Return type: unicode
-
-
class
twilio.rest.taskrouter.v1.workspace.event.
EventList
(version, workspace_sid)[source]¶ Bases:
twilio.base.list_resource.ListResource
-
get
(sid)[source]¶ Constructs a EventContext
Parameters: sid – The SID of the resource to fetch Returns: twilio.rest.taskrouter.v1.workspace.event.EventContext Return type: twilio.rest.taskrouter.v1.workspace.event.EventContext
-
get_page
(target_url)[source]¶ Retrieve a specific page of EventInstance records from the API. Request is executed immediately
Parameters: target_url (str) – API-generated URL for the requested results page Returns: Page of EventInstance Return type: twilio.rest.taskrouter.v1.workspace.event.EventPage
-
list
(end_date=<object object>, event_type=<object object>, minutes=<object object>, reservation_sid=<object object>, start_date=<object object>, task_queue_sid=<object object>, task_sid=<object object>, worker_sid=<object object>, workflow_sid=<object object>, task_channel=<object object>, sid=<object object>, limit=None, page_size=None)[source]¶ Lists EventInstance records from the API as a list. Unlike stream(), this operation is eager and will load limit records into memory before returning.
Parameters: - end_date (datetime) – Only include usage that occurred on or before this date
- event_type (unicode) – The type of Events to read
- minutes (unicode) – The period of events to read in minutes
- reservation_sid (unicode) – The SID of the Reservation with the Events to read
- start_date (datetime) – Only include Events from on or after this date
- task_queue_sid (unicode) – The SID of the TaskQueue with the Events to read
- task_sid (unicode) – The SID of the Task with the Events to read
- worker_sid (unicode) – The SID of the Worker with the Events to read
- workflow_sid (unicode) – The SID of the Worker with the Events to read
- task_channel (unicode) – The TaskChannel with the Events to read
- sid (unicode) – The unique string that identifies the resource
- limit (int) – Upper limit for the number of records to return. list() guarantees never to return more than limit. Default is no limit
- page_size (int) – Number of records to fetch per request, when not set will use the default value of 50 records. If no page_size is defined but a limit is defined, list() will attempt to read the limit with the most efficient page size, i.e. min(limit, 1000)
Returns: Generator that will yield up to limit results
Return type: list[twilio.rest.taskrouter.v1.workspace.event.EventInstance]
-
page
(end_date=<object object>, event_type=<object object>, minutes=<object object>, reservation_sid=<object object>, start_date=<object object>, task_queue_sid=<object object>, task_sid=<object object>, worker_sid=<object object>, workflow_sid=<object object>, task_channel=<object object>, sid=<object object>, page_token=<object object>, page_number=<object object>, page_size=<object object>)[source]¶ Retrieve a single page of EventInstance records from the API. Request is executed immediately
Parameters: - end_date (datetime) – Only include usage that occurred on or before this date
- event_type (unicode) – The type of Events to read
- minutes (unicode) – The period of events to read in minutes
- reservation_sid (unicode) – The SID of the Reservation with the Events to read
- start_date (datetime) – Only include Events from on or after this date
- task_queue_sid (unicode) – The SID of the TaskQueue with the Events to read
- task_sid (unicode) – The SID of the Task with the Events to read
- worker_sid (unicode) – The SID of the Worker with the Events to read
- workflow_sid (unicode) – The SID of the Worker with the Events to read
- task_channel (unicode) – The TaskChannel with the Events to read
- sid (unicode) – The unique string that identifies the resource
- page_token (str) – PageToken provided by the API
- page_number (int) – Page Number, this value is simply for client state
- page_size (int) – Number of records to return, defaults to 50
Returns: Page of EventInstance
Return type:
-
stream
(end_date=<object object>, event_type=<object object>, minutes=<object object>, reservation_sid=<object object>, start_date=<object object>, task_queue_sid=<object object>, task_sid=<object object>, worker_sid=<object object>, workflow_sid=<object object>, task_channel=<object object>, sid=<object object>, limit=None, page_size=None)[source]¶ Streams EventInstance records from the API as a generator stream. This operation lazily loads records as efficiently as possible until the limit is reached. The results are returned as a generator, so this operation is memory efficient.
Parameters: - end_date (datetime) – Only include usage that occurred on or before this date
- event_type (unicode) – The type of Events to read
- minutes (unicode) – The period of events to read in minutes
- reservation_sid (unicode) – The SID of the Reservation with the Events to read
- start_date (datetime) – Only include Events from on or after this date
- task_queue_sid (unicode) – The SID of the TaskQueue with the Events to read
- task_sid (unicode) – The SID of the Task with the Events to read
- worker_sid (unicode) – The SID of the Worker with the Events to read
- workflow_sid (unicode) – The SID of the Worker with the Events to read
- task_channel (unicode) – The TaskChannel with the Events to read
- sid (unicode) – The unique string that identifies the resource
- limit (int) – Upper limit for the number of records to return. stream() guarantees to never return more than limit. Default is no limit
- page_size (int) – Number of records to fetch per request, when not set will use the default value of 50 records. If no page_size is defined but a limit is defined, stream() will attempt to read the limit with the most efficient page size, i.e. min(limit, 1000)
Returns: Generator that will yield up to limit results
Return type: list[twilio.rest.taskrouter.v1.workspace.event.EventInstance]
-
-
class
twilio.rest.taskrouter.v1.workspace.event.
EventPage
(version, response, solution)[source]¶ Bases:
twilio.base.page.Page
-
get_instance
(payload)[source]¶ Build an instance of EventInstance
Parameters: payload (dict) – Payload response from the API Returns: twilio.rest.taskrouter.v1.workspace.event.EventInstance Return type: twilio.rest.taskrouter.v1.workspace.event.EventInstance
-
twilio.rest.taskrouter.v1.workspace.task_channel module¶
This code was generated by / _ _ _| _ _
(_)/(_)(_|/| |(/_ v1.0.0 / /
-
class
twilio.rest.taskrouter.v1.workspace.task_channel.
TaskChannelContext
(version, workspace_sid, sid)[source]¶ Bases:
twilio.base.instance_context.InstanceContext
-
delete
()[source]¶ Deletes the TaskChannelInstance
Returns: True if delete succeeds, False otherwise Return type: bool
-
fetch
()[source]¶ Fetch the TaskChannelInstance
Returns: The fetched TaskChannelInstance Return type: twilio.rest.taskrouter.v1.workspace.task_channel.TaskChannelInstance
-
update
(friendly_name=<object object>, channel_optimized_routing=<object object>)[source]¶ Update the TaskChannelInstance
Parameters: - friendly_name (unicode) – A string to describe the Task Channel resource
- channel_optimized_routing (bool) – Whether the TaskChannel should prioritize Workers that have been idle
Returns: The updated TaskChannelInstance
Return type: twilio.rest.taskrouter.v1.workspace.task_channel.TaskChannelInstance
-
-
class
twilio.rest.taskrouter.v1.workspace.task_channel.
TaskChannelInstance
(version, payload, workspace_sid, sid=None)[source]¶ Bases:
twilio.base.instance_resource.InstanceResource
-
account_sid
¶ Returns: The SID of the Account that created the resource Return type: unicode
-
channel_optimized_routing
¶ Returns: Whether the Task Channel will prioritize Workers that have been idle Return type: bool
-
date_created
¶ Returns: The ISO 8601 date and time in GMT when the resource was created Return type: datetime
-
date_updated
¶ Returns: The ISO 8601 date and time in GMT when the resource was last updated Return type: datetime
-
delete
()[source]¶ Deletes the TaskChannelInstance
Returns: True if delete succeeds, False otherwise Return type: bool
-
fetch
()[source]¶ Fetch the TaskChannelInstance
Returns: The fetched TaskChannelInstance Return type: twilio.rest.taskrouter.v1.workspace.task_channel.TaskChannelInstance
-
friendly_name
¶ Returns: The string that you assigned to describe the resource Return type: unicode
-
links
¶ Returns: The URLs of related resources Return type: unicode
-
sid
¶ Returns: The unique string that identifies the resource Return type: unicode
-
unique_name
¶ Returns: An application-defined string that uniquely identifies the Task Channel Return type: unicode
-
update
(friendly_name=<object object>, channel_optimized_routing=<object object>)[source]¶ Update the TaskChannelInstance
Parameters: - friendly_name (unicode) – A string to describe the Task Channel resource
- channel_optimized_routing (bool) – Whether the TaskChannel should prioritize Workers that have been idle
Returns: The updated TaskChannelInstance
Return type: twilio.rest.taskrouter.v1.workspace.task_channel.TaskChannelInstance
-
url
¶ Returns: The absolute URL of the Task Channel resource Return type: unicode
-
workspace_sid
¶ Returns: The SID of the Workspace that contains the Task Channel Return type: unicode
-
-
class
twilio.rest.taskrouter.v1.workspace.task_channel.
TaskChannelList
(version, workspace_sid)[source]¶ Bases:
twilio.base.list_resource.ListResource
-
create
(friendly_name, unique_name, channel_optimized_routing=<object object>)[source]¶ Create the TaskChannelInstance
Parameters: - friendly_name (unicode) – A string to describe the Task Channel resource
- unique_name (unicode) – An application-defined string that uniquely identifies the Task Channel
- channel_optimized_routing (bool) – Whether the Task Channel should prioritize Workers that have been idle
Returns: The created TaskChannelInstance
Return type: twilio.rest.taskrouter.v1.workspace.task_channel.TaskChannelInstance
-
get
(sid)[source]¶ Constructs a TaskChannelContext
Parameters: sid – The SID of the Task Channel resource to fetch Returns: twilio.rest.taskrouter.v1.workspace.task_channel.TaskChannelContext Return type: twilio.rest.taskrouter.v1.workspace.task_channel.TaskChannelContext
-
get_page
(target_url)[source]¶ Retrieve a specific page of TaskChannelInstance records from the API. Request is executed immediately
Parameters: target_url (str) – API-generated URL for the requested results page Returns: Page of TaskChannelInstance Return type: twilio.rest.taskrouter.v1.workspace.task_channel.TaskChannelPage
-
list
(limit=None, page_size=None)[source]¶ Lists TaskChannelInstance records from the API as a list. Unlike stream(), this operation is eager and will load limit records into memory before returning.
Parameters: - limit (int) – Upper limit for the number of records to return. list() guarantees never to return more than limit. Default is no limit
- page_size (int) – Number of records to fetch per request, when not set will use the default value of 50 records. If no page_size is defined but a limit is defined, list() will attempt to read the limit with the most efficient page size, i.e. min(limit, 1000)
Returns: Generator that will yield up to limit results
Return type: list[twilio.rest.taskrouter.v1.workspace.task_channel.TaskChannelInstance]
-
page
(page_token=<object object>, page_number=<object object>, page_size=<object object>)[source]¶ Retrieve a single page of TaskChannelInstance records from the API. Request is executed immediately
Parameters: Returns: Page of TaskChannelInstance
Return type: twilio.rest.taskrouter.v1.workspace.task_channel.TaskChannelPage
-
stream
(limit=None, page_size=None)[source]¶ Streams TaskChannelInstance records from the API as a generator stream. This operation lazily loads records as efficiently as possible until the limit is reached. The results are returned as a generator, so this operation is memory efficient.
Parameters: - limit (int) – Upper limit for the number of records to return. stream() guarantees to never return more than limit. Default is no limit
- page_size (int) – Number of records to fetch per request, when not set will use the default value of 50 records. If no page_size is defined but a limit is defined, stream() will attempt to read the limit with the most efficient page size, i.e. min(limit, 1000)
Returns: Generator that will yield up to limit results
Return type: list[twilio.rest.taskrouter.v1.workspace.task_channel.TaskChannelInstance]
-
-
class
twilio.rest.taskrouter.v1.workspace.task_channel.
TaskChannelPage
(version, response, solution)[source]¶ Bases:
twilio.base.page.Page
-
get_instance
(payload)[source]¶ Build an instance of TaskChannelInstance
Parameters: payload (dict) – Payload response from the API Returns: twilio.rest.taskrouter.v1.workspace.task_channel.TaskChannelInstance Return type: twilio.rest.taskrouter.v1.workspace.task_channel.TaskChannelInstance
-
twilio.rest.taskrouter.v1.workspace.workspace_cumulative_statistics module¶
This code was generated by / _ _ _| _ _
(_)/(_)(_|/| |(/_ v1.0.0 / /
-
class
twilio.rest.taskrouter.v1.workspace.workspace_cumulative_statistics.
WorkspaceCumulativeStatisticsContext
(version, workspace_sid)[source]¶ Bases:
twilio.base.instance_context.InstanceContext
-
fetch
(end_date=<object object>, minutes=<object object>, start_date=<object object>, task_channel=<object object>, split_by_wait_time=<object object>)[source]¶ Fetch the WorkspaceCumulativeStatisticsInstance
Parameters: - end_date (datetime) – Only include usage that occurred on or before this date
- minutes (unicode) – Only calculate statistics since this many minutes in the past
- start_date (datetime) – Only calculate statistics from on or after this date
- task_channel (unicode) – Only calculate cumulative statistics on this TaskChannel
- split_by_wait_time (unicode) – A comma separated list of values that describes the thresholds, in seconds, to calculate statistics on
Returns: The fetched WorkspaceCumulativeStatisticsInstance
Return type:
-
-
class
twilio.rest.taskrouter.v1.workspace.workspace_cumulative_statistics.
WorkspaceCumulativeStatisticsInstance
(version, payload, workspace_sid)[source]¶ Bases:
twilio.base.instance_resource.InstanceResource
-
account_sid
¶ Returns: The SID of the Account that created the resource Return type: unicode
-
avg_task_acceptance_time
¶ Returns: The average time in seconds between Task creation and acceptance Return type: unicode
-
end_time
¶ Returns: The end of the interval during which these statistics were calculated Return type: datetime
-
fetch
(end_date=<object object>, minutes=<object object>, start_date=<object object>, task_channel=<object object>, split_by_wait_time=<object object>)[source]¶ Fetch the WorkspaceCumulativeStatisticsInstance
Parameters: - end_date (datetime) – Only include usage that occurred on or before this date
- minutes (unicode) – Only calculate statistics since this many minutes in the past
- start_date (datetime) – Only calculate statistics from on or after this date
- task_channel (unicode) – Only calculate cumulative statistics on this TaskChannel
- split_by_wait_time (unicode) – A comma separated list of values that describes the thresholds, in seconds, to calculate statistics on
Returns: The fetched WorkspaceCumulativeStatisticsInstance
Return type:
-
reservations_accepted
¶ Returns: The total number of Reservations accepted by Workers Return type: unicode
-
reservations_canceled
¶ Returns: The total number of Reservations that were canceled Return type: unicode
-
reservations_created
¶ Returns: The total number of Reservations that were created for Workers Return type: unicode
-
reservations_rejected
¶ Returns: The total number of Reservations that were rejected Return type: unicode
-
reservations_rescinded
¶ Returns: The total number of Reservations that were rescinded Return type: unicode
-
reservations_timed_out
¶ Returns: The total number of Reservations that were timed out Return type: unicode
-
split_by_wait_time
¶ Returns: A list of objects that describe the Tasks canceled and reservations accepted above and below the specified thresholds Return type: dict
-
start_time
¶ Returns: The beginning of the interval during which these statistics were calculated Return type: datetime
-
tasks_canceled
¶ Returns: The total number of Tasks that were canceled Return type: unicode
-
tasks_completed
¶ Returns: The total number of Tasks that were completed Return type: unicode
-
tasks_created
¶ Returns: The total number of Tasks created Return type: unicode
-
tasks_deleted
¶ Returns: The total number of Tasks that were deleted Return type: unicode
-
tasks_moved
¶ Returns: The total number of Tasks that were moved from one queue to another Return type: unicode
-
tasks_timed_out_in_workflow
¶ Returns: The total number of Tasks that were timed out of their Workflows Return type: unicode
-
url
¶ Returns: The absolute URL of the Workspace statistics resource Return type: unicode
-
wait_duration_until_accepted
¶ Returns: The wait duration statistics for Tasks that were accepted Return type: dict
-
wait_duration_until_canceled
¶ Returns: The wait duration statistics for Tasks that were canceled Return type: dict
-
workspace_sid
¶ Returns: The SID of the Workspace Return type: unicode
-
-
class
twilio.rest.taskrouter.v1.workspace.workspace_cumulative_statistics.
WorkspaceCumulativeStatisticsList
(version, workspace_sid)[source]¶ Bases:
twilio.base.list_resource.ListResource
-
get
()[source]¶ Constructs a WorkspaceCumulativeStatisticsContext
Returns: twilio.rest.taskrouter.v1.workspace.workspace_cumulative_statistics.WorkspaceCumulativeStatisticsContext Return type: twilio.rest.taskrouter.v1.workspace.workspace_cumulative_statistics.WorkspaceCumulativeStatisticsContext
-
-
class
twilio.rest.taskrouter.v1.workspace.workspace_cumulative_statistics.
WorkspaceCumulativeStatisticsPage
(version, response, solution)[source]¶ Bases:
twilio.base.page.Page
-
get_instance
(payload)[source]¶ Build an instance of WorkspaceCumulativeStatisticsInstance
Parameters: payload (dict) – Payload response from the API Returns: twilio.rest.taskrouter.v1.workspace.workspace_cumulative_statistics.WorkspaceCumulativeStatisticsInstance Return type: twilio.rest.taskrouter.v1.workspace.workspace_cumulative_statistics.WorkspaceCumulativeStatisticsInstance
-
twilio.rest.taskrouter.v1.workspace.workspace_real_time_statistics module¶
This code was generated by / _ _ _| _ _
(_)/(_)(_|/| |(/_ v1.0.0 / /
-
class
twilio.rest.taskrouter.v1.workspace.workspace_real_time_statistics.
WorkspaceRealTimeStatisticsContext
(version, workspace_sid)[source]¶ Bases:
twilio.base.instance_context.InstanceContext
-
fetch
(task_channel=<object object>)[source]¶ Fetch the WorkspaceRealTimeStatisticsInstance
Parameters: task_channel (unicode) – Only calculate real-time statistics on this TaskChannel Returns: The fetched WorkspaceRealTimeStatisticsInstance Return type: twilio.rest.taskrouter.v1.workspace.workspace_real_time_statistics.WorkspaceRealTimeStatisticsInstance
-
-
class
twilio.rest.taskrouter.v1.workspace.workspace_real_time_statistics.
WorkspaceRealTimeStatisticsInstance
(version, payload, workspace_sid)[source]¶ Bases:
twilio.base.instance_resource.InstanceResource
-
account_sid
¶ Returns: The SID of the Account that created the resource Return type: unicode
-
fetch
(task_channel=<object object>)[source]¶ Fetch the WorkspaceRealTimeStatisticsInstance
Parameters: task_channel (unicode) – Only calculate real-time statistics on this TaskChannel Returns: The fetched WorkspaceRealTimeStatisticsInstance Return type: twilio.rest.taskrouter.v1.workspace.workspace_real_time_statistics.WorkspaceRealTimeStatisticsInstance
-
longest_task_waiting_age
¶ Returns: The age of the longest waiting Task Return type: unicode
-
longest_task_waiting_sid
¶ Returns: The SID of the longest waiting Task Return type: unicode
-
total_tasks
¶ Returns: The total number of Tasks Return type: unicode
-
total_workers
¶ Returns: The total number of Workers in the Workspace Return type: unicode
-
url
¶ Returns: The absolute URL of the Workspace statistics resource Return type: unicode
-
workspace_sid
¶ Returns: The SID of the Workspace Return type: unicode
-
-
class
twilio.rest.taskrouter.v1.workspace.workspace_real_time_statistics.
WorkspaceRealTimeStatisticsList
(version, workspace_sid)[source]¶ Bases:
twilio.base.list_resource.ListResource
-
get
()[source]¶ Constructs a WorkspaceRealTimeStatisticsContext
Returns: twilio.rest.taskrouter.v1.workspace.workspace_real_time_statistics.WorkspaceRealTimeStatisticsContext Return type: twilio.rest.taskrouter.v1.workspace.workspace_real_time_statistics.WorkspaceRealTimeStatisticsContext
-
-
class
twilio.rest.taskrouter.v1.workspace.workspace_real_time_statistics.
WorkspaceRealTimeStatisticsPage
(version, response, solution)[source]¶ Bases:
twilio.base.page.Page
-
get_instance
(payload)[source]¶ Build an instance of WorkspaceRealTimeStatisticsInstance
Parameters: payload (dict) – Payload response from the API Returns: twilio.rest.taskrouter.v1.workspace.workspace_real_time_statistics.WorkspaceRealTimeStatisticsInstance Return type: twilio.rest.taskrouter.v1.workspace.workspace_real_time_statistics.WorkspaceRealTimeStatisticsInstance
-
twilio.rest.taskrouter.v1.workspace.workspace_statistics module¶
This code was generated by / _ _ _| _ _
(_)/(_)(_|/| |(/_ v1.0.0 / /
-
class
twilio.rest.taskrouter.v1.workspace.workspace_statistics.
WorkspaceStatisticsContext
(version, workspace_sid)[source]¶ Bases:
twilio.base.instance_context.InstanceContext
-
fetch
(minutes=<object object>, start_date=<object object>, end_date=<object object>, task_channel=<object object>, split_by_wait_time=<object object>)[source]¶ Fetch the WorkspaceStatisticsInstance
Parameters: - minutes (unicode) – Only calculate statistics since this many minutes in the past
- start_date (datetime) – Only calculate statistics from on or after this date
- end_date (datetime) – Only calculate statistics from this date and time and earlier
- task_channel (unicode) – Only calculate statistics on this TaskChannel.
- split_by_wait_time (unicode) – A comma separated list of values that describes the thresholds to calculate statistics on
Returns: The fetched WorkspaceStatisticsInstance
Return type: twilio.rest.taskrouter.v1.workspace.workspace_statistics.WorkspaceStatisticsInstance
-
-
class
twilio.rest.taskrouter.v1.workspace.workspace_statistics.
WorkspaceStatisticsInstance
(version, payload, workspace_sid)[source]¶ Bases:
twilio.base.instance_resource.InstanceResource
-
account_sid
¶ Returns: The SID of the Account that created the resource Return type: unicode
-
cumulative
¶ Returns: An object that contains the cumulative statistics for the Workspace Return type: dict
-
fetch
(minutes=<object object>, start_date=<object object>, end_date=<object object>, task_channel=<object object>, split_by_wait_time=<object object>)[source]¶ Fetch the WorkspaceStatisticsInstance
Parameters: - minutes (unicode) – Only calculate statistics since this many minutes in the past
- start_date (datetime) – Only calculate statistics from on or after this date
- end_date (datetime) – Only calculate statistics from this date and time and earlier
- task_channel (unicode) – Only calculate statistics on this TaskChannel.
- split_by_wait_time (unicode) – A comma separated list of values that describes the thresholds to calculate statistics on
Returns: The fetched WorkspaceStatisticsInstance
Return type: twilio.rest.taskrouter.v1.workspace.workspace_statistics.WorkspaceStatisticsInstance
-
realtime
¶ Returns: n object that contains the real-time statistics for the Workspace Return type: dict
-
url
¶ Returns: The absolute URL of the Workspace statistics resource Return type: unicode
-
workspace_sid
¶ Returns: The SID of the Workspace Return type: unicode
-
-
class
twilio.rest.taskrouter.v1.workspace.workspace_statistics.
WorkspaceStatisticsList
(version, workspace_sid)[source]¶ Bases:
twilio.base.list_resource.ListResource
-
get
()[source]¶ Constructs a WorkspaceStatisticsContext
Returns: twilio.rest.taskrouter.v1.workspace.workspace_statistics.WorkspaceStatisticsContext Return type: twilio.rest.taskrouter.v1.workspace.workspace_statistics.WorkspaceStatisticsContext
-
-
class
twilio.rest.taskrouter.v1.workspace.workspace_statistics.
WorkspaceStatisticsPage
(version, response, solution)[source]¶ Bases:
twilio.base.page.Page
-
get_instance
(payload)[source]¶ Build an instance of WorkspaceStatisticsInstance
Parameters: payload (dict) – Payload response from the API Returns: twilio.rest.taskrouter.v1.workspace.workspace_statistics.WorkspaceStatisticsInstance Return type: twilio.rest.taskrouter.v1.workspace.workspace_statistics.WorkspaceStatisticsInstance
-
Module contents¶
This code was generated by / _ _ _| _ _
(_)/(_)(_|/| |(/_ v1.0.0 / /
-
class
twilio.rest.taskrouter.v1.workspace.
WorkspaceContext
(version, sid)[source]¶ Bases:
twilio.base.instance_context.InstanceContext
-
activities
¶ Access the activities
Returns: twilio.rest.taskrouter.v1.workspace.activity.ActivityList Return type: twilio.rest.taskrouter.v1.workspace.activity.ActivityList
-
cumulative_statistics
¶ Access the cumulative_statistics
Returns: twilio.rest.taskrouter.v1.workspace.workspace_cumulative_statistics.WorkspaceCumulativeStatisticsList Return type: twilio.rest.taskrouter.v1.workspace.workspace_cumulative_statistics.WorkspaceCumulativeStatisticsList
-
delete
()[source]¶ Deletes the WorkspaceInstance
Returns: True if delete succeeds, False otherwise Return type: bool
-
events
¶ Access the events
Returns: twilio.rest.taskrouter.v1.workspace.event.EventList Return type: twilio.rest.taskrouter.v1.workspace.event.EventList
-
fetch
()[source]¶ Fetch the WorkspaceInstance
Returns: The fetched WorkspaceInstance Return type: twilio.rest.taskrouter.v1.workspace.WorkspaceInstance
-
real_time_statistics
¶ Access the real_time_statistics
Returns: twilio.rest.taskrouter.v1.workspace.workspace_real_time_statistics.WorkspaceRealTimeStatisticsList Return type: twilio.rest.taskrouter.v1.workspace.workspace_real_time_statistics.WorkspaceRealTimeStatisticsList
-
statistics
¶ Access the statistics
Returns: twilio.rest.taskrouter.v1.workspace.workspace_statistics.WorkspaceStatisticsList Return type: twilio.rest.taskrouter.v1.workspace.workspace_statistics.WorkspaceStatisticsList
-
task_channels
¶ Access the task_channels
Returns: twilio.rest.taskrouter.v1.workspace.task_channel.TaskChannelList Return type: twilio.rest.taskrouter.v1.workspace.task_channel.TaskChannelList
-
task_queues
¶ Access the task_queues
Returns: twilio.rest.taskrouter.v1.workspace.task_queue.TaskQueueList Return type: twilio.rest.taskrouter.v1.workspace.task_queue.TaskQueueList
-
tasks
¶ Access the tasks
Returns: twilio.rest.taskrouter.v1.workspace.task.TaskList Return type: twilio.rest.taskrouter.v1.workspace.task.TaskList
-
update
(default_activity_sid=<object object>, event_callback_url=<object object>, events_filter=<object object>, friendly_name=<object object>, multi_task_enabled=<object object>, timeout_activity_sid=<object object>, prioritize_queue_order=<object object>)[source]¶ Update the WorkspaceInstance
Parameters: - default_activity_sid (unicode) – The SID of the Activity that will be used when new Workers are created in the Workspace
- event_callback_url (unicode) – The URL we should call when an event occurs
- events_filter (unicode) – The list of Workspace events for which to call event_callback_url
- friendly_name (unicode) – A string to describe the Workspace resource
- multi_task_enabled (bool) – Whether multi-tasking is enabled
- timeout_activity_sid (unicode) – The SID of the Activity that will be assigned to a Worker when a Task reservation times out without a response
- prioritize_queue_order (WorkspaceInstance.QueueOrder) – The type of TaskQueue to prioritize when Workers are receiving Tasks from both types of TaskQueues
Returns: The updated WorkspaceInstance
Return type:
-
workers
¶ Access the workers
Returns: twilio.rest.taskrouter.v1.workspace.worker.WorkerList Return type: twilio.rest.taskrouter.v1.workspace.worker.WorkerList
-
workflows
¶ Access the workflows
Returns: twilio.rest.taskrouter.v1.workspace.workflow.WorkflowList Return type: twilio.rest.taskrouter.v1.workspace.workflow.WorkflowList
-
-
class
twilio.rest.taskrouter.v1.workspace.
WorkspaceInstance
(version, payload, sid=None)[source]¶ Bases:
twilio.base.instance_resource.InstanceResource
-
account_sid
¶ Returns: The SID of the Account that created the resource Return type: unicode
-
activities
¶ Access the activities
Returns: twilio.rest.taskrouter.v1.workspace.activity.ActivityList Return type: twilio.rest.taskrouter.v1.workspace.activity.ActivityList
-
cumulative_statistics
¶ Access the cumulative_statistics
Returns: twilio.rest.taskrouter.v1.workspace.workspace_cumulative_statistics.WorkspaceCumulativeStatisticsList Return type: twilio.rest.taskrouter.v1.workspace.workspace_cumulative_statistics.WorkspaceCumulativeStatisticsList
-
date_created
¶ Returns: The ISO 8601 date and time in GMT when the resource was created Return type: datetime
-
date_updated
¶ Returns: The ISO 8601 date and time in GMT when the resource was last updated Return type: datetime
-
default_activity_name
¶ Returns: The name of the default activity Return type: unicode
-
default_activity_sid
¶ Returns: The SID of the Activity that will be used when new Workers are created in the Workspace Return type: unicode
-
delete
()[source]¶ Deletes the WorkspaceInstance
Returns: True if delete succeeds, False otherwise Return type: bool
-
event_callback_url
¶ Returns: The URL we call when an event occurs Return type: unicode
-
events
¶ Access the events
Returns: twilio.rest.taskrouter.v1.workspace.event.EventList Return type: twilio.rest.taskrouter.v1.workspace.event.EventList
-
events_filter
¶ Returns: The list of Workspace events for which to call event_callback_url Return type: unicode
-
fetch
()[source]¶ Fetch the WorkspaceInstance
Returns: The fetched WorkspaceInstance Return type: twilio.rest.taskrouter.v1.workspace.WorkspaceInstance
-
friendly_name
¶ Returns: The string that you assigned to describe the Workspace resource Return type: unicode
-
links
¶ Returns: The URLs of related resources Return type: unicode
-
prioritize_queue_order
¶ Returns: The type of TaskQueue to prioritize when Workers are receiving Tasks from both types of TaskQueues Return type: WorkspaceInstance.QueueOrder
-
real_time_statistics
¶ Access the real_time_statistics
Returns: twilio.rest.taskrouter.v1.workspace.workspace_real_time_statistics.WorkspaceRealTimeStatisticsList Return type: twilio.rest.taskrouter.v1.workspace.workspace_real_time_statistics.WorkspaceRealTimeStatisticsList
-
sid
¶ Returns: The unique string that identifies the resource Return type: unicode
-
statistics
¶ Access the statistics
Returns: twilio.rest.taskrouter.v1.workspace.workspace_statistics.WorkspaceStatisticsList Return type: twilio.rest.taskrouter.v1.workspace.workspace_statistics.WorkspaceStatisticsList
-
task_channels
¶ Access the task_channels
Returns: twilio.rest.taskrouter.v1.workspace.task_channel.TaskChannelList Return type: twilio.rest.taskrouter.v1.workspace.task_channel.TaskChannelList
-
task_queues
¶ Access the task_queues
Returns: twilio.rest.taskrouter.v1.workspace.task_queue.TaskQueueList Return type: twilio.rest.taskrouter.v1.workspace.task_queue.TaskQueueList
-
tasks
¶ Access the tasks
Returns: twilio.rest.taskrouter.v1.workspace.task.TaskList Return type: twilio.rest.taskrouter.v1.workspace.task.TaskList
-
timeout_activity_name
¶ Returns: The name of the timeout activity Return type: unicode
-
timeout_activity_sid
¶ Returns: The SID of the Activity that will be assigned to a Worker when a Task reservation times out without a response Return type: unicode
-
update
(default_activity_sid=<object object>, event_callback_url=<object object>, events_filter=<object object>, friendly_name=<object object>, multi_task_enabled=<object object>, timeout_activity_sid=<object object>, prioritize_queue_order=<object object>)[source]¶ Update the WorkspaceInstance
Parameters: - default_activity_sid (unicode) – The SID of the Activity that will be used when new Workers are created in the Workspace
- event_callback_url (unicode) – The URL we should call when an event occurs
- events_filter (unicode) – The list of Workspace events for which to call event_callback_url
- friendly_name (unicode) – A string to describe the Workspace resource
- multi_task_enabled (bool) – Whether multi-tasking is enabled
- timeout_activity_sid (unicode) – The SID of the Activity that will be assigned to a Worker when a Task reservation times out without a response
- prioritize_queue_order (WorkspaceInstance.QueueOrder) – The type of TaskQueue to prioritize when Workers are receiving Tasks from both types of TaskQueues
Returns: The updated WorkspaceInstance
Return type:
-
url
¶ Returns: The absolute URL of the Workspace resource Return type: unicode
-
workers
¶ Access the workers
Returns: twilio.rest.taskrouter.v1.workspace.worker.WorkerList Return type: twilio.rest.taskrouter.v1.workspace.worker.WorkerList
-
workflows
¶ Access the workflows
Returns: twilio.rest.taskrouter.v1.workspace.workflow.WorkflowList Return type: twilio.rest.taskrouter.v1.workspace.workflow.WorkflowList
-
-
class
twilio.rest.taskrouter.v1.workspace.
WorkspaceList
(version)[source]¶ Bases:
twilio.base.list_resource.ListResource
-
create
(friendly_name, event_callback_url=<object object>, events_filter=<object object>, multi_task_enabled=<object object>, template=<object object>, prioritize_queue_order=<object object>)[source]¶ Create the WorkspaceInstance
Parameters: - friendly_name (unicode) – A string to describe the Workspace resource
- event_callback_url (unicode) – The URL we should call when an event occurs
- events_filter (unicode) – The list of Workspace events for which to call event_callback_url
- multi_task_enabled (bool) – Whether multi-tasking is enabled
- template (unicode) – An available template name
- prioritize_queue_order (WorkspaceInstance.QueueOrder) – The type of TaskQueue to prioritize when Workers are receiving Tasks from both types of TaskQueues
Returns: The created WorkspaceInstance
Return type:
-
get
(sid)[source]¶ Constructs a WorkspaceContext
Parameters: sid – The SID of the resource to fetch Returns: twilio.rest.taskrouter.v1.workspace.WorkspaceContext Return type: twilio.rest.taskrouter.v1.workspace.WorkspaceContext
-
get_page
(target_url)[source]¶ Retrieve a specific page of WorkspaceInstance records from the API. Request is executed immediately
Parameters: target_url (str) – API-generated URL for the requested results page Returns: Page of WorkspaceInstance Return type: twilio.rest.taskrouter.v1.workspace.WorkspacePage
-
list
(friendly_name=<object object>, limit=None, page_size=None)[source]¶ Lists WorkspaceInstance records from the API as a list. Unlike stream(), this operation is eager and will load limit records into memory before returning.
Parameters: - friendly_name (unicode) – The friendly_name of the Workspace resources to read
- limit (int) – Upper limit for the number of records to return. list() guarantees never to return more than limit. Default is no limit
- page_size (int) – Number of records to fetch per request, when not set will use the default value of 50 records. If no page_size is defined but a limit is defined, list() will attempt to read the limit with the most efficient page size, i.e. min(limit, 1000)
Returns: Generator that will yield up to limit results
Return type:
-
page
(friendly_name=<object object>, page_token=<object object>, page_number=<object object>, page_size=<object object>)[source]¶ Retrieve a single page of WorkspaceInstance records from the API. Request is executed immediately
Parameters: Returns: Page of WorkspaceInstance
Return type:
-
stream
(friendly_name=<object object>, limit=None, page_size=None)[source]¶ Streams WorkspaceInstance records from the API as a generator stream. This operation lazily loads records as efficiently as possible until the limit is reached. The results are returned as a generator, so this operation is memory efficient.
Parameters: - friendly_name (unicode) – The friendly_name of the Workspace resources to read
- limit (int) – Upper limit for the number of records to return. stream() guarantees to never return more than limit. Default is no limit
- page_size (int) – Number of records to fetch per request, when not set will use the default value of 50 records. If no page_size is defined but a limit is defined, stream() will attempt to read the limit with the most efficient page size, i.e. min(limit, 1000)
Returns: Generator that will yield up to limit results
Return type:
-
-
class
twilio.rest.taskrouter.v1.workspace.
WorkspacePage
(version, response, solution)[source]¶ Bases:
twilio.base.page.Page
-
get_instance
(payload)[source]¶ Build an instance of WorkspaceInstance
Parameters: payload (dict) – Payload response from the API Returns: twilio.rest.taskrouter.v1.workspace.WorkspaceInstance Return type: twilio.rest.taskrouter.v1.workspace.WorkspaceInstance
-