Task Channel Resource
Task Channels provide a mechanism to separate tasks of different types.
You can specify different concurrent capacity for tasks of each type. For example, one Worker might be able to handle 10 SMS Tasks at any given time, but only a single phone call Task. When MultiTasking is enabled, you can specify the task type by passing the Unique Name or SID of the Task Channel.
TaskChannel properties
Resource Properties in REST API format | |
---|---|
account_sid
|
The SID of the Account that created the Task Channel resource. |
date_created
|
The date and time in GMT when the resource was created specified in ISO 8601 format. |
date_updated
|
The date and time in GMT when the resource was last updated specified in ISO 8601 format. |
friendly_name
|
The string that you assigned to describe the resource. |
sid
|
The unique string that we created to identify the Task Channel resource. |
unique_name
|
An application-defined string that uniquely identifies the Task Channel, such as |
workspace_sid
|
The SID of the Workspace that contains the Task Channel. |
channel_optimized_routing
|
Whether the Task Channel will prioritize Workers that have been idle. When |
url
|
The absolute URL of the Task Channel resource. |
links
|
The URLs of related resources. |
Create a TaskChannel resource
https://taskrouter.twilio.com/v1/Workspaces/{WorkspaceSid}/TaskChannels
パラメーター
Parameters in REST API format | |
---|---|
workspace_sid
Path
|
The SID of the Workspace that the new Task Channel belongs to. |
friendly_name
必須
|
A descriptive string that you create to describe the Task Channel. It can be up to 64 characters long. |
unique_name
必須
|
An application-defined string that uniquely identifies the Task Channel, such as |
channel_optimized_routing
オプション
|
Whether the Task Channel should prioritize Workers that have been idle. If |
例 1
Fetch a TaskChannel resource
https://taskrouter.twilio.com/v1/Workspaces/{WorkspaceSid}/TaskChannels/{Sid}
パラメーター
Parameters in REST API format | |
---|---|
workspace_sid
Path
|
The SID of the Workspace with the Task Channel to fetch. |
sid
Path
|
The SID of the Task Channel resource to fetch. |
例 1
Read multiple TaskChannel resources
https://taskrouter.twilio.com/v1/Workspaces/{WorkspaceSid}/TaskChannels
パラメーター
Parameters in REST API format | |
---|---|
workspace_sid
Path
|
The SID of the Workspace with the Task Channel to read. |
例 1
Update a TaskChannel resource
https://taskrouter.twilio.com/v1/Workspaces/{WorkspaceSid}/TaskChannels/{Sid}
パラメーター
Parameters in REST API format | |
---|---|
workspace_sid
Path
|
The SID of the Workspace with the Task Channel to update. |
sid
Path
|
The SID of the Task Channel resource to update. |
friendly_name
オプション
|
A descriptive string that you create to describe the Task Channel. It can be up to 64 characters long. |
channel_optimized_routing
オプション
|
Whether the TaskChannel should prioritize Workers that have been idle. If |
例 1
Delete a TaskChannel resource
https://taskrouter.twilio.com/v1/Workspaces/{WorkspaceSid}/TaskChannels/{Sid}
パラメーター
Parameters in REST API format | |
---|---|
workspace_sid
Path
|
The SID of the Workspace with the Task Channel to delete. |
sid
Path
|
The SID of the Task Channel resource to delete. |
例 1
ヘルプが必要ですか?
誰しもが一度は考える「コーディングって難しい」。そんな時は、お問い合わせフォームから質問してください。 または、Stack Overflow でTwilioタグのついた情報から欲しいものを探してみましょう。