User/Role

Get all roles

Fetches roles assignable by the current caller. Filters by `actorMaxPriority` and workspace scope. Each row carries the descriptor shape { name, displayName, priority, isSystem } plus `usersCount` and `actions`.

GET
/api/v2/roles

Authorization

BearerAuthObject
AuthorizationBearer <token>

In: header

Query Parameters

limit?integer

Maximum number of roles to return (pagination limit)

Default10
offset?integer

Offset to start pagination

Default0
search?string

Filter roles by name

Response Body

application/json

application/json

application/json

application/json

curl -X GET "https://example.com/api/v2/roles?limit=10&offset=0&search=Administrator"
{  "data": [    {      "name": "Administrator",      "displayName": "Administrator",      "priority": 600,      "isSystem": true,      "usersCount": 28,      "actions": [        "RoleUpdate"      ]    }  ],  "pagination": {    "maxCount": 6  }}
{  "message": {    "error": "Your request was made with invalid credentials."  }}
{  "message": {    "error": "You are not allowed to perform this action."  }}
{  "message": {    "error": "Oops! Something went wrong! Write to administrator. Your Request Id {f1177aee-9a99-42f0-a23f-4dd29fc39b65-672e0df972ccb}"  }}