compute
POST /v1/compute/servers/{serverId}/terminal
Mint a single-use ticket for one web terminal session on a server.
Автентифікація
Надішліть ключ API як маркер носія (bearer token). Ключ повинен мати дозвіл sites.restart; ключ без нього відхиляється з кодом 403, а не 404.
Цей кінцевий пункт не потребує ідентифікатора організації. Ваш ключ уже ідентифікує організацію, якій він належить, і відповідь обмежується її межами.
Спробувати
Замініть усе в кутових дужках власними значеннями, а заповнювач ключа — ключем із вашої панелі керування.
curl -X POST https://api.zinndigital.com/v1/compute/servers/{serverId}/terminal \
-H "Authorization: Bearer zdk_live_…" \
-H "Content-Type: application/json" \
-d '{ }'Увійшли в систему? Консоль API у вашій панелі керування автоматично підставляє ваш реальний ідентифікатор організації та ваш власний ключ, а також виконує запит до робочого API, щоб ви могли побачити справжню відповідь. Відкрийте цю кінцеву точку в консолі API
Деталі
⛔⛔ The ticket is a credential: one use, sixty seconds. Open wss://<this API's host><path> and send it as the FIRST message — {"type":"auth","ticket":"…","cols":N,"rows":N} — never in the URL, which access logs keep. After that, binary frames are keystrokes and terminal output; text frames are {"type":"resize",…} from the client and {"type":"status","state","code","message"} from the gateway. The gateway logs in over SSH with the organisation's terminal key and pins the machine's host key on first use; a changed key is refused (code: host_key_changed). Every ticket, connection, failure and close is audit-logged — who, when, how long and how many bytes, never what was typed. 422 when the terminal is off, the login name is not one a server accepts, or the machine has no public address. Requires sites.restart.
Параметри
| Назва | Тип | Обов'язкове | Що це таке |
|---|---|---|---|
serverId (path) | Uuid | Так | The server's id, as listComputeServers reports it. Ours (UUIDv7), minted when the order row was written — never the provider's own identifier for the machine. |
Тіло запиту
| Назва | Тип | Обов'язкове | Що це таке |
|---|---|---|---|
username | string | Ні | The login name. "" means root. |
Відповідь
| Назва | Тип | Обов'язкове | Що це таке |
|---|---|---|---|
ticket | string | Так | — |
path | string | Так | The gateway path on this API's host — connect to wss://<host><path>. |
expires_at | integer | Так | Unix seconds. |
host | string | Так | The machine address the gateway will connect to. |
username | string | Так | — |
Помилки, які може повертати ця кінцева точка
401 · 403 · 404 · 422 · 429 · 503