> ## 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.

# Аккаунты

> Проверять записи аккаунтов и списки аккаунтов.

# Аккаунты

Проверять записи аккаунтов и списки аккаунтов.

<script src="/locale-bridge.js" />

В примерах используется режим кода A2A. MCP предоставляет тот же режим кода через инструмент `execute`.

## Функции

### `accounts.get`

```text theme={null}
accounts.get(account_id: str) -> Account
```

Аккаунты: `accounts.get`.

| Свойство              | Значение                               | Свойство                 | Значение       |
| --------------------- | -------------------------------------- | ------------------------ | -------------- |
| Требуемое разрешение  | `account.view`                         | Требуется аутентификация | `да`           |
| Режим выполнения      | `sync`                                 | Возможность              | `account.view` |
| Тип ресурса           | `account`                              | Поле ID ресурса          | `account_id`   |
| Публичный маршрут API | `GET /v1/public/accounts/{account_id}` |                          |                |

<AccordionGroup>
  <Accordion title="Аргументы">
    | Имя          | Тип   | Обязательный |
    | ------------ | ----- | ------------ |
    | `account_id` | `str` | да           |
  </Accordion>

  <Accordion title="Возвращает">
    | Поле         | Тип                        | Обязательный |
    | ------------ | -------------------------- | ------------ |
    | `client`     | `{"id": str, "name": str}` | да           |
    | `created_at` | `str`                      | да           |
    | `id`         | `str`                      | да           |
    | `name`       | `str`                      | да           |
    | `status`     | `str`                      | да           |
    | `updated_at` | `str`                      | да           |
  </Accordion>

  <Accordion title="Пример A2A">
    Запрос:

    ```json theme={null}
    {
      "request_id": "example",
      "session_id": "session_123",
      "code": "accounts.get(account_id=\"3c90c3cc-0d44-4b50-8888-8dd25736052a\")"
    }
    ```

    Ответ:

    ```json theme={null}
    {
      "request_id": "example",
      "status": "completed",
      "result": {
        "last_value": {
          "client": {
            "id": "<string>",
            "name": "<string>"
          },
          "created_at": "<string>",
          "id": "<string>",
          "name": "<string>",
          "status": "<string>",
          "updated_at": "<string>"
        }
      },
      "responses": [
        {
          "index": 0,
          "function": "accounts.get",
          "status": "completed",
          "result": {
            "client": {
              "id": "<string>",
              "name": "<string>"
            },
            "created_at": "<string>",
            "id": "<string>",
            "name": "<string>",
            "status": "<string>",
            "updated_at": "<string>"
          }
        }
      ],
      "complexity_score": 1
    }
    ```
  </Accordion>

  <Accordion title="Пример MCP">
    Запрос:

    ```json theme={null}
    {
      "jsonrpc": "2.0",
      "id": "example",
      "method": "tools/call",
      "params": {
        "name": "hybridbox_execute",
        "arguments": {
          "code": "accounts.get(account_id=\"3c90c3cc-0d44-4b50-8888-8dd25736052a\")"
        }
      }
    }
    ```

    Ответ:

    ```json theme={null}
    {
      "jsonrpc": "2.0",
      "id": "example",
      "result": {
        "content": [
          {
            "type": "text",
            "text": "{\n  \"request_id\": \"example\",\n  \"status\": \"completed\",\n  \"result\": {\n    \"last_value\": {\n      \"client\": {\n        \"id\": \"<string>\",\n        \"name\": \"<string>\"\n      },\n      \"created_at\": \"<string>\",\n      \"id\": \"<string>\",\n      \"name\": \"<string>\",\n      \"status\": \"<string>\",\n      \"updated_at\": \"<string>\"\n    }\n  },\n  \"responses\": [\n    {\n      \"index\": 0,\n      \"function\": \"accounts.get\",\n      \"status\": \"completed\",\n      \"result\": {\n        \"client\": {\n          \"id\": \"<string>\",\n          \"name\": \"<string>\"\n        },\n        \"created_at\": \"<string>\",\n        \"id\": \"<string>\",\n        \"name\": \"<string>\",\n        \"status\": \"<string>\",\n        \"updated_at\": \"<string>\"\n      }\n    }\n  ],\n  \"complexity_score\": 1\n}"
          }
        ],
        "isError": false
      }
    }
    ```
  </Accordion>
</AccordionGroup>

### `accounts.list`

```text theme={null}
accounts.list(client_id?: str | null, page?: int, page_size?: int, status?: str | null) -> Page[Account]
```

Аккаунты: `accounts.list`.

