Retrieves the details of a specific custom RBAC role by its ID.
Use this endpoint to confirm a role's name, description, and type before updating it or assigning it to a user.
About Get Role
This endpoint returns the metadata for a single custom role — name, description, and role_type — identified by its UUID. It does not return the role's associated scopes; use GET /authz2/v1/roles/{role_id}/scopes to retrieve the permission set. This endpoint is useful for validating role details before making updates via PATCH /authz2/v1/roles/{role_id}.
Key Fields (Response)
id — the UUID of the role
name — the display name of the role
description — the human-readable description of the role's intended purpose
role_type — integer indicating the type of role
Common Use Cases
Confirming role details before assigning it to a user via PUT /authz2/v1/users/{user_id}
Verifying that a role's name and description are accurate before referencing it in documentation or automation
Retrieving role metadata as a precursor to updating it via PATCH /authz2/v1/roles/{role_id}
Best Practices
Use GET /authz2/v1/roles/ first if you don't have the role_id — this endpoint requires it as a path parameter
Pair this with GET /authz2/v1/roles/{role_id}/scopes to get a complete picture of what a role does before assigning it to users
Workflow
Obtain the role_id from GET /authz2/v1/roles/
Call GET /authz2/v1/roles/{role_id} to confirm the role's name and description
Proceed with user assignment or update as needed
- Mock serverhttps://api.esper.io/_mock/openapi/authz2/v1/roles/{role_id}
- https://develop-api.esper.cloud/apihttps://develop-api.esper.cloud/api/authz2/v1/roles/{role_id}
curl -i -X GET \
'https://api.esper.io/_mock/openapi/authz2/v1/roles/{role_id}' \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>'{ "id": "string", "name": "string", "description": "string", "role_type": 0 }