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