563848e0ecc0
Fetch a single role by its ID
Returns the full details of the role identified by roleId within the tenant specified by the required tenant-id header. Use this when you already hold a role ID and need the role's name, description, and metadata; to list all available roles use GET /roles. The roleId path parameter is the string identifier returned when the role was created (e.g. "role-123-456-789"). Returns a single role object (RoleResponseDto) on success. Returns 400 if the tenant-id header is absent or blank. Note: if no role with the given ID exists, the current implementation returns 500 rather than 404 (tracked in CP-36405); verify the ID against GET /roles to find valid values.
Path parameters
Identifier of the role to fetch, as returned in the id field when the role was created (e.g. role-123-456-789). Must reference a role that exists within the tenant.
Headers
Response
Role retrieved successfully
Example response
{
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"name": "Business Admin",
"tenantId": "8f14e45f-ceea-467e-9906-ccfb98d21f95",
"description": "Full access to all operations",
"createdAt": "2022-03-10T12:15:50-04:00",
"updatedAt": "2022-03-10T12:15:50-04:00",
"createdBy": "b7e685c1-6b2a-4e3a-9c1a-2f8b6d9e4a11",
"updatedBy": "b7e685c1-6b2a-4e3a-9c1a-2f8b6d9e4a11"
}