github.com/twilio/twilio-go@v1.20.1/rest/sync/v1/docs/ServicesListsItemsApi.md (about) 1 # ServicesListsItemsApi 2 3 All URIs are relative to *https://sync.twilio.com* 4 5 Method | HTTP request | Description 6 ------------- | ------------- | ------------- 7 [**CreateSyncListItem**](ServicesListsItemsApi.md#CreateSyncListItem) | **Post** /v1/Services/{ServiceSid}/Lists/{ListSid}/Items | 8 [**DeleteSyncListItem**](ServicesListsItemsApi.md#DeleteSyncListItem) | **Delete** /v1/Services/{ServiceSid}/Lists/{ListSid}/Items/{Index} | 9 [**FetchSyncListItem**](ServicesListsItemsApi.md#FetchSyncListItem) | **Get** /v1/Services/{ServiceSid}/Lists/{ListSid}/Items/{Index} | 10 [**ListSyncListItem**](ServicesListsItemsApi.md#ListSyncListItem) | **Get** /v1/Services/{ServiceSid}/Lists/{ListSid}/Items | 11 [**UpdateSyncListItem**](ServicesListsItemsApi.md#UpdateSyncListItem) | **Post** /v1/Services/{ServiceSid}/Lists/{ListSid}/Items/{Index} | 12 13 14 15 ## CreateSyncListItem 16 17 > SyncV1SyncListItem CreateSyncListItem(ctx, ServiceSidListSidoptional) 18 19 20 21 22 23 ### Path Parameters 24 25 26 Name | Type | Description 27 ------------- | ------------- | ------------- 28 **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. 29 **ServiceSid** | **string** | The SID of the [Sync Service](https://www.twilio.com/docs/sync/api/service) to create the new List Item in. 30 **ListSid** | **string** | The SID of the Sync List to add the new List Item to. Can be the Sync List resource's `sid` or its `unique_name`. 31 32 ### Other Parameters 33 34 Other parameters are passed through a pointer to a CreateSyncListItemParams struct 35 36 37 Name | Type | Description 38 ------------- | ------------- | ------------- 39 **Data** | [**interface{}**](interface{}.md) | A JSON string that represents an arbitrary, schema-less object that the List Item stores. Can be up to 16 KiB in length. 40 **Ttl** | **int** | An alias for `item_ttl`. If both parameters are provided, this value is ignored. 41 **ItemTtl** | **int** | How long, [in seconds](https://www.twilio.com/docs/sync/limits#sync-payload-limits), before the List Item expires (time-to-live) and is deleted. 42 **CollectionTtl** | **int** | How long, [in seconds](https://www.twilio.com/docs/sync/limits#sync-payload-limits), before the List Item's parent Sync List expires (time-to-live) and is deleted. 43 44 ### Return type 45 46 [**SyncV1SyncListItem**](SyncV1SyncListItem.md) 47 48 ### Authorization 49 50 [accountSid_authToken](../README.md#accountSid_authToken) 51 52 ### HTTP request headers 53 54 - **Content-Type**: application/x-www-form-urlencoded 55 - **Accept**: application/json 56 57 [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) 58 [[Back to Model list]](../README.md#documentation-for-models) 59 [[Back to README]](../README.md) 60 61 62 ## DeleteSyncListItem 63 64 > DeleteSyncListItem(ctx, ServiceSidListSidIndexoptional) 65 66 67 68 69 70 ### Path Parameters 71 72 73 Name | Type | Description 74 ------------- | ------------- | ------------- 75 **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. 76 **ServiceSid** | **string** | The SID of the [Sync Service](https://www.twilio.com/docs/sync/api/service) with the Sync List Item resource to delete. 77 **ListSid** | **string** | The SID of the Sync List with the Sync List Item resource to delete. Can be the Sync List resource's `sid` or its `unique_name`. 78 **Index** | **int** | The index of the Sync List Item resource to delete. 79 80 ### Other Parameters 81 82 Other parameters are passed through a pointer to a DeleteSyncListItemParams struct 83 84 85 Name | Type | Description 86 ------------- | ------------- | ------------- 87 **IfMatch** | **string** | If provided, applies this mutation if (and only if) the “revision” field of this [map item] matches the provided value. This matches the semantics of (and is implemented with) the HTTP [If-Match header](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/If-Match). 88 89 ### Return type 90 91 (empty response body) 92 93 ### Authorization 94 95 [accountSid_authToken](../README.md#accountSid_authToken) 96 97 ### HTTP request headers 98 99 - **Content-Type**: Not defined 100 - **Accept**: Not defined 101 102 [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) 103 [[Back to Model list]](../README.md#documentation-for-models) 104 [[Back to README]](../README.md) 105 106 107 ## FetchSyncListItem 108 109 > SyncV1SyncListItem FetchSyncListItem(ctx, ServiceSidListSidIndex) 110 111 112 113 114 115 ### Path Parameters 116 117 118 Name | Type | Description 119 ------------- | ------------- | ------------- 120 **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. 121 **ServiceSid** | **string** | The SID of the [Sync Service](https://www.twilio.com/docs/sync/api/service) with the Sync List Item resource to fetch. 122 **ListSid** | **string** | The SID of the Sync List with the Sync List Item resource to fetch. Can be the Sync List resource's `sid` or its `unique_name`. 123 **Index** | **int** | The index of the Sync List Item resource to fetch. 124 125 ### Other Parameters 126 127 Other parameters are passed through a pointer to a FetchSyncListItemParams struct 128 129 130 Name | Type | Description 131 ------------- | ------------- | ------------- 132 133 ### Return type 134 135 [**SyncV1SyncListItem**](SyncV1SyncListItem.md) 136 137 ### Authorization 138 139 [accountSid_authToken](../README.md#accountSid_authToken) 140 141 ### HTTP request headers 142 143 - **Content-Type**: Not defined 144 - **Accept**: application/json 145 146 [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) 147 [[Back to Model list]](../README.md#documentation-for-models) 148 [[Back to README]](../README.md) 149 150 151 ## ListSyncListItem 152 153 > []SyncV1SyncListItem ListSyncListItem(ctx, ServiceSidListSidoptional) 154 155 156 157 158 159 ### Path Parameters 160 161 162 Name | Type | Description 163 ------------- | ------------- | ------------- 164 **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. 165 **ServiceSid** | **string** | The SID of the [Sync Service](https://www.twilio.com/docs/sync/api/service) with the List Item resources to read. 166 **ListSid** | **string** | The SID of the Sync List with the List Items to read. Can be the Sync List resource's `sid` or its `unique_name`. 167 168 ### Other Parameters 169 170 Other parameters are passed through a pointer to a ListSyncListItemParams struct 171 172 173 Name | Type | Description 174 ------------- | ------------- | ------------- 175 **Order** | **string** | How to order the List Items returned by their `index` value. Can be: `asc` (ascending) or `desc` (descending) and the default is ascending. 176 **From** | **string** | The `index` of the first Sync List Item resource to read. See also `bounds`. 177 **Bounds** | **string** | Whether to include the List Item referenced by the `from` parameter. Can be: `inclusive` to include the List Item referenced by the `from` parameter or `exclusive` to start with the next List Item. The default value is `inclusive`. 178 **PageSize** | **int** | How many resources to return in each list page. The default is 50, and the maximum is 1000. 179 **Limit** | **int** | Max number of records to return. 180 181 ### Return type 182 183 [**[]SyncV1SyncListItem**](SyncV1SyncListItem.md) 184 185 ### Authorization 186 187 [accountSid_authToken](../README.md#accountSid_authToken) 188 189 ### HTTP request headers 190 191 - **Content-Type**: Not defined 192 - **Accept**: application/json 193 194 [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) 195 [[Back to Model list]](../README.md#documentation-for-models) 196 [[Back to README]](../README.md) 197 198 199 ## UpdateSyncListItem 200 201 > SyncV1SyncListItem UpdateSyncListItem(ctx, ServiceSidListSidIndexoptional) 202 203 204 205 206 207 ### Path Parameters 208 209 210 Name | Type | Description 211 ------------- | ------------- | ------------- 212 **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. 213 **ServiceSid** | **string** | The SID of the [Sync Service](https://www.twilio.com/docs/sync/api/service) with the Sync List Item resource to update. 214 **ListSid** | **string** | The SID of the Sync List with the Sync List Item resource to update. Can be the Sync List resource's `sid` or its `unique_name`. 215 **Index** | **int** | The index of the Sync List Item resource to update. 216 217 ### Other Parameters 218 219 Other parameters are passed through a pointer to a UpdateSyncListItemParams struct 220 221 222 Name | Type | Description 223 ------------- | ------------- | ------------- 224 **IfMatch** | **string** | If provided, applies this mutation if (and only if) the “revision” field of this [map item] matches the provided value. This matches the semantics of (and is implemented with) the HTTP [If-Match header](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/If-Match). 225 **Data** | [**interface{}**](interface{}.md) | A JSON string that represents an arbitrary, schema-less object that the List Item stores. Can be up to 16 KiB in length. 226 **Ttl** | **int** | An alias for `item_ttl`. If both parameters are provided, this value is ignored. 227 **ItemTtl** | **int** | How long, [in seconds](https://www.twilio.com/docs/sync/limits#sync-payload-limits), before the List Item expires (time-to-live) and is deleted. 228 **CollectionTtl** | **int** | How long, [in seconds](https://www.twilio.com/docs/sync/limits#sync-payload-limits), before the List Item's parent Sync List expires (time-to-live) and is deleted. This parameter can only be used when the List Item's `data` or `ttl` is updated in the same request. 229 230 ### Return type 231 232 [**SyncV1SyncListItem**](SyncV1SyncListItem.md) 233 234 ### Authorization 235 236 [accountSid_authToken](../README.md#accountSid_authToken) 237 238 ### HTTP request headers 239 240 - **Content-Type**: application/x-www-form-urlencoded 241 - **Accept**: application/json 242 243 [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) 244 [[Back to Model list]](../README.md#documentation-for-models) 245 [[Back to README]](../README.md) 246