twilio.rest.taskrouter.v1.workspace.task package

Submodules

twilio.rest.taskrouter.v1.workspace.task.reservation module

This code was generated by / _ _ _| _ _

(_)/(_)(_|/| |(/_ v1.0.0 / /
class twilio.rest.taskrouter.v1.workspace.task.reservation.ReservationContext(version, workspace_sid, task_sid, sid)[source]

Bases: twilio.base.instance_context.InstanceContext

fetch()[source]

Fetch the ReservationInstance

Returns:The fetched ReservationInstance
Return type:twilio.rest.taskrouter.v1.workspace.task.reservation.ReservationInstance
update(reservation_status=<object object>, worker_activity_sid=<object object>, instruction=<object object>, dequeue_post_work_activity_sid=<object object>, dequeue_from=<object object>, dequeue_record=<object object>, dequeue_timeout=<object object>, dequeue_to=<object object>, dequeue_status_callback_url=<object object>, call_from=<object object>, call_record=<object object>, call_timeout=<object object>, call_to=<object object>, call_url=<object object>, call_status_callback_url=<object object>, call_accept=<object object>, redirect_call_sid=<object object>, redirect_accept=<object object>, redirect_url=<object object>, to=<object object>, from_=<object object>, status_callback=<object object>, status_callback_method=<object object>, status_callback_event=<object object>, timeout=<object object>, record=<object object>, muted=<object object>, beep=<object object>, start_conference_on_enter=<object object>, end_conference_on_exit=<object object>, wait_url=<object object>, wait_method=<object object>, early_media=<object object>, max_participants=<object object>, conference_status_callback=<object object>, conference_status_callback_method=<object object>, conference_status_callback_event=<object object>, conference_record=<object object>, conference_trim=<object object>, recording_channels=<object object>, recording_status_callback=<object object>, recording_status_callback_method=<object object>, conference_recording_status_callback=<object object>, conference_recording_status_callback_method=<object object>, region=<object object>, sip_auth_username=<object object>, sip_auth_password=<object object>, dequeue_status_callback_event=<object object>, post_work_activity_sid=<object object>, supervisor_mode=<object object>, supervisor=<object object>, end_conference_on_customer_exit=<object object>, beep_on_customer_entrance=<object object>, if_match=<object object>)[source]

Update the ReservationInstance

Parameters:
  • reservation_status (ReservationInstance.Status) – The new status of the reservation
  • worker_activity_sid (unicode) – The new worker activity SID if rejecting a reservation
  • instruction (unicode) – The assignment instruction for reservation
  • dequeue_post_work_activity_sid (unicode) – The SID of the Activity resource to start after executing a Dequeue instruction
  • dequeue_from (unicode) – The Caller ID of the call to the worker when executing a Dequeue instruction
  • dequeue_record (unicode) – Whether to record both legs of a call when executing a Dequeue instruction
  • dequeue_timeout (unicode) – Timeout for call when executing a Dequeue instruction
  • dequeue_to (unicode) – The Contact URI of the worker when executing a Dequeue instruction
  • dequeue_status_callback_url (unicode) – The Callback URL for completed call event when executing a Dequeue instruction
  • call_from (unicode) – The Caller ID of the outbound call when executing a Call instruction
  • call_record (unicode) – Whether to record both legs of a call when executing a Call instruction
  • call_timeout (unicode) – Timeout for call when executing a Call instruction
  • call_to (unicode) – The Contact URI of the worker when executing a Call instruction
  • call_url (unicode) – TwiML URI executed on answering the worker’s leg as a result of the Call instruction
  • call_status_callback_url (unicode) – The URL to call for the completed call event when executing a Call instruction
  • call_accept (bool) – Whether to accept a reservation when executing a Call instruction
  • redirect_call_sid (unicode) – The Call SID of the call parked in the queue when executing a Redirect instruction
  • redirect_accept (bool) – Whether the reservation should be accepted when executing a Redirect instruction
  • redirect_url (unicode) – TwiML URI to redirect the call to when executing the Redirect instruction
  • to (unicode) – The Contact URI of the worker when executing a Conference instruction
  • from (unicode) – The Caller ID of the call to the worker when executing a Conference instruction
  • status_callback (unicode) – The URL we should call to send status information to your application
  • status_callback_method (unicode) – The HTTP method we should use to call status_callback
  • status_callback_event (list[ReservationInstance.CallStatus]) – The call progress events that we will send to status_callback
  • timeout (unicode) – Timeout for call when executing a Conference instruction
  • record (bool) – Whether to record the participant and their conferences
  • muted (bool) – Whether to mute the agent
  • beep (unicode) – Whether to play a notification beep when the participant joins
  • start_conference_on_enter (bool) – Whether the conference starts when the participant joins the conference
  • end_conference_on_exit (bool) – Whether to end the conference when the agent leaves
  • wait_url (unicode) – URL that hosts pre-conference hold music
  • wait_method (unicode) – The HTTP method we should use to call wait_url
  • early_media (bool) – Whether agents can hear the state of the outbound call
  • max_participants (unicode) – The maximum number of agent conference participants
  • conference_status_callback (unicode) – The callback URL for conference events
  • conference_status_callback_method (unicode) – HTTP method for requesting conference_status_callback URL
  • conference_status_callback_event (list[ReservationInstance.ConferenceEvent]) – The conference status events that we will send to conference_status_callback
  • conference_record (unicode) – Whether to record the conference the participant is joining
  • conference_trim (unicode) – How to trim leading and trailing silence from your recorded conference audio files
  • recording_channels (unicode) – Specify mono or dual recording channels
  • recording_status_callback (unicode) – The URL that we should call using the recording_status_callback_method when the recording status changes
  • recording_status_callback_method (unicode) – The HTTP method we should use when we call recording_status_callback
  • conference_recording_status_callback (unicode) – The URL we should call using the conference_recording_status_callback_method when the conference recording is available
  • conference_recording_status_callback_method (unicode) – The HTTP method we should use to call conference_recording_status_callback
  • region (unicode) – The region where we should mix the conference audio
  • sip_auth_username (unicode) – The SIP username used for authentication
  • sip_auth_password (unicode) – The SIP password for authentication
  • dequeue_status_callback_event (list[unicode]) – The Call progress events sent via webhooks as a result of a Dequeue instruction
  • post_work_activity_sid (unicode) – The new worker activity SID after executing a Conference instruction
  • supervisor_mode (ReservationInstance.SupervisorMode) – The Supervisor mode when executing the Supervise instruction
  • supervisor (unicode) – The Supervisor SID/URI when executing the Supervise instruction
  • end_conference_on_customer_exit (bool) – Whether to end the conference when the customer leaves
  • beep_on_customer_entrance (bool) – Whether to play a notification beep when the customer joins
  • if_match (unicode) – The If-Match HTTP request header
Returns:

The updated ReservationInstance

Return type:

twilio.rest.taskrouter.v1.workspace.task.reservation.ReservationInstance

class twilio.rest.taskrouter.v1.workspace.task.reservation.ReservationInstance(version, payload, workspace_sid, task_sid, sid=None)[source]

Bases: twilio.base.instance_resource.InstanceResource

class CallStatus[source]

Bases: object

ANSWERED = 'answered'
COMPLETED = 'completed'
INITIATED = 'initiated'
RINGING = 'ringing'
class ConferenceEvent[source]

Bases: object

END = 'end'
HOLD = 'hold'
JOIN = 'join'
LEAVE = 'leave'
MUTE = 'mute'
SPEAKER = 'speaker'
START = 'start'
class Status[source]

Bases: object

ACCEPTED = 'accepted'
CANCELED = 'canceled'
COMPLETED = 'completed'
PENDING = 'pending'
REJECTED = 'rejected'
RESCINDED = 'rescinded'
TIMEOUT = 'timeout'
WRAPPING = 'wrapping'
class SupervisorMode[source]

Bases: object

BARGE = 'barge'
MONITOR = 'monitor'
WHISPER = 'whisper'
account_sid
Returns:The SID of the Account that created the resource
Return type:unicode
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
fetch()[source]

Fetch the ReservationInstance

Returns:The fetched ReservationInstance
Return type:twilio.rest.taskrouter.v1.workspace.task.reservation.ReservationInstance
Returns:The URLs of related resources
Return type:unicode
reservation_status
Returns:The current status of the reservation
Return type:ReservationInstance.Status
sid
Returns:The unique string that identifies the resource
Return type:unicode
task_sid
Returns:The SID of the reserved Task resource
Return type:unicode
update(reservation_status=<object object>, worker_activity_sid=<object object>, instruction=<object object>, dequeue_post_work_activity_sid=<object object>, dequeue_from=<object object>, dequeue_record=<object object>, dequeue_timeout=<object object>, dequeue_to=<object object>, dequeue_status_callback_url=<object object>, call_from=<object object>, call_record=<object object>, call_timeout=<object object>, call_to=<object object>, call_url=<object object>, call_status_callback_url=<object object>, call_accept=<object object>, redirect_call_sid=<object object>, redirect_accept=<object object>, redirect_url=<object object>, to=<object object>, from_=<object object>, status_callback=<object object>, status_callback_method=<object object>, status_callback_event=<object object>, timeout=<object object>, record=<object object>, muted=<object object>, beep=<object object>, start_conference_on_enter=<object object>, end_conference_on_exit=<object object>, wait_url=<object object>, wait_method=<object object>, early_media=<object object>, max_participants=<object object>, conference_status_callback=<object object>, conference_status_callback_method=<object object>, conference_status_callback_event=<object object>, conference_record=<object object>, conference_trim=<object object>, recording_channels=<object object>, recording_status_callback=<object object>, recording_status_callback_method=<object object>, conference_recording_status_callback=<object object>, conference_recording_status_callback_method=<object object>, region=<object object>, sip_auth_username=<object object>, sip_auth_password=<object object>, dequeue_status_callback_event=<object object>, post_work_activity_sid=<object object>, supervisor_mode=<object object>, supervisor=<object object>, end_conference_on_customer_exit=<object object>, beep_on_customer_entrance=<object object>, if_match=<object object>)[source]

Update the ReservationInstance

Parameters:
  • reservation_status (ReservationInstance.Status) – The new status of the reservation
  • worker_activity_sid (unicode) – The new worker activity SID if rejecting a reservation
  • instruction (unicode) – The assignment instruction for reservation
  • dequeue_post_work_activity_sid (unicode) – The SID of the Activity resource to start after executing a Dequeue instruction
  • dequeue_from (unicode) – The Caller ID of the call to the worker when executing a Dequeue instruction
  • dequeue_record (unicode) – Whether to record both legs of a call when executing a Dequeue instruction
  • dequeue_timeout (unicode) – Timeout for call when executing a Dequeue instruction
  • dequeue_to (unicode) – The Contact URI of the worker when executing a Dequeue instruction
  • dequeue_status_callback_url (unicode) – The Callback URL for completed call event when executing a Dequeue instruction
  • call_from (unicode) – The Caller ID of the outbound call when executing a Call instruction
  • call_record (unicode) – Whether to record both legs of a call when executing a Call instruction
  • call_timeout (unicode) – Timeout for call when executing a Call instruction
  • call_to (unicode) – The Contact URI of the worker when executing a Call instruction
  • call_url (unicode) – TwiML URI executed on answering the worker’s leg as a result of the Call instruction
  • call_status_callback_url (unicode) – The URL to call for the completed call event when executing a Call instruction
  • call_accept (bool) – Whether to accept a reservation when executing a Call instruction
  • redirect_call_sid (unicode) – The Call SID of the call parked in the queue when executing a Redirect instruction
  • redirect_accept (bool) – Whether the reservation should be accepted when executing a Redirect instruction
  • redirect_url (unicode) – TwiML URI to redirect the call to when executing the Redirect instruction
  • to (unicode) – The Contact URI of the worker when executing a Conference instruction
  • from (unicode) – The Caller ID of the call to the worker when executing a Conference instruction
  • status_callback (unicode) – The URL we should call to send status information to your application
  • status_callback_method (unicode) – The HTTP method we should use to call status_callback
  • status_callback_event (list[ReservationInstance.CallStatus]) – The call progress events that we will send to status_callback
  • timeout (unicode) – Timeout for call when executing a Conference instruction
  • record (bool) – Whether to record the participant and their conferences
  • muted (bool) – Whether to mute the agent
  • beep (unicode) – Whether to play a notification beep when the participant joins
  • start_conference_on_enter (bool) – Whether the conference starts when the participant joins the conference
  • end_conference_on_exit (bool) – Whether to end the conference when the agent leaves
  • wait_url (unicode) – URL that hosts pre-conference hold music
  • wait_method (unicode) – The HTTP method we should use to call wait_url
  • early_media (bool) – Whether agents can hear the state of the outbound call
  • max_participants (unicode) – The maximum number of agent conference participants
  • conference_status_callback (unicode) – The callback URL for conference events
  • conference_status_callback_method (unicode) – HTTP method for requesting conference_status_callback URL
  • conference_status_callback_event (list[ReservationInstance.ConferenceEvent]) – The conference status events that we will send to conference_status_callback
  • conference_record (unicode) – Whether to record the conference the participant is joining
  • conference_trim (unicode) – How to trim leading and trailing silence from your recorded conference audio files
  • recording_channels (unicode) – Specify mono or dual recording channels
  • recording_status_callback (unicode) – The URL that we should call using the recording_status_callback_method when the recording status changes
  • recording_status_callback_method (unicode) – The HTTP method we should use when we call recording_status_callback
  • conference_recording_status_callback (unicode) – The URL we should call using the conference_recording_status_callback_method when the conference recording is available
  • conference_recording_status_callback_method (unicode) – The HTTP method we should use to call conference_recording_status_callback
  • region (unicode) – The region where we should mix the conference audio
  • sip_auth_username (unicode) – The SIP username used for authentication
  • sip_auth_password (unicode) – The SIP password for authentication
  • dequeue_status_callback_event (list[unicode]) – The Call progress events sent via webhooks as a result of a Dequeue instruction
  • post_work_activity_sid (unicode) – The new worker activity SID after executing a Conference instruction
  • supervisor_mode (ReservationInstance.SupervisorMode) – The Supervisor mode when executing the Supervise instruction
  • supervisor (unicode) – The Supervisor SID/URI when executing the Supervise instruction
  • end_conference_on_customer_exit (bool) – Whether to end the conference when the customer leaves
  • beep_on_customer_entrance (bool) – Whether to play a notification beep when the customer joins
  • if_match (unicode) – The If-Match HTTP request header
Returns:

The updated ReservationInstance

Return type:

twilio.rest.taskrouter.v1.workspace.task.reservation.ReservationInstance

url
Returns:The absolute URL of the TaskReservation reservation
Return type:unicode
worker_name
Returns:The friendly_name of the Worker that is reserved
Return type:unicode
worker_sid
Returns:The SID of the reserved Worker resource
Return type:unicode
workspace_sid
Returns:The SID of the Workspace that this task is contained within.
Return type:unicode
class twilio.rest.taskrouter.v1.workspace.task.reservation.ReservationList(version, workspace_sid, task_sid)[source]

Bases: twilio.base.list_resource.ListResource

get(sid)[source]

Constructs a ReservationContext

Parameters:sid – The SID of the TaskReservation resource to fetch
Returns:twilio.rest.taskrouter.v1.workspace.task.reservation.ReservationContext
Return type:twilio.rest.taskrouter.v1.workspace.task.reservation.ReservationContext
get_page(target_url)[source]

Retrieve a specific page of ReservationInstance records from the API. Request is executed immediately

Parameters:target_url (str) – API-generated URL for the requested results page
Returns:Page of ReservationInstance
Return type:twilio.rest.taskrouter.v1.workspace.task.reservation.ReservationPage
list(reservation_status=<object object>, limit=None, page_size=None)[source]

Lists ReservationInstance records from the API as a list. Unlike stream(), this operation is eager and will load limit records into memory before returning.

Parameters:
  • reservation_status (ReservationInstance.Status) – Returns the list of reservations for a task with a specified ReservationStatus
  • 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.reservation.ReservationInstance]

page(reservation_status=<object object>, page_token=<object object>, page_number=<object object>, page_size=<object object>)[source]

Retrieve a single page of ReservationInstance records from the API. Request is executed immediately

Parameters:
  • reservation_status (ReservationInstance.Status) – Returns the list of reservations for a task with a specified ReservationStatus
  • 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 ReservationInstance

Return type:

twilio.rest.taskrouter.v1.workspace.task.reservation.ReservationPage

stream(reservation_status=<object object>, limit=None, page_size=None)[source]

Streams ReservationInstance 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:
  • reservation_status (ReservationInstance.Status) – Returns the list of reservations for a task with a specified ReservationStatus
  • 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.reservation.ReservationInstance]

