Level up your Twilio API skills in TwilioQuest, an educational game for Mac, Windows, and Linux. Download Now

メニュー

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?

Map Resource

A Sync Map is an unordered collection of individual Map items.

You can find the full API reference documentation for Sync Map Items here.

A few notes about Sync Maps:

  • Full map modification history persists with every change that triggers a new revision.
  • Strict ordering of map mutation events is guaranteed, but the map item order is not defined.
  • By default, data persists permanently, but maps will expire and be deleted automatically if eviction is configured via the TTL parameter.

Map properties

Each Map object root resource has the following properties.

Unique name and expiration date attributes are optional and may be null.

Names in PHP format
sid
sid<MP> Not PII

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

uniqueName
文字列 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.

accountSid
sid<AC> Not PII

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

serviceSid
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 Map resource.

links
uri_map Not PII

The URLs of the Sync Map's nested resources.

revision
文字列 Not PII

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

dateExpires
date_time<iso8601> Not PII

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

dateCreated
date_time<iso8601> Not PII

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

dateUpdated
date_time<iso8601> Not PII

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

createdBy
文字列 PII MTL: 30 DAYS

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

Create a SyncMap resource

post
https://sync.twilio.com/v1/Services/{ServiceSid}/Maps

Create a new Map in this Service Instance, optionally giving it a unique name and assigning an expiration deadline.

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

The SID of the Sync Service to create the Sync Map in.

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

An application-defined string that uniquely identifies the resource. It can be used as an alternative to the sid in the URL path to address the resource.

ttl
オプション
post integer Not PII

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

collection_ttl
オプション
post integer Not PII

How long, in seconds, before the Sync Map 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 Map does not expire. The Sync Map will be deleted automatically after it expires, but there can be a delay between the expiration time and the resources's deletion.

例 1
        
        
        
        
        例 2
              
              
              
              
              例 3
                    
                    
                    
                    
                    Set TTL (in seconds) for expiring this Map instance

                    Create a Map with an expiration deadline

                    Set TTL (in seconds) for expiring this Map instance

                    Fetch a SyncMap resource

                    GET
                    https://sync.twilio.com/v1/Services/{ServiceSid}/Maps/{Sid}
                    パラメーター
                    Names in None format
                    service_sid
                    必須
                    GET sid_like<IS> Not PII

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

                    sid
                    必須
                    GET sid_like<MP> Not PII

                    The SID of the Sync Map resource to fetch.

                          
                          
                          
                          

                          Read multiple SyncMap resources

                          GET
                          https://sync.twilio.com/v1/Services/{ServiceSid}/Maps

                          Retrieve a list of all Maps belonging to this Service Instance.

                          By default, this will return the first 50 Maps. Supply a PageSize parameter to fetch up to 100 items at once. See paging for more information.

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

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

                                
                                
                                
                                

                                Update a SyncMap resource

                                post
                                https://sync.twilio.com/v1/Services/{ServiceSid}/Maps/{Sid}
                                パラメーター
                                Names in None format
                                service_sid
                                必須
                                post sid_like<IS> Not PII

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

                                sid
                                必須
                                post sid_like<MP> Not PII

                                The SID of the Sync Map resource to update.

                                ttl
                                オプション
                                post integer Not PII

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

                                collection_ttl
                                オプション
                                post integer Not PII

                                How long, in seconds, before the Sync Map 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 Map does not expire. The Sync Map will be deleted automatically after it expires, but there can be a delay between the expiration time and the resources's deletion.

                                      
                                      
                                      
                                      

                                      Delete a Map resource

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

                                      Permanently delete a specific Map along with all items belonging to it from a given Sync Service Instance.

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

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

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

                                      The SID of the Sync Map resource to delete.

                                      例 1
                                            
                                            
                                            
                                            
                                            Rate this page:

                                            ヘルプが必要ですか?

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