List All Permissions on a Repository
get
/content/management/api/v1.1/repositories/{id}/permissions
List all permissions on a repository.
Request
Path Parameters
-
id: string
id of the repository.
Query Parameters
-
limit(optional): integer(int32)
This parameter accepts a non negative integer and is used to control the size of the result.Default Value:
100
-
links(optional): string
This parameter accepts a comma-separated list of link names. By default, this parameter gives all the links applicable. Possible values are: self, canonical, describedby, first, last, prev, next
-
offset(optional): integer(int32)
This parameter accepts a non negative integer and is used to control the start index of the result.Default Value:
0
-
orderBy(optional): string
This parameter is used to control order of results. The value of this query parameter follows the format of fieldName:[asc/desc]. asc stands for ascending order desc stands for descending order, default order is asc.The only fields allowed in the field name are fullName and type.Default Value:
fullName:asc
-
totalResults(optional): boolean
This parameter accepts a boolean flag. If specified as true, then the returned result must include the total result count.Default Value:
false
Response
Supported Media Types
- application/json
200 Response
OK.
Root Schema : ResourcePermissions
Type:
object
ResourcePermissions
Show Source
-
aggregationResults(optional):
array aggregationResults
Aggregation results.
-
count(optional):
integer(int32)
Total number of records in the current response.
-
hasMore(optional):
boolean
Check whether there are more pages to fetch.
-
items(optional):
array items
Singular resources contained in the collection.
-
limit(optional):
integer(int32)
Actual page size used by the server. This might not be the same as what the client requests.
-
links(optional):
array links
Links of the resource.
-
offset(optional):
integer(int32)
The actual index from which the singular resources are returned.
-
pinned(optional):
array pinned
Pinned items. Shows items pinned at the top of search list
-
scrollId(optional):
string
scrollId if the search resolved to a scroll search.
-
totalResults(optional):
integer(int32)
Total number of rows that satisfy the client request (excluding the paging parameters.)
Nested Schema : items
Type:
array
Singular resources contained in the collection.
Show Source
-
Array of:
object ResourcePermission
ResourcePermission
Nested Schema : links
Type:
array
Links of the resource.
Show Source
-
Array of:
object Link
Link of the resource.
Nested Schema : pinned
Type:
array
Pinned items. Shows items pinned at the top of search list
Show Source
Nested Schema : ResourcePermission
Type:
object
ResourcePermission
Show Source
-
email(optional):
string
email of the user.
-
fullName(optional):
string
full name of the user.
-
groupType(optional):
string
Allowed Values:
[ "CEC", "IDP" ]
type of the group. -
id(optional):
string
userId login name of the user.
-
links(optional):
array links
Read Only:
true
Links -
role(optional):
object PermissionRole
PermissionRole
-
roleName(optional):
string
name of the role on the resource. Deprecated. Replaced by the 'role' property.
-
type(optional):
string
Allowed Values:
[ "user", "group" ]
type of the user.
Nested Schema : links
Type:
array
Read Only:
true
Links
Show Source
-
Array of:
object Link
Link of the resource.
Nested Schema : PermissionRole
Type:
object
PermissionRole
Show Source
-
description(optional):
string
Description of the role. Only applicable to custom editorial or publishing roles.
-
id(optional):
string
ID of the role. Only applicable to permission sets and custom editorial or publishing roles.
-
links(optional):
array links
Links
-
name(optional):
string
Name of the role.
-
type(optional):
string
Allowed Values:
[ "standard", "custom", "editorial", "publishing" ]
Type of the role. Values are 'standard', 'custom', 'editorial', and 'publishing'.
Nested Schema : Link
Type:
object
Link of the resource.
Show Source
-
href(optional):
string
The target resource's URI. It could be template URI. It is a required property in the get response.
-
mediaType(optional):
string
Media type.
-
method(optional):
string
What HTTP method can be used to access the target resource.
-
profile(optional):
string
Link to the metadata that describes the target resource.
-
rel(optional):
string
Relation type. It is a required property in the get response.
-
templated(optional):
boolean
Whether the URI is a template.
304 Response
Not modified.
400 Response
Bad request.
403 Response
Forbidden.
500 Response
Internal server error.
Examples
The following example shows how to list all permissions on a repository by submitting a GET request using cURL.
curl -X GET -H 'Accept: application/json' 'https://host:port/content/management/api/v1.1/repositories/{id}/permissions'
Example 1:
/content/management/api/v1.1/repositories/F0A4079D50E370E0B074F62AE4863ECDF2B8EF156CC7/permissions
Lists a repository permissions, id of the repository: F0A4079D50E370E0B074F62AE4863ECDF2B8EF156CC7
Response Body
{ "hasMore": false, "offset": 0, "count": 2, "limit": 2, "items": [ { "id": "cecuserLoginIdName1", "roleName": "manager", "type": "user", "email": "email1", "fullName": "cecuser1" }, { "id": "cecgroupLoginIdName2", "roleName": "manager", "type": "group", "email": "email2", "fullName": "cecgroup2" } ], "links": [ { "href": "https://<hostname>/content/management/api/v1.1/repositories/F0A4079D50E370E0B074F62AE4863ECDF2B8EF156CC7/permissions", "rel": "self", "method": "GET", "mediaType": "application/json" }, { "href": "https://<hostname>/content/management/api/v1.1/repositories/F0A4079D50E370E0B074F62AE4863ECDF2B8EF156CC7/permissions", "rel": "canonical", "method": "GET", "mediaType": "application/json" }, { "href": "https://<hostname>/content/management/api/v1.1/v1.1/metadata-catalog/repositories/F0A4079D50E370E0B074F62AE4863ECDF2B8EF156CC7/permissions", "rel": "describedby", "method": "GET", "mediaType": "application/schema+json" }, { "href": "https://<hostname>/content/management/api/v1.1/repositories/F0A4079D50E370E0B074F62AE4863ECDF2B8EF156CC7/permissions?offset=0", "rel": "first", "method": "GET", "mediaType": "application/json" }, { "href": "https://<hostname>/content/management/api/v1.1/repositories/F0A4079D50E370E0B074F62AE4863ECDF2B8EF156CC7/permissions?offset=0", "rel": "last", "method": "GET", "mediaType": "application/json" } ] }
Example 2:
/content/management/api/v1.1/repositories/6589BF25F2854E6AA928EE7412CBE6AE/permissions
Lists permissions (shared members) for the repository with id 6589BF25F2854E6AA928EE7412CBE6AE, which has standard role, permission set, and custom editorial role members.
Note:
TheroleName
property is deprecated, it is replaced by
role
property.
Response Body
{ "hasMore": false, "offset": 0, "count": 4, "limit": 4, "items": [ { "id": "cecgroupLoginIdName1", "roleName": "viewer", "role": { "name": "viewer", "type": "standard" }, "type": "group", "groupType": "CEC", "email": null, "fullName": "cecgroup1" }, { "id": "cecuserLoginIdName2", "roleName": "custom", "role": { "id": "7EFD29110FE041ADAC888CCFAEE2923B", "name": "Custom Editor Role", "type": "editorial", "description": "role description", "links": [ { "href": "http://<hostname>/content/management/api/v1.1/repositories/563E63CBB1B142EF8342EFD89C553493/editorialRoles/7EFD29110FE041ADAC888CCFAEE2923B", "rel": "self", "method": "GET", "mediaType": "application/json" } ] }, "type": "user", "email": "useremail2", "fullName": "cecuser2" }, { "id": "cecuserLoginIdName3", "roleName": "custom", "role": { "id": "C0FEEA843CFD47CE9BA14CF2BF762591", "name": "custom", "type": "custom", "links": [ { "href": "http://<hostname>/content/management/api/v1.1/repositories/563E63CBB1B142EF8342EFD89C553493/permissionSets/C0FEEA843CFD47CE9BA14CF2BF762591", "rel": "self", "method": "GET", "mediaType": "application/json" } ] }, "type": "user", "email": "useremail3", "fullName": "cecuser3" }, { "id": "cecuserLoginIdName1", "roleName": "manager", "role": { "name": "manager", "type": "standard" }, "type": "user", "email": "useremail1", "fullName": "cecuser1" } ], "links": [ { "href": "https://<hostname>/content/management/api/v1.1/repositories/6589BF25F2854E6AA928EE7412CBE6AE/permissions", "rel": "self", "method": "GET", "mediaType": "application/json" }, { "href": "https://<hostname>/content/management/api/v1.1/repositories/6589BF25F2854E6AA928EE7412CBE6AE/permissions", "rel": "canonical", "method": "GET", "mediaType": "application/json" }, { "href": "https://<hostname>/content/management/api/v1.1/v1.1/metadata-catalog/repositories/6589BF25F2854E6AA928EE7412CBE6AE/permissions", "rel": "describedby", "method": "GET", "mediaType": "application/schema+json" }, { "href": "https://<hostname>/content/management/api/v1.1/repositories/6589BF25F2854E6AA928EE7412CBE6AE/permissions?offset=0", "rel": "first", "method": "GET", "mediaType": "application/json" }, { "href": "https://<hostname>/content/management/api/v1.1/repositories/6589BF25F2854E6AA928EE7412CBE6AE/permissions?offset=0", "rel": "last", "method": "GET", "mediaType": "application/json" } ] } } ] }