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:
stringRequired:trueThe 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:
objectStorage collection grants.
- grants
-
Type:
arraystorageCollectionGrantArrayRequired:trueAdditional Properties Allowed:Minimum Number of Items:0An array of storage collection grants.
Nested Schema : storageCollectionGrantArray
Type:
arrayMinimum Number of Items:
0An array of storage collection grants.
-
Type:
objectstorageCollectionGrantAdditional Properties Allowed:Access permission and the roles that are granted that permission.
Nested Schema : storageCollectionGrant
Type:
objectAccess permission and the roles that are granted that permission.
- action
-
Type:
stringRequired:trueThe type of access that is granted to members who have one or more of the specified roles. The valid values areREADandREAD_WRITE. - roles
-
Type:
arraystringArrayRequired:trueAdditional Properties Allowed:Minimum Number of Items:0An 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"
]
}
]
}