Roles
List all roles in environment
Retrieves a comprehensive list of all roles available within the specified environment including organization roles. Use this endpoint to view all role definitions, including custom roles and their configurations. You can optionally include permission details for each role to understand their capabilities. This is useful for role management, auditing organization access controls, or understanding the available access levels within the organization.
get/api/v1/roles
Query parameters
includestring
Include additional data in the response. Valid values: 'permissions' (direct permissions only), 'permissions:all' (includes inherited permissions from role hierarchy)
Response
Successfully retrieved list of roles. Returns all roles with their metadata and optionally their permissions.
Example response
{
"roles": [
{
"display_name": "Administrator",
"id": "role_1234abcd5678efgh",
"name": "admin"
},
{
"display_name": "Viewer",
"id": "role_9876zyxw5432vuts",
"name": "viewer"
}
]
}