{"openapi": "3.0.3", "info": {"title": "VoltHost Developer API", "version": "1.0.0", "description": "HTTP API v1 для разработчиков. Envelope {status,data,error,request_id}. Idempotency-Key, async jobs, webhooks HMAC, scopes, IP allowlist, rate limits.", "contact": {"name": "VoltHost", "url": "https://docs.volthost.pro"}}, "servers": [{"url": "https://api.volthost.pro", "description": "Production"}], "components": {"securitySchemes": {"bearerAuth": {"type": "http", "scheme": "bearer", "bearerFormat": "vh_live_"}}, "parameters": {"IdempotencyKey": {"name": "Idempotency-Key", "in": "header", "required": false, "schema": {"type": "string", "maxLength": 128}, "description": "Повтор с тем же ключом и телом вернёт тот же ответ"}}, "schemas": {"Error": {"type": "object", "properties": {"error": {"type": "object", "properties": {"code": {"type": "string"}, "message": {"type": "string"}}}, "request_id": {"type": "string"}}}}}, "security": [{"bearerAuth": []}], "tags": [{"name": "meta"}, {"name": "account"}, {"name": "catalog"}, {"name": "servers"}, {"name": "orders"}, {"name": "billing"}, {"name": "tokens"}, {"name": "jobs"}, {"name": "webhooks"}, {"name": "audit"}], "paths": {"/health": {"get": {"tags": ["meta"], "security": [], "summary": "Healthcheck", "responses": {"200": {"description": "OK"}}}}, "/v1": {"get": {"tags": ["meta"], "security": [], "summary": "Каталог эндпоинтов и границы доступа", "responses": {"200": {"description": "OK"}}}}, "/v1/openapi.json": {"get": {"tags": ["meta"], "security": [], "summary": "OpenAPI 3.0", "responses": {"200": {"description": "OK"}}}}, "/v1/account": {"get": {"tags": ["account"], "summary": "Профиль и баланс"}}, "/v1/account/balance": {"get": {"tags": ["account"], "summary": "Только баланс"}}, "/v1/account/transactions": {"get": {"tags": ["account"], "summary": "История транзакций"}}, "/v1/catalog": {"get": {"tags": ["catalog"], "summary": "regions + plans + os"}}, "/v1/catalog/regions": {"get": {"tags": ["catalog"], "summary": "Локации"}}, "/v1/catalog/regions/{id}": {"get": {"tags": ["catalog"], "summary": "Локация по id"}}, "/v1/catalog/plans": {"get": {"tags": ["catalog"], "summary": "Тарифы", "parameters": [{"name": "region_id", "in": "query", "schema": {"type": "string"}}]}}, "/v1/catalog/plans/{id}": {"get": {"tags": ["catalog"], "summary": "Тариф по id"}}, "/v1/catalog/os": {"get": {"tags": ["catalog"], "summary": "ОС"}}, "/v1/catalog/os/{id}": {"get": {"tags": ["catalog"], "summary": "ОС по id"}}, "/v1/catalog/quote": {"post": {"tags": ["catalog"], "summary": "Расчёт цены", "requestBody": {"required": true, "content": {"application/json": {"schema": {"type": "object", "required": ["plan_id"], "properties": {"plan_id": {"type": "string"}, "period_months": {"type": "integer", "default": 1}, "region_id": {"type": "string"}}}}}}}}, "/v1/servers": {"get": {"tags": ["servers"], "summary": "Список серверов (page/limit + status/region_id/lifecycle)", "parameters": [{"name": "page", "in": "query", "schema": {"type": "integer"}}, {"name": "limit", "in": "query", "schema": {"type": "integer"}}, {"name": "status", "in": "query", "schema": {"type": "string"}}, {"name": "region_id", "in": "query", "schema": {"type": "string"}}, {"name": "lifecycle", "in": "query", "schema": {"type": "string"}}]}, "post": {"tags": ["servers"], "summary": "Создать сервер (списание с баланса)", "parameters": [{"$ref": "#/components/parameters/IdempotencyKey"}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"type": "object", "required": ["plan_id", "region_id", "os_id"], "properties": {"plan_id": {"type": "string"}, "region_id": {"type": "string"}, "os_id": {"type": "integer"}, "period_months": {"type": "integer", "default": 1}, "async": {"type": "boolean", "default": false, "description": "true → 202 + job_id (очередь)"}}}}}}}}, "/v1/jobs": {"get": {"tags": ["jobs"], "summary": "Список jobs аккаунта"}}, "/v1/jobs/{id}": {"get": {"tags": ["jobs"], "summary": "Статус job"}}, "/v1/servers/{id}": {"get": {"tags": ["servers"], "summary": "Карточка сервера"}, "patch": {"tags": ["servers"], "summary": "Обновить label / auto_renew", "requestBody": {"content": {"application/json": {"schema": {"type": "object", "properties": {"label": {"type": "string"}, "auto_renew": {"type": "boolean"}}}}}}}, "delete": {"tags": ["servers"], "summary": "Удалить сервер"}}, "/v1/servers/{id}/start": {"post": {"tags": ["servers"], "summary": "Запуск"}}, "/v1/servers/{id}/stop": {"post": {"tags": ["servers"], "summary": "Остановка"}}, "/v1/servers/{id}/reboot": {"post": {"tags": ["servers"], "summary": "Перезагрузка"}}, "/v1/servers/{id}/reinstall": {"post": {"tags": ["servers"], "summary": "Переустановка ОС", "requestBody": {"content": {"application/json": {"schema": {"type": "object", "properties": {"os_id": {"type": "integer"}}}}}}}}, "/v1/servers/{id}/renew": {"post": {"tags": ["servers"], "summary": "Продлить с баланса", "parameters": [{"$ref": "#/components/parameters/IdempotencyKey"}]}}, "/v1/servers/{id}/sync": {"post": {"tags": ["servers"], "summary": "Синхронизировать IP/статус"}}, "/v1/servers/{id}/credentials": {"get": {"tags": ["servers"], "summary": "SSH доступ"}}, "/v1/orders": {"get": {"tags": ["orders"], "summary": "Заказы пользователя"}}, "/v1/orders/{id}": {"get": {"tags": ["orders"], "summary": "Заказ по id"}}, "/v1/topups": {"get": {"tags": ["billing"], "summary": "История пополнений"}, "post": {"tags": ["billing"], "summary": "Создать crypto-счёт на пополнение", "parameters": [{"$ref": "#/components/parameters/IdempotencyKey"}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"type": "object", "required": ["amount_rub"], "properties": {"amount_rub": {"type": "number"}}}}}}}}, "/v1/topups/{id}": {"get": {"tags": ["billing"], "summary": "Пополнение по id"}}, "/v1/tokens": {"get": {"tags": ["tokens"], "summary": "Список API-токенов"}, "post": {"tags": ["tokens"], "summary": "Создать токен", "requestBody": {"content": {"application/json": {"schema": {"type": "object", "properties": {"name": {"type": "string"}, "scopes": {"type": "array", "items": {"type": "string"}, "description": "По умолчанию [*]"}}}}}}}}, "/v1/tokens/{id}": {"delete": {"tags": ["tokens"], "summary": "Отозвать токен"}}, "/v1/tokens/{id}/rotate": {"post": {"tags": ["tokens"], "summary": "Ротация секрета токена"}}, "/v1/servers/bulk-delete": {"post": {"tags": ["servers"], "summary": "Массовое удаление {ids}"}}, "/v1/servers/{id}/actions": {"post": {"tags": ["servers"], "summary": "Lifecycle action"}}, "/v1/billing/invoices": {"get": {"tags": ["billing"], "summary": "Invoices из ledger"}}, "/v1/webhooks": {"get": {"tags": ["webhooks"], "summary": "Список webhook-подписок"}, "post": {"tags": ["webhooks"], "summary": "Создать webhook", "requestBody": {"required": true, "content": {"application/json": {"schema": {"type": "object", "required": ["url"], "properties": {"url": {"type": "string"}, "events": {"type": "array", "items": {"type": "string"}}}}}}}}}, "/v1/webhooks/{id}": {"delete": {"tags": ["webhooks"], "summary": "Отключить webhook"}}, "/v1/webhooks/{id}/deliveries": {"get": {"tags": ["webhooks"], "summary": "Лог доставки webhook"}}, "/v1/webhooks/{id}/deliveries/{delivery_id}/replay": {"post": {"tags": ["webhooks"], "summary": "Replay webhook delivery"}}, "/v1/webhooks/deliveries/{delivery_id}/replay": {"post": {"tags": ["webhooks"], "summary": "Replay delivery by id"}}, "/v1/audit": {"get": {"tags": ["audit"], "summary": "Журнал действий аккаунта", "parameters": [{"name": "limit", "in": "query", "schema": {"type": "integer"}}, {"name": "offset", "in": "query", "schema": {"type": "integer"}}]}}, "/v1/audit/logs": {"get": {"tags": ["audit"], "summary": "Alias → /v1/audit"}}, "/v1/logs": {"get": {"tags": ["audit"], "summary": "Alias → /v1/audit"}}}}