List All Permissions on a Repository

get

/content/management/api/v1.1/repositories/{id}/permissions

List all permissions on a repository.

Request

Path Parameters
Query Parameters
  • This parameter accepts a non negative integer and is used to control the size of the result.
    Default Value: 100
  • This parameter accepts a non negative integer and is used to control the start index of the result.
    Default Value: 0
  • 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
  • This parameter accepts a boolean flag. If specified as true, then the returned result must include the total result count.
    Default Value: false
Back to Top

Response

Supported Media Types

200 Response

OK.
Body ()
Root Schema : ResourcePermissions
Type: object
ResourcePermissions
Show Source
Nested Schema : aggregationResults
Type: array
Aggregation results.
Show Source
Nested Schema : items
Type: array
Singular resources contained in the collection.
Show Source
Nested Schema : pinned
Type: array
Pinned items. Shows items pinned at the top of search list
Show Source
Nested Schema : AggregationResult
Type: object
Show Source
Nested Schema : ResourcePermission
Type: object
ResourcePermission
Show Source
Nested Schema : PermissionRole
Type: object
PermissionRole
Show Source

304 Response

Not modified.

400 Response

Bad request.

403 Response

Forbidden.

500 Response

Internal server error.
Back to Top

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:

The roleName 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"
          }
        ]
      }
    }
  ]
}
Back to Top