github.com/twilio/twilio-go@v1.20.1/rest/sync/v1/docs/ServicesDocumentsPermissionsApi.md (about) 1 # ServicesDocumentsPermissionsApi 2 3 All URIs are relative to *https://sync.twilio.com* 4 5 Method | HTTP request | Description 6 ------------- | ------------- | ------------- 7 [**DeleteDocumentPermission**](ServicesDocumentsPermissionsApi.md#DeleteDocumentPermission) | **Delete** /v1/Services/{ServiceSid}/Documents/{DocumentSid}/Permissions/{Identity} | 8 [**FetchDocumentPermission**](ServicesDocumentsPermissionsApi.md#FetchDocumentPermission) | **Get** /v1/Services/{ServiceSid}/Documents/{DocumentSid}/Permissions/{Identity} | 9 [**ListDocumentPermission**](ServicesDocumentsPermissionsApi.md#ListDocumentPermission) | **Get** /v1/Services/{ServiceSid}/Documents/{DocumentSid}/Permissions | 10 [**UpdateDocumentPermission**](ServicesDocumentsPermissionsApi.md#UpdateDocumentPermission) | **Post** /v1/Services/{ServiceSid}/Documents/{DocumentSid}/Permissions/{Identity} | 11 12 13 14 ## DeleteDocumentPermission 15 16 > DeleteDocumentPermission(ctx, ServiceSidDocumentSidIdentity) 17 18 19 20 Delete a specific Sync Document Permission. 21 22 ### Path Parameters 23 24 25 Name | Type | Description 26 ------------- | ------------- | ------------- 27 **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. 28 **ServiceSid** | **string** | The SID of the [Sync Service](https://www.twilio.com/docs/sync/api/service) with the Document Permission resource to delete. 29 **DocumentSid** | **string** | The SID of the Sync Document with the Document Permission resource to delete. Can be the Document resource's `sid` or its `unique_name`. 30 **Identity** | **string** | The application-defined string that uniquely identifies the User's Document Permission resource to delete. 31 32 ### Other Parameters 33 34 Other parameters are passed through a pointer to a DeleteDocumentPermissionParams struct 35 36 37 Name | Type | Description 38 ------------- | ------------- | ------------- 39 40 ### Return type 41 42 (empty response body) 43 44 ### Authorization 45 46 [accountSid_authToken](../README.md#accountSid_authToken) 47 48 ### HTTP request headers 49 50 - **Content-Type**: Not defined 51 - **Accept**: Not defined 52 53 [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) 54 [[Back to Model list]](../README.md#documentation-for-models) 55 [[Back to README]](../README.md) 56 57 58 ## FetchDocumentPermission 59 60 > SyncV1DocumentPermission FetchDocumentPermission(ctx, ServiceSidDocumentSidIdentity) 61 62 63 64 Fetch a specific Sync Document Permission. 65 66 ### Path Parameters 67 68 69 Name | Type | Description 70 ------------- | ------------- | ------------- 71 **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. 72 **ServiceSid** | **string** | The SID of the [Sync Service](https://www.twilio.com/docs/sync/api/service) with the Document Permission resource to fetch. 73 **DocumentSid** | **string** | The SID of the Sync Document with the Document Permission resource to fetch. Can be the Document resource's `sid` or its `unique_name`. 74 **Identity** | **string** | The application-defined string that uniquely identifies the User's Document Permission resource to fetch. 75 76 ### Other Parameters 77 78 Other parameters are passed through a pointer to a FetchDocumentPermissionParams struct 79 80 81 Name | Type | Description 82 ------------- | ------------- | ------------- 83 84 ### Return type 85 86 [**SyncV1DocumentPermission**](SyncV1DocumentPermission.md) 87 88 ### Authorization 89 90 [accountSid_authToken](../README.md#accountSid_authToken) 91 92 ### HTTP request headers 93 94 - **Content-Type**: Not defined 95 - **Accept**: application/json 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 ## ListDocumentPermission 103 104 > []SyncV1DocumentPermission ListDocumentPermission(ctx, ServiceSidDocumentSidoptional) 105 106 107 108 Retrieve a list of all Permissions applying to a Sync Document. 109 110 ### Path Parameters 111 112 113 Name | Type | Description 114 ------------- | ------------- | ------------- 115 **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. 116 **ServiceSid** | **string** | The SID of the [Sync Service](https://www.twilio.com/docs/sync/api/service) with the Document Permission resources to read. 117 **DocumentSid** | **string** | The SID of the Sync Document with the Document Permission resources to read. Can be the Document resource's `sid` or its `unique_name`. 118 119 ### Other Parameters 120 121 Other parameters are passed through a pointer to a ListDocumentPermissionParams struct 122 123 124 Name | Type | Description 125 ------------- | ------------- | ------------- 126 **PageSize** | **int** | How many resources to return in each list page. The default is 50, and the maximum is 1000. 127 **Limit** | **int** | Max number of records to return. 128 129 ### Return type 130 131 [**[]SyncV1DocumentPermission**](SyncV1DocumentPermission.md) 132 133 ### Authorization 134 135 [accountSid_authToken](../README.md#accountSid_authToken) 136 137 ### HTTP request headers 138 139 - **Content-Type**: Not defined 140 - **Accept**: application/json 141 142 [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) 143 [[Back to Model list]](../README.md#documentation-for-models) 144 [[Back to README]](../README.md) 145 146 147 ## UpdateDocumentPermission 148 149 > SyncV1DocumentPermission UpdateDocumentPermission(ctx, ServiceSidDocumentSidIdentityoptional) 150 151 152 153 Update an identity's access to a specific Sync Document. 154 155 ### Path Parameters 156 157 158 Name | Type | Description 159 ------------- | ------------- | ------------- 160 **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. 161 **ServiceSid** | **string** | The SID of the [Sync Service](https://www.twilio.com/docs/sync/api/service) with the Document Permission resource to update. 162 **DocumentSid** | **string** | The SID of the Sync Document with the Document Permission resource to update. Can be the Document resource's `sid` or its `unique_name`. 163 **Identity** | **string** | The application-defined string that uniquely identifies the User's Document Permission resource to update. 164 165 ### Other Parameters 166 167 Other parameters are passed through a pointer to a UpdateDocumentPermissionParams struct 168 169 170 Name | Type | Description 171 ------------- | ------------- | ------------- 172 **Read** | **bool** | Whether the identity can read the Sync Document. Default value is `false`. 173 **Write** | **bool** | Whether the identity can update the Sync Document. Default value is `false`. 174 **Manage** | **bool** | Whether the identity can delete the Sync Document. Default value is `false`. 175 176 ### Return type 177 178 [**SyncV1DocumentPermission**](SyncV1DocumentPermission.md) 179 180 ### Authorization 181 182 [accountSid_authToken](../README.md#accountSid_authToken) 183 184 ### HTTP request headers 185 186 - **Content-Type**: application/x-www-form-urlencoded 187 - **Accept**: application/json 188 189 [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) 190 [[Back to Model list]](../README.md#documentation-for-models) 191 [[Back to README]](../README.md) 192