| Свойство              | Значение                  | Свойство                 | Значение       |
| --------------------- | ------------------------- | ------------------------ | -------------- |
| Требуемое разрешение  | `account.view`            | Требуется аутентификация | `да`           |
| Режим выполнения      | `sync`                    | Возможность              | `account.view` |
| Тип ресурса           | `account`                 | Поле ID ресурса          | `account_id`   |
| Публичный маршрут API | `GET /v1/public/accounts` |                          |                |

<AccordionGroup>
  <Accordion title="Аргументы">
    | Имя         | Тип           | Обязательный |
    | ----------- | ------------- | ------------ |
    | `client_id` | `str \| null` | нет          |
    | `page`      | `int`         | нет          |
    | `page_size` | `int`         | нет          |
    | `status`    | `str \| null` | нет          |
  </Accordion>

  <Accordion title="Возвращает">
    | Поле        | Тип                                                                                                                   | Обязательный |
    | ----------- | --------------------------------------------------------------------------------------------------------------------- | ------------ |
    | `items`     | `[{"client": {"id": str, "name": str}, "created_at": str, "id": str, "name": str, "status": str, "updated_at": str}]` | да           |
    | `page`      | `int`                                                                                                                 | да           |
    | `page_size` | `int`                                                                                                                 | да           |
    | `total`     | `int`                                                                                                                 | да           |
  </Accordion>

  <Accordion title="Пример A2A">
    Запрос:

    ```json theme={null}
    {
      "request_id": "example",
      "session_id": "session_123",
      "code": "accounts.list(client_id=\"3c90c3cc-0d44-4b50-8888-8dd25736052a\", page=123, page_size=123, status=\"<string>\")"
    }
    ```

    Ответ:

    ```json theme={null}
    {
      "request_id": "example",
      "status": "completed",
      "result": {
        "last_value": {
          "items": [
            {
              "client": {
                "id": "<string>",
                "name": "<string>"
              },
              "created_at": "<string>",
              "id": "<string>",
              "name": "<string>",
              "status": "<string>",
              "updated_at": "<string>"
            }
          ],
          "page": 123,
          "page_size": 123,
          "total": 123
        }
      },
      "responses": [
        {
          "index": 0,
          "function": "accounts.list",
          "status": "completed",
          "result": {
            "items": [
              {
                "client": {
                  "id": "<string>",
                  "name": "<string>"
                },
                "created_at": "<string>",
                "id": "<string>",
                "name": "<string>",
                "status": "<string>",
                "updated_at": "<string>"
              }
            ],
            "page": 123,
            "page_size": 123,
            "total": 123
          }
        }
      ],
      "complexity_score": 1
    }
    ```
  </Accordion>

  <Accordion title="Пример MCP">
    Запрос:

    ```json theme={null}
    {
      "jsonrpc": "2.0",
      "id": "example",
      "method": "tools/call",
      "params": {
        "name": "hybridbox_execute",
        "arguments": {
          "code": "accounts.list(client_id=\"3c90c3cc-0d44-4b50-8888-8dd25736052a\", page=123, page_size=123, status=\"<string>\")"
        }
      }
    }
    ```

    Ответ:

    ```json theme={null}
    {
      "jsonrpc": "2.0",
      "id": "example",
      "result": {
        "content": [
          {
            "type": "text",
            "text": "{\n  \"request_id\": \"example\",\n  \"status\": \"completed\",\n  \"result\": {\n    \"last_value\": {\n      \"items\": [\n        {\n          \"client\": {\n            \"id\": \"<string>\",\n            \"name\": \"<string>\"\n          },\n          \"created_at\": \"<string>\",\n          \"id\": \"<string>\",\n          \"name\": \"<string>\",\n          \"status\": \"<string>\",\n          \"updated_at\": \"<string>\"\n        }\n      ],\n      \"page\": 123,\n      \"page_size\": 123,\n      \"total\": 123\n    }\n  },\n  \"responses\": [\n    {\n      \"index\": 0,\n      \"function\": \"accounts.list\",\n      \"status\": \"completed\",\n      \"result\": {\n        \"items\": [\n          {\n            \"client\": {\n              \"id\": \"<string>\",\n              \"name\": \"<string>\"\n            },\n            \"created_at\": \"<string>\",\n            \"id\": \"<string>\",\n            \"name\": \"<string>\",\n            \"status\": \"<string>\",\n            \"updated_at\": \"<string>\"\n          }\n        ],\n        \"page\": 123,\n        \"page_size\": 123,\n        \"total\": 123\n      }\n    }\n  ],\n  \"complexity_score\": 1\n}"
          }
        ],
        "isError": false
      }
    }
    ```
  </Accordion>
</AccordionGroup>
