Retrieve Collection Grants
get
/mobile/tools/1.0/collections/{id}/grants
Returns the storage collections grants, which are access permissions and associated roles.
Request
Supported Media Types
- application/json
Path Parameters
- id
-
Type:
string
Required:true
The identifier of the storage collection.
Response
Supported Media Types
- application/json
200 Response
Storage collection grants returned successfully.
Body
Storage collection grants.
Root Schema : storageCollectionGrants
Type:
object
Storage collection grants.
- grants
-
Type:
array
storageCollectionGrantArrayRequired:true
Additional Properties Allowed:Minimum Number of Items:0
An array of storage collection grants.
Nested Schema : storageCollectionGrantArray
Type:
array
Minimum Number of Items:
0
An array of storage collection grants.
-
Type:
object
storageCollectionGrantAdditional Properties Allowed:Access permission and the roles that are granted that permission.
Nested Schema : storageCollectionGrant
Type:
object
Access permission and the roles that are granted that permission.
- action
-
Type:
string
Required:true
The type of access that is granted to members who have one or more of the specified roles. The valid values areREAD
andREAD_WRITE
. - roles
-
Type:
array
stringArrayRequired:true
Additional Properties Allowed:Minimum Number of Items:0
An array of string values.
Nested Schema : stringArray
Examples
The following example shows how to get a collection???s grants. For more information about cURL, see Use cURL.
curl -i -X GET -H "Authorization: Bearer $TOKEN" "$BASE_URL/mobile/tools/1.0/collections/0d1327c9-ef64-4a3f-a685-1d413cc68797/grants"
Example of Response Header
The following shows an example of the response header.
200 OK Content-Length: 108 Content-Type: application/json Date: Thu, 18 Jun 2015 00:26:10 GMT Etag: "4"
Example of Response Body
The following example shows, in JSON format, the contents of the response body.
{ "grants": [ { "action": "READ", "roles": [ "customer" ] }, { "action": "READ_WRITE", "roles": [ "manager", "technician" ] } ] }