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?

Service resource

A Service is the top-level scope of all other resources in the REST API. It contains all the objects in a Sync application. Services allow you to:

  • 同じ Twilio アカウントの下で、データを分離して複数の環境(dev、stage、prod)を作成する。
  • REST APIを通じてリソースへのアクセスを制限する
  • Serviceのスコープ内のリソースの振る舞いを構成する

Service properties

Names in PHP format
sid
sid<IS> Not PII

The unique string that we created to identify the Service 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.

accountSid
sid<AC> Not PII

The SID of the Account that created the Service resource.

friendlyName
文字列 PII MTL: 7 DAYS

The string that you assigned to describe the resource.

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.

url
url Not PII

The absolute URL of the Service resource.

webhookUrl
url Not PII

The URL we call when Sync objects are manipulated.

webhooksFromRestEnabled
boolean Not PII

Whether the Service instance should call webhook_url when the REST API is used to update Sync objects. The default is false.

reachabilityWebhooksEnabled
boolean Not PII

Whether the service instance calls webhook_url when client endpoints connect to Sync. The default is false.

aclEnabled
boolean Not PII

Whether token identities in the Service must be granted access to Sync objects by using the Permissions resource.

reachabilityDebouncingEnabled
boolean Not PII

Whether every endpoint_disconnected event should occur after a configurable delay. The default is false, where the endpoint_disconnected event occurs immediately after disconnection. When true, intervening reconnections can prevent the endpoint_disconnected event.

reachabilityDebouncingWindow
integer Not PII

The reachability event delay in milliseconds if reachability_debouncing_enabled = true. Must be between 1,000 and 30,000 and defaults to 5,000. This is the number of milliseconds after the last running client disconnects, and a Sync identity is declared offline, before webhook_url is called, if all endpoints remain offline. A reconnection from the same identity by any endpoint during this interval prevents the reachability event from occurring.

links
uri_map Not PII

The URLs of related resources.

Create a Service resource

post
https://sync.twilio.com/v1/Services
パラメーター
Names in None format
friendly_name
オプション
post 文字列 PII MTL: 7 DAYS

A string that you assign to describe the resource.

webhook_url
オプション
post url Not PII

The URL we should call when Sync objects are manipulated.

reachability_webhooks_enabled
オプション
post boolean Not PII

Whether the service instance should call webhook_url when client endpoints connect to Sync. The default is false.

acl_enabled
オプション
post boolean Not PII

Whether token identities in the Service must be granted access to Sync objects by using the Permissions resource.

reachability_debouncing_enabled
オプション
post boolean Not PII

Whether every endpoint_disconnected event should occur after a configurable delay. The default is false, where the endpoint_disconnected event occurs immediately after disconnection. When true, intervening reconnections can prevent the endpoint_disconnected event.

reachability_debouncing_window
オプション
post integer Not PII

The reachability event delay in milliseconds if reachability_debouncing_enabled = true. Must be between 1,000 and 30,000 and defaults to 5,000. This is the number of milliseconds after the last running client disconnects, and a Sync identity is declared offline, before the webhook_url is called if all endpoints remain offline. A reconnection from the same identity by any endpoint during this interval prevents the call to webhook_url.

webhooks_from_rest_enabled
オプション
post boolean Not PII

Whether the Service instance should call webhook_url when the REST API is used to update Sync objects. The default is false.

例 1
        
        
        
        
        例 2
              
              
              
              

              Fetch a Service resource

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

              The SID of the Service resource to fetch.

                    
                    
                    
                    

                    Read multiple Service resources

                    GET
                    https://sync.twilio.com/v1/Services
                          
                          
                          
                          

                          Update a Service resource

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

                          The SID of the Service resource to update.

                          webhook_url
                          オプション
                          post url Not PII

                          The URL we should call when Sync objects are manipulated.

                          friendly_name
                          オプション
                          post 文字列 PII MTL: 7 DAYS

                          A string that you assign to describe the resource.

                          reachability_webhooks_enabled
                          オプション
                          post boolean Not PII

                          Whether the service instance should call webhook_url when client endpoints connect to Sync. The default is false.

                          acl_enabled
                          オプション
                          post boolean Not PII

                          Whether token identities in the Service must be granted access to Sync objects by using the Permissions resource.

                          reachability_debouncing_enabled
                          オプション
                          post boolean Not PII

                          Whether every endpoint_disconnected event should occur after a configurable delay. The default is false, where the endpoint_disconnected event occurs immediately after disconnection. When true, intervening reconnections can prevent the endpoint_disconnected event.

                          reachability_debouncing_window
                          オプション
                          post integer Not PII

                          The reachability event delay in milliseconds if reachability_debouncing_enabled = true. Must be between 1,000 and 30,000 and defaults to 5,000. This is the number of milliseconds after the last running client disconnects, and a Sync identity is declared offline, before the webhook is called if all endpoints remain offline. A reconnection from the same identity by any endpoint during this interval prevents the webhook from being called.

                          webhooks_from_rest_enabled
                          オプション
                          post boolean Not PII

                          Whether the Service instance should call webhook_url when the REST API is used to update Sync objects. The default is false.

                                
                                
                                
                                

                                Delete a Service resource

                                削除する
                                https://sync.twilio.com/v1/Services/{Sid}
                                パラメーター
                                Names in None format
                                sid
                                必須
                                削除する sid_like<IS> Not PII

                                The SID of the Service resource to delete.

                                      
                                      
                                      
                                      
                                      Rate this page:

                                      ヘルプが必要ですか?

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