メニュー

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

A unique identifier for this service instance.

uniqueName
文字列 Not PII

accountSid
sid<AC> Not PII

friendlyName
文字列 PII MTL: 7 DAYS

このサービスインスタンスの、人間が読みやすい形式の名前です。

dateCreated
date_time<iso8601> Not PII

dateUpdated
date_time<iso8601> Not PII

url
url Not PII

webhookUrl
url Not PII

A URL that will receive event updates when objects are manipulated.

reachabilityWebhooksEnabled
boolean Not PII

true or false - controls whether this instance fires webhooks when client endpoints connect to Sync Defaults to false.

aclEnabled
boolean Not PII

true or false - determines whether token identities must be granted access to Sync objects via the Permissions API in this Service.

reachabilityDebouncingEnabled
boolean Not PII

true or false - If false, every endpoint disconnection immediately yields a reachability webhook (if enabled). If true, then 'disconnection' webhook events will only be fired after a configurable delay. Intervening reconnections would effectively cancel that webhook. Defaults to false.

reachabilityDebouncingWindow
integer Not PII

Reachability webhook delay period in milliseconds. Determines the delay after which a Sync identity is declared actually offline, measured from the moment the last running client disconnects. If all endpoints remain offline throughout this delay, then reachability webhooks will be fired (if enabled). A reconnection by any endpoint during this window — from the same identity — means no reachability webhook would be fired. Must be between 1000 and 30000. Defaults to 5000.

links
uri_map Not PII

Create a Service resource

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

このサービスインスタンスの、人間が読みやすい形式の名前です。

webhook_url
オプション
post url Not PII

A URL that will receive event updates when objects are manipulated.

reachability_webhooks_enabled
オプション
post boolean Not PII

true or false - controls whether this instance fires webhooks when client endpoints connect to Sync Defaults to false.

acl_enabled
オプション
post boolean Not PII

true or false - determines whether token identities must be granted access to Sync objects via the Permissions API in this Service.

reachability_debouncing_enabled
オプション
post boolean Not PII

true or false - If false, every endpoint disconnection immediately yields a reachability webhook (if enabled). If true, then 'disconnection' webhook events will only be fired after a configurable delay. Intervening reconnections would effectively cancel that webhook. Defaults to false.

reachability_debouncing_window
オプション
post integer Not PII

Reachability webhook delay period in milliseconds. Determines the delay after which a Sync identity is declared actually offline, measured from the moment the last running client disconnects. If all endpoints remain offline throughout this delay, then reachability webhooks will be fired (if enabled). A reconnection by any endpoint during this window — from the same identity — means no reachability webhook would be fired. Must be between 1000 and 30000. Defaults to 5000.

例 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

              A unique identifier for this service instance.

                    
                    
                    
                    

                    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

                          A unique identifier for this service instance.

                          webhook_url
                          オプション
                          post url Not PII

                          A URL that will receive event updates when objects are manipulated.

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

                          このサービスインスタンスの、人間が読みやすい形式の名前です。

                          reachability_webhooks_enabled
                          オプション
                          post boolean Not PII

                          True or false - controls whether this instance fires webhooks when client endpoints connect to Sync Defaults to false.

                          acl_enabled
                          オプション
                          post boolean Not PII

                          true or false - determines whether token identities must be granted access to Sync objects via the Permissions API in this Service.

                          reachability_debouncing_enabled
                          オプション
                          post boolean Not PII

                          true or false - If false, every endpoint disconnection immediately yields a reachability webhook (if enabled). If true, then 'disconnection' webhook events will only be fired after a configurable delay. Intervening reconnections would effectively cancel that webhook. Defaults to false.

                          reachability_debouncing_window
                          オプション
                          post integer Not PII

                          Reachability webhook delay period in milliseconds. Determines the delay after which a Sync identity is declared actually offline, measured from the moment the last running client disconnects. If all endpoints remain offline throughout this delay, then reachability webhooks will be fired (if enabled). A reconnection by any endpoint during this window — from the same identity — means no reachability webhook would be fired. Must be between 1000 and 30000. Defaults to 5000.

                                
                                
                                
                                

                                Delete a Service resource

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

                                A unique identifier for this service instance.

                                      
                                      
                                      
                                      
                                      Rate this page:

                                      ヘルプが必要ですか?

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