Перейти к содержимому

Поиск RoleBinding

GET
/roles/bindings

Авторизация

bearer
headerAuthorizationBearer <token>

Токен сервисного аккаунта. См. раздел «Аутентификация».

Query-параметры

sort?array<string>
По умолчанию
[  "id.desc"]
q?string | null
count*number
Диапазонот 1 до 1000
offset*number
Диапазонот 0
subject_type?string
Значения"user""organization""group"
subject_id?number
scope_type?string
Значения"system""template""group""statistics""organization""unit""entity""project"
scope_id?number

Тело ответа

responseapplication/json
count*number
sum*number
offset*number

Возможные ошибки

401Unauthorized

unauthorized: Необходима авторизация

{  "statusCode": 401,  "error": "unauthorized",  "message": "Необходима авторизация"}
403Forbidden

access_denied: Недостаточно прав

{  "statusCode": 403,  "error": "access_denied",  "message": "Недостаточно прав"}
Пример запроса
curl -X GET 'https://org.inspecto.in/api/roles/bindings?count=1&offset=0'
Пример ответа
{  "count": 0,  "sum": 0,  "offset": 0,  "items": [    {      "scope": {        "id": 0,        "slug": "string",        "domain": "string",        "title": "string",        "avatar": "string"      },      "subject": {        "id": 0,        "email": "string",        "phone": "string",        "first_name": "string",        "last_name": "string",        "patronymic": "string",        "birthday": "2019-08-24T14:15:22Z",        "gender": 0,        "avatar": "string",        "created_at": "2019-08-24T14:15:22Z"      },      "id": 0,      "organization_id": 0,      "role": {        "id": "system.admin",        "title": "string",        "description": "string",        "category": "string",        "scopes": [          "string"        ]      },      "scope_type": "system",      "scope_id": 0,      "subject_type": "user",      "subject_id": 0,      "created_at": "2019-08-24T14:15:22Z",      "updated_at": "2019-08-24T14:15:22Z"    }  ]}