メニュー

Expand
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 PHP format
accountSid
sid<AC> Not PII

The SID of the Account that created the Task resource.

dateCreated
date_time<iso8601> Not PII

The date and time in GMT when the resource was created specified in RFC 2822 format.

dateUpdated
date_time<iso8601> Not PII

The date and time in GMT when the resource was last updated specified in RFC 2822 format.

friendlyName
文字列 Not PII

The string that you assigned to describe the resource. It is not unique and can be up to 255 characters long.

links
uri_map Not PII

A list of the URLs of related resources.

assistantSid
sid<UA> Not PII

The SID of the Assistant that is the parent of the resource.

sid
sid<UD> Not PII

The unique string that we created to identify the Task resource.

uniqueName
文字列 Not PII

An application-defined string that uniquely identifies the resource. It can be used in place of the resource's sid in the URL to address the resource.

actionsUrl
url Not PII

The URL from which the Assistant can fetch actions.

url
url Not PII

The absolute URL of the Task resource.

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 SID of the Assistant that is the parent of the new resource.

unique_name
必須
post 文字列 Not PII

An application-defined string that uniquely identifies the new resource. It can be used as an alternative to the sid in the URL path to address the resource. This value must be unique and 64 characters or less in length.

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

A descriptive string that you create to describe the new resource. It is not unique and can be up to 255 characters long.

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

The JSON string that specifies the actions that instruct the Assistant on how to perform the task. It is optional and not unique.

actions_url
オプション
post url Not PII

The URL from which 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 SID of the Assistant that is the parent of the resource to fetch.

              sid
              必須
              GET sid_like<UD> Not PII

              The Twilio-provided string that uniquely identifies the Task resource to fetch.

                    
                    
                    
                    

                    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 SID of the Assistant that is the parent of the resources to read.

                    例 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 SID of the Assistant that is the parent of the resource to update.

                          sid
                          必須
                          post sid_like<UD> Not PII

                          The Twilio-provided string that uniquely identifies the Task resource to update.

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

                          A descriptive string that you create to describe the resource. It is not unique and can be up to 255 characters long.

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

                          An application-defined string that uniquely identifies the resource. This value must be 64 characters or less in length and be unique. It can be used as an alternative to the sid in the URL path to address the resource.

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

                          The JSON string that specifies the actions that instruct the Assistant on how to perform the task.

                          actions_url
                          オプション
                          post url Not PII

                          The URL from which 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 SID of the Assistant that is the parent of the resources to delete.

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

                                      The Twilio-provided string that uniquely identifies the Task resource to delete.

                                            
                                            
                                            
                                            
                                            Rate this page:

                                            ヘルプが必要ですか?

                                            誰しもが一度は考える「コーディングって難しい」。そんな時は、お問い合わせフォームから質問してください。 または、Stack Overflow でTwilioタグのついた情報から欲しいものを探してみましょう。