github.com/twilio/twilio-go@v1.20.1/rest/sync/v1/docs/ServicesApi.md (about) 1 # ServicesApi 2 3 All URIs are relative to *https://sync.twilio.com* 4 5 Method | HTTP request | Description 6 ------------- | ------------- | ------------- 7 [**CreateService**](ServicesApi.md#CreateService) | **Post** /v1/Services | 8 [**DeleteService**](ServicesApi.md#DeleteService) | **Delete** /v1/Services/{Sid} | 9 [**FetchService**](ServicesApi.md#FetchService) | **Get** /v1/Services/{Sid} | 10 [**ListService**](ServicesApi.md#ListService) | **Get** /v1/Services | 11 [**UpdateService**](ServicesApi.md#UpdateService) | **Post** /v1/Services/{Sid} | 12 13 14 15 ## CreateService 16 17 > SyncV1Service CreateService(ctx, optional) 18 19 20 21 22 23 ### Path Parameters 24 25 This endpoint does not need any path parameter. 26 27 ### Other Parameters 28 29 Other parameters are passed through a pointer to a CreateServiceParams struct 30 31 32 Name | Type | Description 33 ------------- | ------------- | ------------- 34 **FriendlyName** | **string** | A string that you assign to describe the resource. 35 **WebhookUrl** | **string** | The URL we should call when Sync objects are manipulated. 36 **ReachabilityWebhooksEnabled** | **bool** | Whether the service instance should call `webhook_url` when client endpoints connect to Sync. The default is `false`. 37 **AclEnabled** | **bool** | Whether token identities in the Service must be granted access to Sync objects by using the [Permissions](https://www.twilio.com/docs/sync/api/sync-permissions) resource. 38 **ReachabilityDebouncingEnabled** | **bool** | 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. 39 **ReachabilityDebouncingWindow** | **int** | 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`. 40 **WebhooksFromRestEnabled** | **bool** | Whether the Service instance should call `webhook_url` when the REST API is used to update Sync objects. The default is `false`. 41 42 ### Return type 43 44 [**SyncV1Service**](SyncV1Service.md) 45 46 ### Authorization 47 48 [accountSid_authToken](../README.md#accountSid_authToken) 49 50 ### HTTP request headers 51 52 - **Content-Type**: application/x-www-form-urlencoded 53 - **Accept**: application/json 54 55 [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) 56 [[Back to Model list]](../README.md#documentation-for-models) 57 [[Back to README]](../README.md) 58 59 60 ## DeleteService 61 62 > DeleteService(ctx, Sid) 63 64 65 66 67 68 ### Path Parameters 69 70 71 Name | Type | Description 72 ------------- | ------------- | ------------- 73 **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. 74 **Sid** | **string** | The SID of the Service resource to delete. 75 76 ### Other Parameters 77 78 Other parameters are passed through a pointer to a DeleteServiceParams struct 79 80 81 Name | Type | Description 82 ------------- | ------------- | ------------- 83 84 ### Return type 85 86 (empty response body) 87 88 ### Authorization 89 90 [accountSid_authToken](../README.md#accountSid_authToken) 91 92 ### HTTP request headers 93 94 - **Content-Type**: Not defined 95 - **Accept**: Not defined 96 97 [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) 98 [[Back to Model list]](../README.md#documentation-for-models) 99 [[Back to README]](../README.md) 100 101 102 ## FetchService 103 104 > SyncV1Service FetchService(ctx, Sid) 105 106 107 108 109 110 ### Path Parameters 111 112 113 Name | Type | Description 114 ------------- | ------------- | ------------- 115 **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. 116 **Sid** | **string** | The SID of the Service resource to fetch. 117 118 ### Other Parameters 119 120 Other parameters are passed through a pointer to a FetchServiceParams struct 121 122 123 Name | Type | Description 124 ------------- | ------------- | ------------- 125 126 ### Return type 127 128 [**SyncV1Service**](SyncV1Service.md) 129 130 ### Authorization 131 132 [accountSid_authToken](../README.md#accountSid_authToken) 133 134 ### HTTP request headers 135 136 - **Content-Type**: Not defined 137 - **Accept**: application/json 138 139 [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) 140 [[Back to Model list]](../README.md#documentation-for-models) 141 [[Back to README]](../README.md) 142 143 144 ## ListService 145 146 > []SyncV1Service ListService(ctx, optional) 147 148 149 150 151 152 ### Path Parameters 153 154 This endpoint does not need any path parameter. 155 156 ### Other Parameters 157 158 Other parameters are passed through a pointer to a ListServiceParams struct 159 160 161 Name | Type | Description 162 ------------- | ------------- | ------------- 163 **PageSize** | **int** | How many resources to return in each list page. The default is 50, and the maximum is 1000. 164 **Limit** | **int** | Max number of records to return. 165 166 ### Return type 167 168 [**[]SyncV1Service**](SyncV1Service.md) 169 170 ### Authorization 171 172 [accountSid_authToken](../README.md#accountSid_authToken) 173 174 ### HTTP request headers 175 176 - **Content-Type**: Not defined 177 - **Accept**: application/json 178 179 [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) 180 [[Back to Model list]](../README.md#documentation-for-models) 181 [[Back to README]](../README.md) 182 183 184 ## UpdateService 185 186 > SyncV1Service UpdateService(ctx, Sidoptional) 187 188 189 190 191 192 ### Path Parameters 193 194 195 Name | Type | Description 196 ------------- | ------------- | ------------- 197 **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. 198 **Sid** | **string** | The SID of the Service resource to update. 199 200 ### Other Parameters 201 202 Other parameters are passed through a pointer to a UpdateServiceParams struct 203 204 205 Name | Type | Description 206 ------------- | ------------- | ------------- 207 **WebhookUrl** | **string** | The URL we should call when Sync objects are manipulated. 208 **FriendlyName** | **string** | A string that you assign to describe the resource. 209 **ReachabilityWebhooksEnabled** | **bool** | Whether the service instance should call `webhook_url` when client endpoints connect to Sync. The default is `false`. 210 **AclEnabled** | **bool** | Whether token identities in the Service must be granted access to Sync objects by using the [Permissions](https://www.twilio.com/docs/sync/api/sync-permissions) resource. 211 **ReachabilityDebouncingEnabled** | **bool** | 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. 212 **ReachabilityDebouncingWindow** | **int** | 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. 213 **WebhooksFromRestEnabled** | **bool** | Whether the Service instance should call `webhook_url` when the REST API is used to update Sync objects. The default is `false`. 214 215 ### Return type 216 217 [**SyncV1Service**](SyncV1Service.md) 218 219 ### Authorization 220 221 [accountSid_authToken](../README.md#accountSid_authToken) 222 223 ### HTTP request headers 224 225 - **Content-Type**: application/x-www-form-urlencoded 226 - **Accept**: application/json 227 228 [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) 229 [[Back to Model list]](../README.md#documentation-for-models) 230 [[Back to README]](../README.md) 231