List roles
Retrieve all roles in your workspace including their assigned permissions. Results are paginated and sorted by their id.
Required Permissions
Your root key must have the following permission:
- rbac.*.read_role
Request body
Example request
{
"limit": 50,
"cursor": "eyJrZXkiOiJyb2xlXzEyMzQifQ==",
"search": "admin"
}Response
Roles retrieved successfully
Example response
{
"meta": {
"requestId": "req_123"
},
"data": [
{
"id": "role_1234567890abcdef",
"name": "support.readonly",
"description": "Provides read-only access for customer support representatives to view user accounts and support tickets",
"permissions": [
{
"id": "perm_1234567890abcdef",
"name": "users.read",
"slug": "users-read",
"description": "Allows reading user profile information and account details"
}
]
}
],
"pagination": {
"cursor": "eyJrZXkiOiJrZXlfMTIzNCIsInRzIjoxNjk5Mzc4ODAwfQ==",
"hasMore": true
}
}Changes
Changed in 5 of the 92 revisions of this API.6
- ○
the endpoint scheme security
bearerwas added to the APIapi-security-added
- ○
the endpoint scheme security
rootKeywas removed from the APIapi-security-removed
This revision also has 5 changes that name no endpoint, such as unreferenced schemas being removed. See the revision's changelog
- ○
- ○
the response property
paginationbecame required for the status200response-property-became-required
- ○
- ○
added the new optional request property
searchnew-optional-request-property
- ○
- ○
added the non-success response with the status
429response-non-success-status-added
- ○
- ○
api operation id
listRolesremoved and replaced withpermissions.listRolesapi-operation-id-removed
- ○