メニュー

Expand
ページを評価:

Asset

Assets are static files that you can host at a particular domain in an Environment.

The steps to create Assets are as follows:

  1. Create an Asset (this resource)
  2. Create an Asset Version

We will need the Asset Version SID to include this Asset in a Build.

Asset properties

Resource Properties in REST API format
sid
sid<ZH> Not PII

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

account_sid
sid<AC> Not PII

The SID of the Account that created the Asset resource.

service_sid
sid<ZS> Not PII

The SID of the Service that the Asset resource is associated with.

friendly_name
文字列 PII MTL: 7 DAYS

The string that you assigned to describe the Asset resource. It can be a maximum of 255 characters.

date_created
date_time<iso8601> Not PII

The date and time in GMT when the Asset resource was created specified in ISO 8601 format.

date_updated
date_time<iso8601> Not PII

The date and time in GMT when the Asset resource was last updated specified in ISO 8601 format.

url
url Not PII

The absolute URL of the Asset resource.

links
uri_map Not PII

The URLs of the Asset resource's nested resources.

Create an Asset resource

post
https://serverless.twilio.com/v1/Services/{ServiceSid}/Assets
パラメーター
Parameters in REST API format
service_sid
Path
post sid_like<ZS> Not PII

The SID of the Service to create the Asset resource under.

friendly_name
必須
post 文字列 PII MTL: 7 DAYS

A descriptive string that you create to describe the Asset resource. It can be a maximum of 255 characters.

例 1
        
        
        

        Fetch an Asset resource

        GET
        https://serverless.twilio.com/v1/Services/{ServiceSid}/Assets/{Sid}
        パラメーター
        Parameters in REST API format
        service_sid
        Path
        GET sid_like<ZS> Not PII

        The SID of the Service to fetch the Asset resource from.

        sid
        Path
        GET sid<ZH> Not PII

        The SID that identifies the Asset resource to fetch.

        例 1
              
              
              

              Read multiple Asset resources

              GET
              https://serverless.twilio.com/v1/Services/{ServiceSid}/Assets
              パラメーター
              Parameters in REST API format
              service_sid
              Path
              GET sid_like<ZS> Not PII

              The SID of the Service to read the Asset resources from.

              例 1
                    
                    
                    

                    Update an Asset resource

                    post
                    https://serverless.twilio.com/v1/Services/{ServiceSid}/Assets/{Sid}
                    パラメーター
                    Parameters in REST API format
                    service_sid
                    Path
                    post sid_like<ZS> Not PII

                    The SID of the Service to update the Asset resource from.

                    sid
                    Path
                    post sid<ZH> Not PII

                    The SID that identifies the Asset resource to update.

                    friendly_name
                    必須
                    post 文字列 PII MTL: 7 DAYS

                    A descriptive string that you create to describe the Asset resource. It can be a maximum of 255 characters.

                    例 1
                          
                          
                          

                          Delete an Asset resource

                          削除する
                          https://serverless.twilio.com/v1/Services/{ServiceSid}/Assets/{Sid}
                          パラメーター
                          Parameters in REST API format
                          service_sid
                          Path
                          削除する sid_like<ZS> Not PII

                          The SID of the Service to delete the Asset resource from.

                          sid
                          Path
                          削除する sid<ZH> Not PII

                          The SID that identifies the Asset resource to delete.

                          例 1
                                
                                
                                
                                ページを評価:

                                ヘルプが必要ですか?

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

                                      
                                      
                                      

                                      フィードバックくださりありがとうございます!

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

                                      Sending your feedback...
                                      🎉 Thank you for your feedback!
                                      Something went wrong. Please try again.

                                      Thanks for your feedback!

                                      Refer us and get $10 in 3 simple steps!

                                      ステップ1

                                      Get link

                                      Get a free personal referral link here

                                      ステップ2:

                                      Give $10

                                      Your user signs up and upgrade using link

                                      ステップ3

                                      Get $10

                                      1,250 free SMSes
                                      OR 1,000 free voice mins
                                      OR 12,000 chats
                                      OR more