Path parameters
-
The SID of the Workspace with the Tasks to read.
Query parameters
-
Priority integer
The priority value of the Tasks to read. Returns the list of all Tasks in the Workspace with the specified priority.
-
AssignmentStatus array[string]
The
assignment_status
of the Tasks you want to read. Can be:pending
,reserved
,assigned
,canceled
,wrapping
, orcompleted
. Returns all Tasks in the Workspace with the specifiedassignment_status
. -
WorkflowSid string
The SID of the Workflow with the Tasks to read. Returns the Tasks controlled by the Workflow identified by this SID.
-
WorkflowName string
The friendly name of the Workflow with the Tasks to read. Returns the Tasks controlled by the Workflow identified by this friendly name.
-
TaskQueueSid string
The SID of the TaskQueue with the Tasks to read. Returns the Tasks waiting in the TaskQueue identified by this SID.
-
TaskQueueName string
The
friendly_name
of the TaskQueue with the Tasks to read. Returns the Tasks waiting in the TaskQueue identified by this friendly name. -
EvaluateTaskAttributes string
The attributes of the Tasks to read. Returns the Tasks that match the attributes specified in this parameter.
-
Ordering string
How to order the returned Task resources. y default, Tasks are sorted by ascending DateCreated. This value is specified as:
Attribute:Order
, whereAttribute
can be eitherPriority
orDateCreated
andOrder
can be eitherasc
ordesc
. For example,Priority:desc
returns Tasks ordered in descending order of their Priority. Multiple sort orders can be specified in a comma-separated list such asPriority:desc,DateCreated:asc
, which returns the Tasks in descending Priority order and ascending DateCreated Order. -
HasAddons boolean
Whether to read Tasks with addons. If
true
, returns only Tasks with addons. Iffalse
, returns only Tasks without addons. -
PageSize integer
How many resources to return in each list page. The default is 50, and the maximum is 1000.
Minimum value is
1
, maximum value is1000
.
curl \
-X GET https://taskrouter.twilio.com/v1/Workspaces/{WorkspaceSid}/Tasks \
--user "username:password"
{
"meta": {
"first_page_url": "https://example.com",
"key": "string",
"next_page_url": "https://example.com",
"page": 42,
"page_size": 42,
"previous_page_url": "https://example.com",
"url": "https://example.com"
},
"tasks": [
{
"account_sid": "string",
"addons": "string",
"age": 42,
"assignment_status": "pending",
"attributes": "string",
"date_created": "2023-05-04T09:42:00+00:00",
"date_updated": "2023-05-04T09:42:00+00:00",
"links": {},
"priority": 42,
"reason": "string",
"sid": "string",
"task_channel_sid": "string",
"task_channel_unique_name": "string",
"task_queue_entered_date": "2023-05-04T09:42:00+00:00",
"task_queue_friendly_name": "string",
"task_queue_sid": "string",
"timeout": 42,
"url": "https://example.com",
"workflow_friendly_name": "string",
"workflow_sid": "string",
"workspace_sid": "string"
}
]
}
{
"meta": {
"first_page_url": "https://example.com",
"key": "string",
"next_page_url": "https://example.com",
"page": 42,
"page_size": 42,
"previous_page_url": "https://example.com",
"url": "https://example.com"
},
"tasks": [
{
"account_sid": "string",
"addons": "string",
"age": 42,
"assignment_status": "pending",
"attributes": "string",
"date_created": "2024-05-04T09:42:00+00:00",
"date_updated": "2024-05-04T09:42:00+00:00",
"links": {},
"priority": 42,
"reason": "string",
"sid": "string",
"task_channel_sid": "string",
"task_channel_unique_name": "string",
"task_queue_entered_date": "2024-05-04T09:42:00+00:00",
"task_queue_friendly_name": "string",
"task_queue_sid": "string",
"timeout": 42,
"url": "https://example.com",
"workflow_friendly_name": "string",
"workflow_sid": "string",
"workspace_sid": "string"
}
]
}