Перейти к основному содержанию
POST
/
v1
/
public
/
accounts
/
{account_id}
/
auth
/
authorizations
Предоставить авторизацию аккаунта
curl --request POST \
  --url https://api.hybridbox.io/v1/public/accounts/{account_id}/auth/authorizations \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "subject_id": "<string>",
  "capability_key": "<string>",
  "resource_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
'
{
  "grant_kind": "<string>",
  "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "subject_id": "<string>",
  "subject_type": "<string>",
  "capability_key": "<string>",
  "created_at": "2023-11-07T05:31:56Z",
  "resource_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "resource_type": "<string>",
  "revoked_at": "2023-11-07T05:31:56Z"
}

Documentation Index

Fetch the complete documentation index at: https://docs.hybridbox.io/llms.txt

Use this file to discover all available pages before exploring further.

Авторизации

Authorization
string
header
обязательно

Public API bearer credential sent as Authorization: Bearer <token>. Use either an OAuth access token or a Hybridbox Service account token.

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

account_id
string<uuid>
обязательно

Тело

application/json

Схема предоставления новой авторизации на основе возможности.

grant_kind
enum<string>
обязательно

Тип предоставления

Доступные опции:
capability,
account_owner,
super_admin
subject_id
string
обязательно

Идентификатор пользователя или группы

Minimum string length: 1
subject_type
enum<string>
обязательно

Тип субъекта: пользователь или группа

Доступные опции:
user,
group,
service_account
capability_key
string | null

Ключ возможности для предоставлений возможностей

resource_id
string<uuid> | null

Идентификатор ресурса в области

resource_type
enum<string> | null

Тип ресурса в области

Доступные опции:
client,
account,
workspace,
domain,
dns_record,
mailbox,
redirect,
forwarding,
credential,
tenant,
route,
proxy

Ответ

grant_kind
string
обязательно
id
string<uuid>
обязательно
subject_id
string
обязательно
subject_type
string
обязательно
capability_key
string | null
created_at
string<date-time> | null
resource_id
string<uuid> | null
resource_type
string | null
revoked_at
string<date-time> | null