メニュー

Expand
ページを評価:

リストリソース

A Sync List is an ordered collection of individual items, each storing separate JSON objects.

After you create a List, use the ListItem resource to add, retrieve, update, and delete items from your List. See that page for more details on how items are stored in lists, including ordering, expiration, and limitations on each item's size.

List properties

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

The unique string that we created to identify the Sync List resource.

unique_name
文字列 PII MTL: 30 DAYS

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.

account_sid
sid<AC> Not PII

The SID of the Account that created the Sync List resource.

service_sid
sid<IS> Not PII

The SID of the Sync Service the resource is associated with.

url
url Not PII

The absolute URL of the Sync List resource.

links
uri_map Not PII

The URLs of the Sync List's nested resources.

revision
文字列 Not PII

The current revision of the Sync List, represented as a string.

date_expires
date_time<iso8601> Not PII

The date and time in GMT when the Sync List expires and will be deleted, specified in ISO 8601 format. If the Sync List does not expire, this value is null. The Sync List might not be deleted immediately after it expires.

date_created
date_time<iso8601> Not PII

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

date_updated
date_time<iso8601> Not PII

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

created_by
文字列 PII MTL: 30 DAYS

The identity of the Sync List's creator. If the Sync List is created from the client SDK, the value matches the Access Token's identity field. If the Sync List was created from the REST API, the value is system.

Create a List resource

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

The SID of the Sync Service to create the new Sync List in.

unique_name
オプション
post 文字列 PII MTL: 30 DAYS

An application-defined string that uniquely identifies the resource. This value must be unique within its Service and it can be up to 320 characters long. The unique_name value can be used as an alternative to the sid in the URL path to address the resource.

ttl
オプション
post integer Not PII

Alias for collection_ttl. If both are provided, this value is ignored.

collection_ttl
オプション
post integer Not PII

How long, in seconds, before the Sync List expires (time-to-live) and is deleted. Can be an integer from 0 to 31,536,000 (1 year). The default value is 0, which means the Sync List does not expire. The Sync List will be deleted automatically after it expires, but there can be a delay between the expiration time and the resources's deletion.

例 1
        
        
        
        

        Fetch a List resource

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

        The SID of the Sync Service with the Sync List resource to fetch.

        sid
        Path
        GET sid_like<ES> Not PII

        The SID of the Sync List resource to fetch.

        例 1
              
              
              
              

              Read a List resource

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

              The SID of the Sync Service with the Sync List resources to read.

              例 1
                    
                    
                    
                    

                    Update a List resource

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

                    The SID of the Sync Service with the Sync List resource to update.

                    sid
                    Path
                    post sid_like<ES> Not PII

                    The SID of the Sync List resource to update.

                    ttl
                    オプション
                    post integer Not PII

                    An alias for collection_ttl. If both are provided, this value is ignored.

                    collection_ttl
                    オプション
                    post integer Not PII

                    How long, in seconds, before the Sync List expires (time-to-live) and is deleted. Can be an integer from 0 to 31,536,000 (1 year). The default value is 0, which means the Sync List does not expire. The Sync List will be deleted automatically after it expires, but there can be a delay between the expiration time and the resources's deletion.

                    例 1
                          
                          
                          
                          

                          Delete a List resource

                          削除する
                          https://sync.twilio.com/v1/Services/{ServiceSid}/Lists/{Sid}

                          Permanently delete a List along with all items belonging to it.

                          パラメーター
                          Parameters in REST API format
                          service_sid
                          Path
                          削除する sid_like<IS> Not PII

                          The SID of the Sync Service with the Sync List resource to delete.

                          sid
                          Path
                          削除する sid_like<ES> Not PII

                          The SID of the Sync List resource to delete.

                          例 1
                                
                                
                                
                                
                                ページを評価:

                                ヘルプが必要ですか?

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

                                      
                                      
                                      

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

                                      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