twilio.rest.taskrouter.v1.workspace.workflow package¶
Submodules¶
twilio.rest.taskrouter.v1.workspace.workflow.workflow_cumulative_statistics module¶
This code was generated by / _ _ _| _ _
(_)/(_)(_|/| |(/_ v1.0.0 / /
-
class
twilio.rest.taskrouter.v1.workspace.workflow.workflow_cumulative_statistics.
WorkflowCumulativeStatisticsContext
(version, workspace_sid, workflow_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 WorkflowCumulativeStatisticsInstance
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 WorkflowCumulativeStatisticsInstance
Return type:
-
-
class
twilio.rest.taskrouter.v1.workspace.workflow.workflow_cumulative_statistics.
WorkflowCumulativeStatisticsInstance
(version, payload, workspace_sid, workflow_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 WorkflowCumulativeStatisticsInstance
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 WorkflowCumulativeStatisticsInstance
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_deleted
¶ Returns: The total number of Tasks that were deleted Return type: unicode
-
tasks_entered
¶ Returns: The total number of Tasks that entered the Workflow 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 Workflow 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
-
workflow_sid
¶ Returns: Returns the list of Tasks that are being controlled by the Workflow with the specified Sid value Return type: unicode
-
workspace_sid
¶ Returns: The SID of the Workspace that contains the Workflow. Return type: unicode
-
-
class
twilio.rest.taskrouter.v1.workspace.workflow.workflow_cumulative_statistics.
WorkflowCumulativeStatisticsList
(version, workspace_sid, workflow_sid)[source]¶ Bases:
twilio.base.list_resource.ListResource
-
get
()[source]¶ Constructs a WorkflowCumulativeStatisticsContext
Returns: twilio.rest.taskrouter.v1.workspace.workflow.workflow_cumulative_statistics.WorkflowCumulativeStatisticsContext Return type: twilio.rest.taskrouter.v1.workspace.workflow.workflow_cumulative_statistics.WorkflowCumulativeStatisticsContext
-
-
class
twilio.rest.taskrouter.v1.workspace.workflow.workflow_cumulative_statistics.
WorkflowCumulativeStatisticsPage
(version, response, solution)[source]¶ Bases:
twilio.base.page.Page
-
get_instance
(payload)[source]¶ Build an instance of WorkflowCumulativeStatisticsInstance
Parameters: payload (dict) – Payload response from the API Returns: twilio.rest.taskrouter.v1.workspace.workflow.workflow_cumulative_statistics.WorkflowCumulativeStatisticsInstance Return type: twilio.rest.taskrouter.v1.workspace.workflow.workflow_cumulative_statistics.WorkflowCumulativeStatisticsInstance
-
twilio.rest.taskrouter.v1.workspace.workflow.workflow_real_time_statistics module¶
This code was generated by / _ _ _| _ _
(_)/(_)(_|/| |(/_ v1.0.0 / /
-
class
twilio.rest.taskrouter.v1.workspace.workflow.workflow_real_time_statistics.
WorkflowRealTimeStatisticsContext
(version, workspace_sid, workflow_sid)[source]¶ Bases:
twilio.base.instance_context.InstanceContext
-
fetch
(task_channel=<object object>)[source]¶ Fetch the WorkflowRealTimeStatisticsInstance
Parameters: task_channel (unicode) – Only calculate real-time statistics on this TaskChannel Returns: The fetched WorkflowRealTimeStatisticsInstance Return type: twilio.rest.taskrouter.v1.workspace.workflow.workflow_real_time_statistics.WorkflowRealTimeStatisticsInstance
-
-
class
twilio.rest.taskrouter.v1.workspace.workflow.workflow_real_time_statistics.
WorkflowRealTimeStatisticsInstance
(version, payload, workspace_sid, workflow_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 WorkflowRealTimeStatisticsInstance
Parameters: task_channel (unicode) – Only calculate real-time statistics on this TaskChannel Returns: The fetched WorkflowRealTimeStatisticsInstance Return type: twilio.rest.taskrouter.v1.workspace.workflow.workflow_real_time_statistics.WorkflowRealTimeStatisticsInstance
-
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
-
url
¶ Returns: The absolute URL of the Workflow statistics resource Return type: unicode
-
workflow_sid
¶ Returns: Returns the list of Tasks that are being controlled by the Workflow with the specified SID value Return type: unicode
-
workspace_sid
¶ Returns: The SID of the Workspace that contains the Workflow. Return type: unicode
-
-
class
twilio.rest.taskrouter.v1.workspace.workflow.workflow_real_time_statistics.
WorkflowRealTimeStatisticsList
(version, workspace_sid, workflow_sid)[source]¶ Bases:
twilio.base.list_resource.ListResource
-
get
()[source]¶ Constructs a WorkflowRealTimeStatisticsContext
Returns: twilio.rest.taskrouter.v1.workspace.workflow.workflow_real_time_statistics.WorkflowRealTimeStatisticsContext Return type: twilio.rest.taskrouter.v1.workspace.workflow.workflow_real_time_statistics.WorkflowRealTimeStatisticsContext
-
-
class
twilio.rest.taskrouter.v1.workspace.workflow.workflow_real_time_statistics.
WorkflowRealTimeStatisticsPage
(version, response, solution)[source]¶ Bases:
twilio.base.page.Page
-
get_instance
(payload)[source]¶ Build an instance of WorkflowRealTimeStatisticsInstance
Parameters: payload (dict) – Payload response from the API Returns: twilio.rest.taskrouter.v1.workspace.workflow.workflow_real_time_statistics.WorkflowRealTimeStatisticsInstance Return type: twilio.rest.taskrouter.v1.workspace.workflow.workflow_real_time_statistics.WorkflowRealTimeStatisticsInstance
-
twilio.rest.taskrouter.v1.workspace.workflow.workflow_statistics module¶
This code was generated by / _ _ _| _ _
(_)/(_)(_|/| |(/_ v1.0.0 / /
-
class
twilio.rest.taskrouter.v1.workspace.workflow.workflow_statistics.
WorkflowStatisticsContext
(version, workspace_sid, workflow_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 WorkflowStatisticsInstance
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 real-time 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 WorkflowStatisticsInstance
Return type: twilio.rest.taskrouter.v1.workspace.workflow.workflow_statistics.WorkflowStatisticsInstance
-
-
class
twilio.rest.taskrouter.v1.workspace.workflow.workflow_statistics.
WorkflowStatisticsInstance
(version, payload, workspace_sid, workflow_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 Workflow 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 WorkflowStatisticsInstance
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 real-time 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 WorkflowStatisticsInstance
Return type: twilio.rest.taskrouter.v1.workspace.workflow.workflow_statistics.WorkflowStatisticsInstance
-
realtime
¶ Returns: An object that contains the real-time statistics for the Workflow Return type: dict
-
url
¶ Returns: The absolute URL of the Workflow statistics resource Return type: unicode
-
workflow_sid
¶ Returns: Returns the list of Tasks that are being controlled by the Workflow with the specified SID value Return type: unicode
-
workspace_sid
¶ Returns: The SID of the Workspace that contains the Workflow Return type: unicode
-
-
class
twilio.rest.taskrouter.v1.workspace.workflow.workflow_statistics.
WorkflowStatisticsList
(version, workspace_sid, workflow_sid)[source]¶ Bases:
twilio.base.list_resource.ListResource
-
get
()[source]¶ Constructs a WorkflowStatisticsContext
Returns: twilio.rest.taskrouter.v1.workspace.workflow.workflow_statistics.WorkflowStatisticsContext Return type: twilio.rest.taskrouter.v1.workspace.workflow.workflow_statistics.WorkflowStatisticsContext
-
-
class
twilio.rest.taskrouter.v1.workspace.workflow.workflow_statistics.
WorkflowStatisticsPage
(version, response, solution)[source]¶ Bases:
twilio.base.page.Page
-
get_instance
(payload)[source]¶ Build an instance of WorkflowStatisticsInstance
Parameters: payload (dict) – Payload response from the API Returns: twilio.rest.taskrouter.v1.workspace.workflow.workflow_statistics.WorkflowStatisticsInstance Return type: twilio.rest.taskrouter.v1.workspace.workflow.workflow_statistics.WorkflowStatisticsInstance
-
Module contents¶
This code was generated by / _ _ _| _ _
(_)/(_)(_|/| |(/_ v1.0.0 / /
-
class
twilio.rest.taskrouter.v1.workspace.workflow.
WorkflowContext
(version, workspace_sid, sid)[source]¶ Bases:
twilio.base.instance_context.InstanceContext
-
cumulative_statistics
¶ Access the cumulative_statistics
Returns: twilio.rest.taskrouter.v1.workspace.workflow.workflow_cumulative_statistics.WorkflowCumulativeStatisticsList Return type: twilio.rest.taskrouter.v1.workspace.workflow.workflow_cumulative_statistics.WorkflowCumulativeStatisticsList
-
delete
()[source]¶ Deletes the WorkflowInstance
Returns: True if delete succeeds, False otherwise Return type: bool
-
fetch
()[source]¶ Fetch the WorkflowInstance
Returns: The fetched WorkflowInstance Return type: twilio.rest.taskrouter.v1.workspace.workflow.WorkflowInstance
-
real_time_statistics
¶ Access the real_time_statistics
Returns: twilio.rest.taskrouter.v1.workspace.workflow.workflow_real_time_statistics.WorkflowRealTimeStatisticsList Return type: twilio.rest.taskrouter.v1.workspace.workflow.workflow_real_time_statistics.WorkflowRealTimeStatisticsList
-
statistics
¶ Access the statistics
Returns: twilio.rest.taskrouter.v1.workspace.workflow.workflow_statistics.WorkflowStatisticsList Return type: twilio.rest.taskrouter.v1.workspace.workflow.workflow_statistics.WorkflowStatisticsList
-
update
(friendly_name=<object object>, assignment_callback_url=<object object>, fallback_assignment_callback_url=<object object>, configuration=<object object>, task_reservation_timeout=<object object>, re_evaluate_tasks=<object object>)[source]¶ Update the WorkflowInstance
Parameters: - friendly_name (unicode) – descriptive string that you create to describe the Workflow resource
- assignment_callback_url (unicode) – The URL from your application that will process task assignment events
- fallback_assignment_callback_url (unicode) – The URL that we should call when a call to the assignment_callback_url fails
- configuration (unicode) – A JSON string that contains the rules to apply to the Workflow
- task_reservation_timeout (unicode) – How long TaskRouter will wait for a confirmation response from your application after it assigns a Task to a Worker
- re_evaluate_tasks (unicode) – Whether or not to re-evaluate Tasks
Returns: The updated WorkflowInstance
Return type: twilio.rest.taskrouter.v1.workspace.workflow.WorkflowInstance
-
-
class
twilio.rest.taskrouter.v1.workspace.workflow.
WorkflowInstance
(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
-
assignment_callback_url
¶ Returns: The URL that we call when a task managed by the Workflow is assigned to a Worker Return type: unicode
-
configuration
¶ Returns: A JSON string that contains the Workflow’s configuration Return type: unicode
-
cumulative_statistics
¶ Access the cumulative_statistics
Returns: twilio.rest.taskrouter.v1.workspace.workflow.workflow_cumulative_statistics.WorkflowCumulativeStatisticsList Return type: twilio.rest.taskrouter.v1.workspace.workflow.workflow_cumulative_statistics.WorkflowCumulativeStatisticsList
-
date_created
¶ Returns: The RFC 2822 date and time in GMT when the resource was created Return type: datetime
-
date_updated
¶ Returns: The RFC 2822 date and time in GMT when the resource was last updated Return type: datetime
-
delete
()[source]¶ Deletes the WorkflowInstance
Returns: True if delete succeeds, False otherwise Return type: bool
-
document_content_type
¶ Returns: The MIME type of the document Return type: unicode
-
fallback_assignment_callback_url
¶ Returns: The URL that we call when a call to the assignment_callback_url fails Return type: unicode
-
fetch
()[source]¶ Fetch the WorkflowInstance
Returns: The fetched WorkflowInstance Return type: twilio.rest.taskrouter.v1.workspace.workflow.WorkflowInstance
-
friendly_name
¶ Returns: The string that you assigned to describe the Workflow resource Return type: unicode
-
links
¶ Returns: The URLs of related resources Return type: unicode
-
real_time_statistics
¶ Access the real_time_statistics
Returns: twilio.rest.taskrouter.v1.workspace.workflow.workflow_real_time_statistics.WorkflowRealTimeStatisticsList Return type: twilio.rest.taskrouter.v1.workspace.workflow.workflow_real_time_statistics.WorkflowRealTimeStatisticsList
-
sid
¶ Returns: The unique string that identifies the resource Return type: unicode
-
statistics
¶ Access the statistics
Returns: twilio.rest.taskrouter.v1.workspace.workflow.workflow_statistics.WorkflowStatisticsList Return type: twilio.rest.taskrouter.v1.workspace.workflow.workflow_statistics.WorkflowStatisticsList
-
task_reservation_timeout
¶ Returns: How long TaskRouter will wait for a confirmation response from your application after it assigns a Task to a Worker Return type: unicode
-
update
(friendly_name=<object object>, assignment_callback_url=<object object>, fallback_assignment_callback_url=<object object>, configuration=<object object>, task_reservation_timeout=<object object>, re_evaluate_tasks=<object object>)[source]¶ Update the WorkflowInstance
Parameters: - friendly_name (unicode) – descriptive string that you create to describe the Workflow resource
- assignment_callback_url (unicode) – The URL from your application that will process task assignment events
- fallback_assignment_callback_url (unicode) – The URL that we should call when a call to the assignment_callback_url fails
- configuration (unicode) – A JSON string that contains the rules to apply to the Workflow
- task_reservation_timeout (unicode) – How long TaskRouter will wait for a confirmation response from your application after it assigns a Task to a Worker
- re_evaluate_tasks (unicode) – Whether or not to re-evaluate Tasks
Returns: The updated WorkflowInstance
Return type: twilio.rest.taskrouter.v1.workspace.workflow.WorkflowInstance
-
url
¶ Returns: The absolute URL of the Workflow resource Return type: unicode
-
workspace_sid
¶ Returns: The SID of the Workspace that contains the Workflow Return type: unicode
-
-
class
twilio.rest.taskrouter.v1.workspace.workflow.
WorkflowList
(version, workspace_sid)[source]¶ Bases:
twilio.base.list_resource.ListResource
-
create
(friendly_name, configuration, assignment_callback_url=<object object>, fallback_assignment_callback_url=<object object>, task_reservation_timeout=<object object>)[source]¶ Create the WorkflowInstance
Parameters: - friendly_name (unicode) – descriptive string that you create to describe the Workflow resource
- configuration (unicode) – A JSON string that contains the rules to apply to the Workflow
- assignment_callback_url (unicode) – The URL from your application that will process task assignment events
- fallback_assignment_callback_url (unicode) – The URL that we should call when a call to the assignment_callback_url fails
- task_reservation_timeout (unicode) – How long TaskRouter will wait for a confirmation response from your application after it assigns a Task to a Worker
Returns: The created WorkflowInstance
Return type: twilio.rest.taskrouter.v1.workspace.workflow.WorkflowInstance
-
get
(sid)[source]¶ Constructs a WorkflowContext
Parameters: sid – The SID of the resource Returns: twilio.rest.taskrouter.v1.workspace.workflow.WorkflowContext Return type: twilio.rest.taskrouter.v1.workspace.workflow.WorkflowContext
-
get_page
(target_url)[source]¶ Retrieve a specific page of WorkflowInstance records from the API. Request is executed immediately
Parameters: target_url (str) – API-generated URL for the requested results page Returns: Page of WorkflowInstance Return type: twilio.rest.taskrouter.v1.workspace.workflow.WorkflowPage
-
list
(friendly_name=<object object>, limit=None, page_size=None)[source]¶ Lists WorkflowInstance 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 Workflow 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: list[twilio.rest.taskrouter.v1.workspace.workflow.WorkflowInstance]
-
page
(friendly_name=<object object>, page_token=<object object>, page_number=<object object>, page_size=<object object>)[source]¶ Retrieve a single page of WorkflowInstance records from the API. Request is executed immediately
Parameters: Returns: Page of WorkflowInstance
Return type:
-
stream
(friendly_name=<object object>, limit=None, page_size=None)[source]¶ Streams WorkflowInstance 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 Workflow 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: list[twilio.rest.taskrouter.v1.workspace.workflow.WorkflowInstance]
-
-
class
twilio.rest.taskrouter.v1.workspace.workflow.
WorkflowPage
(version, response, solution)[source]¶ Bases:
twilio.base.page.Page
-
get_instance
(payload)[source]¶ Build an instance of WorkflowInstance
Parameters: payload (dict) – Payload response from the API Returns: twilio.rest.taskrouter.v1.workspace.workflow.WorkflowInstance Return type: twilio.rest.taskrouter.v1.workspace.workflow.WorkflowInstance
-