Retrieval

Retrieve Permissions for particular resource

If a resource is specified, permissions for the particular resource are returned. In this case the array will contain a single item.

Method: GET
Path: /pulp/api/v2/permissions/
Permission: read
Query Parameters: Resource path URI should be specifield. For example to retrieve permissions for “/v2/actions/login/”: /v2/permissions/?resource=%2Fv2%2Factions%2Flogin%2F
Response Codes:
  • 200 - containing the array of permissions for specified resource

Return: array of database representation of permissions for specified resource

Sample 200 Response Body:

[
 {
    "_id": {
        "$oid": "546a6ece6754762f1c34b1db"
    },
    "_ns": "permissions",
    "id": "546a6ece6754762f1c34b1db",
    "resource": "/v2/actions/login/",
    "users": {
        "admin": [
            "READ",
            "UPDATE"
        ]
    }
 }
]

Retrieve Permissions for all resources

Returns information on permissions for all resources.

Method: GET
Path: /pulp/api/v2/permissions/
Permission: read
Query Parameters:
Response Codes:
  • 200 - containing the array of permissions

Return: array of database representation of permissions

Sample 200 Response Body:

[
 {
   "_ns": "permissions",
   "_id": {
     "$oid": "5035917fe5e7106f4100000c"
   },
   "resource": "/v2/actions/login/",
   "id": "5035917fe5e7106f4100000c",
   "users": {
     "admin": [
       "READ",
       "UPDATE"
     ]
   }
 },
 {
   "_ns": "permissions",
   "_id": {
     "$oid": "5035917fe5e7106f4100000d"
   },
   "resource": "/v2/actions/logout/",
   "id": "5035917fe5e7106f4100000d",
   "users": {
     "admin": [
       "READ",
       "UPDATE"
     ]
   }
 },
 {
   "_ns": "permissions",
   "_id": {
     "$oid": "5035917fe5e7106f41000010"
   },
   "resource": "/",
   "id": "5035917fe5e7106f41000010",
   "users": {
     "admin": [
       "CREATE",
       "READ",
       "UPDATE",
       "DELETE",
       "EXECUTE"
     ]
   }
 }
]