Delete Collection Grant
delete
/mobile/tools/1.0/collections/{id}/grants
Removes the collection's grants for the specified permission (action) for the named roles.
Request
Supported Media Types
- application/json
Path Parameters
-
id: string
The identifier of the storage collection.
Header Parameters
-
If-Match(optional): string
The request completes successfully only if the ETag of the corresponding asset matches the value of this HTTP request header. To force overwrite, pass the value `*`.
Access permission and the roles that are granted that permission.
Root Schema : storageCollectionGrant
Type:
object
Access permission and the roles that are granted that permission.
Show Source
-
action:
string
The type of access that is granted to members who have one or more of the specified roles. The valid values are
READ
andREAD_WRITE
. -
roles:
array stringArray
Minimum Number of Items:
0
An array of string values.
Nested Schema : stringArray
Type:
array
Minimum Number of Items:
0
An array of string values.
Show Source
Response
Supported Media Types
- application/json
204 Response
The grants for the specified action for the named roles were removed. No content was returned in this response.
400 Response
The grant wasn't deleted due to an incorrect request.
Root Schema : error
Type:
Show Source
object
-
detail:
string
Message that provides the error details.
-
o:ecid:
string
Execution context ID, which is a unique identifier to correlate events or requests that are associated with the same transaction across several components.
-
o:errorCode:
string
The service's error code.
-
o:errorDetails(optional):
object errorDetails
-
o:errorPath:
string
The relative point in the API path where the error occurred.
-
status:
integer(int64)
HTTP status code. See http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html for more details.
-
title:
string
Summary of the problem.
-
type:
string
The URI to the link that provides details about the HTTP status code.
Nested Schema : errorDetails
Type:
Show Source
object
-
detail:
string
-
o:errorDetails(optional):
object errorDetails
-
title:
string
Summary of the problem.
-
type:
string
The URI to the link that provides details about the HTTP status code.
412 Response
The operation failed based on the `If-Match` condition. Typically, this is the result of concurrent modification detection. It also can be the result of improper values specified in the request headers.
Root Schema : error
Type:
Show Source
object
-
detail:
string
Message that provides the error details.
-
o:ecid:
string
Execution context ID, which is a unique identifier to correlate events or requests that are associated with the same transaction across several components.
-
o:errorCode:
string
The service's error code.
-
o:errorDetails(optional):
object errorDetails
-
o:errorPath:
string
The relative point in the API path where the error occurred.
-
status:
integer(int64)
HTTP status code. See http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html for more details.
-
title:
string
Summary of the problem.
-
type:
string
The URI to the link that provides details about the HTTP status code.
Nested Schema : errorDetails
Type:
Show Source
object
-
detail:
string
-
o:errorDetails(optional):
object errorDetails
-
title:
string
Summary of the problem.
-
type:
string
The URI to the link that provides details about the HTTP status code.
Examples
The following example shows how to delete a collection's grant using cURL.
curl -i -X DELETE -d @body.json -H "Content-Type: application/json; charset=utf-8" -H "Authorization: Bearer $TOKEN" "$BASE_URL/mobile/tools/1.0/collections/0d1327c9-ef64-4a3f-a685-1d413cc68797/grants"
Example of Request Body
The following shows an example of the request body. Note that if there are several roles that are associated with the READ
action, only the customer
grant is removed.
{ "action":"READ", "roles":["customer"] }
Example of Response Header
The following shows an example of the response headers. The 204
status indicates that the grant was either deleted or it did not exist.
204 NO_CONTENT Date: Wed, 28 Jun 2017 20:00:11 GMT Etag: "5"