class twilio.rest.taskrouter.v1.workspace.task.reservation.ReservationPage(version, response, solution)[source]

Bases: twilio.base.page.Page

get_instance(payload)[source]

Build an instance of ReservationInstance

Parameters:payload (dict) – Payload response from the API
Returns:twilio.rest.taskrouter.v1.workspace.task.reservation.ReservationInstance
Return type:twilio.rest.taskrouter.v1.workspace.task.reservation.ReservationInstance

Module contents

This code was generated by / _ _ _| _ _

(_)/(_)(_|/| |(/_ v1.0.0 / /
class twilio.rest.taskrouter.v1.workspace.task.TaskContext(version, workspace_sid, sid)[source]

Bases: twilio.base.instance_context.InstanceContext

delete(if_match=<object object>)[source]

Deletes the TaskInstance

Parameters:if_match (unicode) – The If-Match HTTP request header
Returns:True if delete succeeds, False otherwise
Return type:bool
fetch()[source]

Fetch the TaskInstance

Returns:The fetched TaskInstance
Return type:twilio.rest.taskrouter.v1.workspace.task.TaskInstance
reservations

Access the reservations

Returns:twilio.rest.taskrouter.v1.workspace.task.reservation.ReservationList
Return type:twilio.rest.taskrouter.v1.workspace.task.reservation.ReservationList
update(attributes=<object object>, assignment_status=<object object>, reason=<object object>, priority=<object object>, task_channel=<object object>, if_match=<object object>)[source]

Update the TaskInstance

Parameters:
  • attributes (unicode) – The JSON string that describes the custom attributes of the task
  • assignment_status (TaskInstance.Status) – The new status of the task
  • reason (unicode) – The reason that the Task was canceled or complete
  • priority (unicode) – The Task’s new priority value
  • task_channel (unicode) – When MultiTasking is enabled, specify the TaskChannel with the task to update
  • if_match (unicode) – The If-Match HTTP request header
Returns:

The updated TaskInstance

Return type:

twilio.rest.taskrouter.v1.workspace.task.TaskInstance

class twilio.rest.taskrouter.v1.workspace.task.TaskInstance(version, payload, workspace_sid, sid=None)[source]

Bases: twilio.base.instance_resource.InstanceResource

class Status[source]

Bases: object

ASSIGNED = 'assigned'
CANCELED = 'canceled'
COMPLETED = 'completed'
PENDING = 'pending'
RESERVED = 'reserved'
WRAPPING = 'wrapping'
account_sid
Returns:The SID of the Account that created the resource
Return type:unicode
addons
Returns:An object that contains the addon data for all installed addons
Return type:unicode
age
Returns:The number of seconds since the Task was created
Return type:unicode
assignment_status
Returns:The current status of the Task’s assignment
Return type:TaskInstance.Status
attributes
Returns:The JSON string with custom attributes of the work
Return type:unicode
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(if_match=<object object>)[source]

Deletes the TaskInstance

Parameters:if_match (unicode) – The If-Match HTTP request header
Returns:True if delete succeeds, False otherwise
Return type:bool
fetch()[source]

Fetch the TaskInstance

Returns:The fetched TaskInstance
Return type:twilio.rest.taskrouter.v1.workspace.task.TaskInstance
Returns:The URLs of related resources
Return type:unicode
priority
Returns:Retrieve the list of all Tasks in the Workspace with the specified priority
Return type:unicode
reason
Returns:The reason the Task was canceled or completed
Return type:unicode
reservations

Access the reservations

Returns:twilio.rest.taskrouter.v1.workspace.task.reservation.ReservationList
Return type:twilio.rest.taskrouter.v1.workspace.task.reservation.ReservationList
sid
Returns:The unique string that identifies the resource
Return type:unicode
task_channel_sid
Returns:The SID of the TaskChannel
Return type:unicode
task_channel_unique_name
Returns:The unique name of the TaskChannel
Return type:unicode
task_queue_entered_date
Returns:The ISO 8601 date and time in GMT when the Task entered the TaskQueue.
Return type:datetime
task_queue_friendly_name
Returns:The friendly name of the TaskQueue
Return type:unicode
task_queue_sid
Returns:The SID of the TaskQueue
Return type:unicode
timeout
Returns:The amount of time in seconds that the Task can live before being assigned
Return type:unicode
update(attributes=<object object>, assignment_status=<object object>, reason=<object object>, priority=<object object>, task_channel=<object object>, if_match=<object object>)[source]

Update the TaskInstance

Parameters:
  • attributes (unicode) – The JSON string that describes the custom attributes of the task
  • assignment_status (TaskInstance.Status) – The new status of the task
  • reason (unicode) – The reason that the Task was canceled or complete
  • priority (unicode) – The Task’s new priority value
  • task_channel (unicode) – When MultiTasking is enabled, specify the TaskChannel with the task to update
  • if_match (unicode) – The If-Match HTTP request header
Returns:

The updated TaskInstance

Return type:

twilio.rest.taskrouter.v1.workspace.task.TaskInstance

url
Returns:The absolute URL of the Task resource
Return type:unicode
workflow_friendly_name
Returns:The friendly name of the Workflow that is controlling the Task
Return type:unicode
workflow_sid
Returns:The SID of the Workflow that is controlling the Task
Return type:unicode
workspace_sid
Returns:The SID of the Workspace that contains the Task
Return type:unicode
class twilio.rest.taskrouter.v1.workspace.task.TaskList(version, workspace_sid)[source]

Bases: twilio.base.list_resource.ListResource

create(timeout=<object object>, priority=<object object>, task_channel=<object object>, workflow_sid=<object object>, attributes=<object object>)[source]

Create the TaskInstance

Parameters:
  • timeout (unicode) – The amount of time in seconds the task can live before being assigned
  • priority (unicode) – The priority to assign the new task and override the default
  • task_channel (unicode) – When MultiTasking is enabled specify the TaskChannel by passing either its unique_name or SID
  • workflow_sid (unicode) – The SID of the Workflow that you would like to handle routing for the new Task
  • attributes (unicode) – A URL-encoded JSON string describing the attributes of the task
Returns:

The created TaskInstance

Return type:

twilio.rest.taskrouter.v1.workspace.task.TaskInstance

get(sid)[source]

Constructs a TaskContext

Parameters:sid – The SID of the resource to fetch
Returns:twilio.rest.taskrouter.v1.workspace.task.TaskContext
Return type:twilio.rest.taskrouter.v1.workspace.task.TaskContext
get_page(target_url)[source]

Retrieve a specific page of TaskInstance records from the API. Request is executed immediately

Parameters:target_url (str) – API-generated URL for the requested results page
Returns:Page of TaskInstance
Return type:twilio.rest.taskrouter.v1.workspace.task.TaskPage
list(priority=<object object>, assignment_status=<object object>, workflow_sid=<object object>, workflow_name=<object object>, task_queue_sid=<object object>, task_queue_name=<object object>, evaluate_task_attributes=<object object>, ordering=<object object>, has_addons=<object object>, limit=None, page_size=None)[source]

Lists TaskInstance records from the API as a list. Unlike stream(), this operation is eager and will load limit records into memory before returning.

Parameters:
  • priority (unicode) – The priority value of the Tasks to read
  • assignment_status (list[unicode]) – Returns the list of all Tasks in the Workspace with the specified assignment_status
  • workflow_sid (unicode) – The SID of the Workflow with the Tasks to read
  • workflow_name (unicode) – The friendly name of the Workflow with the Tasks to read
  • task_queue_sid (unicode) – The SID of the TaskQueue with the Tasks to read
  • task_queue_name (unicode) – The friendly_name of the TaskQueue with the Tasks to read
  • evaluate_task_attributes (unicode) – The task attributes of the Tasks to read
  • ordering (unicode) – Controls the order of the Tasks returned
  • has_addons (bool) – Whether to read Tasks with addons
  • 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.TaskInstance]

page(priority=<object object>, assignment_status=<object object>, workflow_sid=<object object>, workflow_name=<object object>, task_queue_sid=<object object>, task_queue_name=<object object>, evaluate_task_attributes=<object object>, ordering=<object object>, has_addons=<object object>, page_token=<object object>, page_number=<object object>, page_size=<object object>)[source]

Retrieve a single page of TaskInstance records from the API. Request is executed immediately

Parameters:
  • priority (unicode) – The priority value of the Tasks to read
  • assignment_status (list[unicode]) – Returns the list of all Tasks in the Workspace with the specified assignment_status
  • workflow_sid (unicode) – The SID of the Workflow with the Tasks to read
  • workflow_name (unicode) – The friendly name of the Workflow with the Tasks to read
  • task_queue_sid (unicode) – The SID of the TaskQueue with the Tasks to read
  • task_queue_name (unicode) – The friendly_name of the TaskQueue with the Tasks to read
  • evaluate_task_attributes (unicode) – The task attributes of the Tasks to read
  • ordering (unicode) – Controls the order of the Tasks returned
  • has_addons (bool) – Whether to read Tasks with addons
  • 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 TaskInstance

Return type:

twilio.rest.taskrouter.v1.workspace.task.TaskPage

stream(priority=<object object>, assignment_status=<object object>, workflow_sid=<object object>, workflow_name=<object object>, task_queue_sid=<object object>, task_queue_name=<object object>, evaluate_task_attributes=<object object>, ordering=<object object>, has_addons=<object object>, limit=None, page_size=None)[source]

Streams TaskInstance 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:
  • priority (unicode) – The priority value of the Tasks to read
  • assignment_status (list[unicode]) – Returns the list of all Tasks in the Workspace with the specified assignment_status
  • workflow_sid (unicode) – The SID of the Workflow with the Tasks to read
  • workflow_name (unicode) – The friendly name of the Workflow with the Tasks to read
  • task_queue_sid (unicode) – The SID of the TaskQueue with the Tasks to read
  • task_queue_name (unicode) – The friendly_name of the TaskQueue with the Tasks to read
  • evaluate_task_attributes (unicode) – The task attributes of the Tasks to read
  • ordering (unicode) – Controls the order of the Tasks returned
  • has_addons (bool) – Whether to read Tasks with addons
  • 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.TaskInstance]

class twilio.rest.taskrouter.v1.workspace.task.TaskPage(version, response, solution)[source]

Bases: twilio.base.page.Page

get_instance(payload)[source]

Build an instance of TaskInstance

Parameters:payload (dict) – Payload response from the API
Returns:twilio.rest.taskrouter.v1.workspace.task.TaskInstance
Return type:twilio.rest.taskrouter.v1.workspace.task.TaskInstance