サービスリソース
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
Resource Properties in REST API format | |
---|---|
sid
|
The unique string that we created to identify the Service resource. |
unique_name
|
An application-defined string that uniquely identifies the resource. It can be used in place of the resource's |
account_sid
|
The SID of the Account that created the Service resource. |
friendly_name
|
The string that you assigned to describe the resource. |
date_created
|
The date and time in GMT when the resource was created specified in ISO 8601 format. |
date_updated
|
The date and time in GMT when the resource was last updated specified in ISO 8601 format. |
url
|
The absolute URL of the Service resource. |
webhook_url
|
The URL we call when Sync objects are manipulated. |
webhooks_from_rest_enabled
|
Whether the Service instance should call |
reachability_webhooks_enabled
|
Whether the service instance calls |
acl_enabled
|
Whether token identities in the Service must be granted access to Sync objects by using the Permissions resource. It is disabled (false) by default. |
reachability_debouncing_enabled
|
Whether every |
reachability_debouncing_window
|
The reachability event delay in milliseconds if |
links
|
The URLs of related resources. |
Create a Service resource
https://sync.twilio.com/v1/Services
パラメーター
Parameters in REST API format | |
---|---|
friendly_name
オプション
|
A string that you assign to describe the resource. |
webhook_url
オプション
|
The URL we should call when Sync objects are manipulated. |
reachability_webhooks_enabled
オプション
|
Whether the service instance should call |
acl_enabled
オプション
|
Whether token identities in the Service must be granted access to Sync objects by using the Permissions resource. |
reachability_debouncing_enabled
オプション
|
Whether every |
reachability_debouncing_window
オプション
|
The reachability event delay in milliseconds if |
webhooks_from_rest_enabled
オプション
|
Whether the Service instance should call |
例 1
例 2
Fetch a Service resource
https://sync.twilio.com/v1/Services/{Sid}
パラメーター
Parameters in REST API format | |
---|---|
sid
Path
|
The SID of the Service resource to fetch. |
例 1
Read multiple Service resources
https://sync.twilio.com/v1/Services
例 1
Update a Service resource
https://sync.twilio.com/v1/Services/{Sid}
パラメーター
Parameters in REST API format | |
---|---|
sid
Path
|
The SID of the Service resource to update. |
webhook_url
オプション
|
The URL we should call when Sync objects are manipulated. |
friendly_name
オプション
|
A string that you assign to describe the resource. |
reachability_webhooks_enabled
オプション
|
Whether the service instance should call |
acl_enabled
オプション
|
Whether token identities in the Service must be granted access to Sync objects by using the Permissions resource. |
reachability_debouncing_enabled
オプション
|
Whether every |
reachability_debouncing_window
オプション
|
The reachability event delay in milliseconds if |
webhooks_from_rest_enabled
オプション
|
Whether the Service instance should call |
例 1
Delete a Service resource
https://sync.twilio.com/v1/Services/{Sid}
パラメーター
Parameters in REST API format | |
---|---|
sid
Path
|
The SID of the Service resource to delete. |
例 1
ヘルプが必要ですか?
誰しもが一度は考える「コーディングって難しい」。そんな時は、お問い合わせフォームから質問してください。 または、Stack Overflow でTwilioタグのついた情報から欲しいものを探してみましょう。