563848e0ecc0
Add permissions to a role without removing existing ones
Adds one or more permissions to the role identified by roleId, leaving any existing permissions intact. Use this when you want to expand a role's permission set without affecting what it already has; to simultaneously add and remove permissions in one call use PATCH /roles/{roleId}/permissions/bulk. Requires the tenant-id header (returns 400 if absent or blank). The request body must include a permissionIds array of permission ID strings; obtain valid permission IDs from the permissions list endpoints. Returns 200 with the complete, updated list of all permissions now assigned to the role — not just the newly added ones. Note: if the role does not exist, the current implementation returns 500 rather than 404 (tracked in CP-36405).
Path parameters
Headers
Request body
Example request
{
"permissionIds": [
"2c5ea4c0-4067-4c5f-9dd1-3f4a0d2c5b09",
"7a1e9c3d-8b2f-4a6e-9d3c-1f5b7e2a4c88"
]
}Response
Permissions added successfully
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"
}
]