latestOpenAPI 3.1.02026-08-194237902.5 MB

563848e0ecc0

Role

List all permissions assigned to a role

Returns the full list of permissions currently assigned to the role identified by roleId within the tenant specified by the required tenant-id header. Use this to inspect what a role grants before assigning it to a user, or to determine which permissions need to be added or removed. The roleId is the string identifier returned when the role was created. Returns an array of permission objects (PermissionResponseDto) — the array will be empty if no permissions are assigned. Returns 400 if the tenant-id header is absent or blank. Note: if the role does not exist, the current implementation returns 500 rather than 404 (tracked in CP-36405).

get/roles/{roleId}/permissions

Path parameters

roleIdstring required

Headers

tenant-idstring

Response

Permissions retrieved successfully

idstring

Server-assigned unique identifier for the permission.

resourcestring

Name of the resource this permission governs (e.g. 'user', 'roster'). Mirrors the resource value supplied when the permission was created or last replaced.

actionstring

Name of the action this permission grants on the resource (e.g. 'read', 'create'). Mirrors the action value supplied when the permission was created or last replaced.

descriptionstring

Human-readable explanation of what the permission allows. Optional; may be null if it was not supplied at creation.

createdAtstring date-time
updatedAtstring date-time

Example response

[
  {
    "id": "perm-123-456-789",
    "resource": "user",
    "action": "read",
    "description": "Allows reading user profiles",
    "createdAt": "2022-03-10T12:15:50-04:00",
    "updatedAt": "2022-03-10T12:15:50-04:00"
  }
]