Address GroupsГранты на папку

Гранты на папку

Кто имеет доступ к адресам папки. Владельцы адресов сюда не входят — у них доступ по владению. Каждый элемент содержит role — собирать её из флагов на клиенте не нужно.

curl -X GET "https://policy-engine-rest.ezig.workers.dev/api/v1/vaults/demo_vault/address-folders/example_string/grants" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_TOKEN"
{
  "items": [
    {
      "id": "cmr3f41z20001psp7phmyapw3",
      "vaultId": "example_string",
      "subjectType": "user",
      "subjectUserId": "example_string",
      "subjectGroupId": "example_string",
      "targetType": "address",
      "targetAddressId": "123 Main St",
      "targetGroupId": "example_string",
      "role": "viewer",
      "canView": true,
      "canTransfer": true,
      "canCreateAddress": true,
      "grantorId": "example_string",
      "status": "active",
      "createdAt": "2026-07-02T11:25:15.134Z",
      "updatedAt": "2026-07-02T11:25:15.134Z",
      "subject": {
        "id": "example_string",
        "name": "John Doe",
        "username": "John Doe",
        "image": "example_string",
        "color": "example_string",
        "emoji": "example_string"
      },
      "subjectGroup": {
        "id": "example_string",
        "name": "John Doe"
      }
    }
  ]
}
GET
/api/v1/vaults/{code}/address-folders/{id}/grants
GET
Base URLstring

Target server for requests. Edit to use your own host.

Bearer Token
Bearer Tokenstring
Required

better-auth session token. Мобилка/сервисы. Веб использует cookie.

better-auth session token. Мобилка/сервисы. Веб использует cookie.
API Key (cookie: better-auth.session_token)
path
codestring
Required

Уникальный код Vault'а (slug)

Request Preview
Response

Response will appear here after sending the request

Authentication

header
Authorizationstring
Required

Bearer token. better-auth session token. Мобилка/сервисы. Веб использует cookie.

path
parameterstring
Required

API Key for authentication. Provide your API key in the cookie.

Path Parameters

codestring
Required

Уникальный код Vault'а (slug)

Example:
demo_vault

Responses

itemsarray
Required