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

Получить RoleBinding

GET
/roles/bindings/{binding_id}

Авторизация

bearer
headerAuthorizationBearer <token>

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

Параметры пути

binding_id*number

Тело ответа

responseapplication/json
organization_id*number
id*number
subject_type*string
Значения"user""organization""group"
subject_id*number | null
scope_type*string
Значения"system""template""group""statistics""organization""unit""entity""project"
scope_id*number | null

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

401Unauthorized

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

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

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

{  "statusCode": 403,  "error": "access_denied",  "message": "Недостаточно прав"}
404Not Found

role_binding_not_found: Роль не найдена

{  "statusCode": 404,  "error": "role_binding_not_found",  "message": "Роль не найдена"}
Пример запроса
curl -X GET 'https://org.inspecto.in/api/roles/bindings/0'
Пример ответа
{  "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"  },  "scope": {    "id": 0,    "slug": "string",    "domain": "string",    "title": "string",    "avatar": "string"  },  "organization_id": 0,  "id": 0,  "role": {    "id": "system.admin",    "title": "string",    "description": "string",    "category": "string",    "scopes": [      "string"    ]  },  "subject_type": "user",  "subject_id": 0,  "scope_type": "system",  "scope_id": 0}