メニュー

Rate this page:

Thanks for rating this page!

We are always striving to improve our documentation quality, and your feedback is valuable to us. How could this documentation serve you better?

Task

The Task resource represents the primary meaning of a user's text or speech when they interact with an Assistant.

Tasks should be modeled based on the intentions and tasks expected from end users. For instance, Tasks can be as simple as confirm or cancel actions or complex task-oriented actions like talk_to_sales or book_a_flight.

Once a Task is created, you should create Samples that define how people might express the task speaking naturally. A Task with Samples constitutes the core training data that creates your Assistant's Natural Language Understanding model.

All Autopilot REST API resources use the following base URL:

https://autopilot.twilio.com/v1

Task properties

Names in C# format
AccountSid
sid<AC> Not PII

The unique ID of the Account that created this Task.

DateCreated
date_time<iso8601> Not PII

The date that this resource was created

DateUpdated
date_time<iso8601> Not PII

The date that this resource was last updated

FriendlyName
文字列 Not PII

A user-provided string that identifies this resource. It is non-unique and can be up to 255 characters long.

Links
uri_map Not PII

AssistantSid
sid<UA> Not PII

The unique ID of the Assistant.

Sid
sid<UD> Not PII

A 34-character string that uniquely identifies this resource.

UniqueName
文字列 Not PII

A user-provided string that uniquely identifies this resource as an alternative to the sid. You can use the unique name in the URL path when updating this resource. Unique up to 64 characters long.

ActionsUrl
url Not PII

A user-provided HTTP endpoint where the assistant can fetch actions.

Url
url Not PII

Create a Task resource

post
https://autopilot.twilio.com/v1/Assistants/{AssistantSid}/Tasks

Creates a new Task resource for the Assistant specified with {AssistantSid} or {AssistantUniqueName}.

パラメーター
Names in None format
assistant_sid
必須
post sid_like<UA> Not PII

The unique ID of the Assistant.

unique_name
必須
post 文字列 Not PII

A user-provided string that uniquely identifies this resource as an alternative to the sid. Unique up to 64 characters long.

friendly_name
オプション
post 文字列 Not PII

A user-provided string that identifies this resource. It is non-unique and can be up to 255 characters long.

actions
オプション
post オブジェクト Not PII

A user-provided JSON object encoded as a string to specify the actions for this task. It is optional and non-unique.

actions_url
オプション
post url Not PII

User-provided HTTP endpoint where the assistant can fetch actions.

例 1
        
        
        
        
        例 2
              
              
              
              

              Fetch a Task resource

              GET
              https://autopilot.twilio.com/v1/Assistants/{AssistantSid}/Tasks/{Sid}

              Returns the Task instance identified by the {TaskSid}.

              パラメーター
              Names in None format
              assistant_sid
              必須
              GET sid_like<UA> Not PII

              The unique ID of the Assistant.

              sid
              必須
              GET sid_like<UD> Not PII

              A 34-character string that uniquely identifies this resource.

                    
                    
                    
                    

                    Read multiple Task resources

                    GET
                    https://autopilot.twilio.com/v1/Assistants/{AssistantSid}/Tasks

                    Returns a list of Tasks for this Assistant. The list includes paging information.

                    パラメーター
                    Names in None format
                    assistant_sid
                    必須
                    GET sid_like<UA> Not PII

                    The unique ID of the Assistant.

                    例 1
                          
                          
                          
                          

                          Update a Task resource

                          post
                          https://autopilot.twilio.com/v1/Assistants/{AssistantSid}/Tasks/{Sid}

                          Updates the Task instance identified by {TaskSid} or {TaskUniqueName}.

                          パラメーター
                          Names in None format
                          assistant_sid
                          必須
                          post sid_like<UA> Not PII

                          The unique ID of the Assistant.

                          sid
                          必須
                          post sid_like<UD> Not PII

                          A 34-character string that uniquely identifies this resource.

                          friendly_name
                          オプション
                          post 文字列 Not PII

                          A user-provided string that identifies this resource. It is non-unique and can be up to 255 characters long.

                          unique_name
                          オプション
                          post 文字列 Not PII

                          A user-provided string that uniquely identifies this resource as an alternative to the sid. You can use the unique name in the URL path when addressing this resource. Unique up to 64 characters long.

                          actions
                          オプション
                          post オブジェクト Not PII

                          A user-provided JSON object encoded as a string to specify the actions for this task. It is optional and non-unique.

                          actions_url
                          オプション
                          post url Not PII

                          User-provided HTTP endpoint where the assistant can fetch actions.

                          例 1
                                
                                
                                
                                
                                例 2
                                      
                                      
                                      
                                      

                                      Delete a Task resource

                                      削除する
                                      https://autopilot.twilio.com/v1/Assistants/{AssistantSid}/Tasks/{Sid}

                                      Deletes a Task.

                                      All Fields and Samples associated with the Task must be deleted before deleting the Task.

                                      パラメーター
                                      Names in None format
                                      assistant_sid
                                      必須
                                      削除する sid_like<UA> Not PII

                                      The unique ID of the Assistant.

                                      sid
                                      必須
                                      削除する sid_like<UD> Not PII

                                      A 34-character string that uniquely identifies this resource.

                                            
                                            
                                            
                                            
                                            Rate this page:

                                            ヘルプが必要ですか?

                                            We all do sometimes; code is hard. Get help now from our support team, or lean on the wisdom of the crowd browsing the Twilio tag on Stack Overflow.