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.
Request
- Base URLhttps://$SCALEKIT_ENVIRONMENT_URL
- AuthOAuth 2Client credentialsToken URLhttps://$SCALEKIT_ENVIRONMENT_URL/oauth/token
- TypeScriptA function with typed inputs. Its response is checked against the schema.
Query parameters
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"
}
]
}Changes
No recorded changes to this operation across all 16 revisions of this API.