compute
POST /v1/compute/servers/{serverId}/terminal
Mint a single-use ticket for one web terminal session on a server.
Uwierzytelnianie
Wyślij klucz API jako token bearer. Klucz musi posiadać uprawnienie sites.restart; klucz bez niego jest odrzucany z kodem 403, a nie 404.
Ten punkt końcowy nie wymaga identyfikatora organizacji. Twój klucz już identyfikuje organizację, do której należy, a odpowiedź jest do niej ograniczona.
Wypróbuj
Zastąp wszystko w nawiasach ostrych własnymi wartościami, a zastępczy znacznik klucza kluczem ze swojego pulpitu nawigacyjnego.
curl -X POST https://api.zinndigital.com/v1/compute/servers/{serverId}/terminal \
-H "Authorization: Bearer zdk_live_…" \
-H "Content-Type: application/json" \
-d '{ }'Zalogowany? Konsola API w Twoim panelu uzupełnia rzeczywiste identyfikator organizacji oraz Twój własny klucz i wykonuje żądanie względem aktywnego API, dzięki czemu możesz zobaczyć rzeczywistą odpowiedź. Otwórz ten punkt końcowy w konsoli API
Szczegóły
⛔⛔ 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.
Parametry
| Nazwa | Typ | Wymagane | Co to jest |
|---|---|---|---|
serverId (path) | Uuid | Tak | 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. |
Treść żądania
| Nazwa | Typ | Wymagane | Co to jest |
|---|---|---|---|
username | string | Nie | The login name. "" means root. |
Odpowiedź
| Nazwa | Typ | Wymagane | Co to jest |
|---|---|---|---|
ticket | string | Tak | — |
path | string | Tak | The gateway path on this API's host — connect to wss://<host><path>. |
expires_at | integer | Tak | Unix seconds. |
host | string | Tak | The machine address the gateway will connect to. |
username | string | Tak | — |
Błędy, które ten punkt końcowy może zwrócić
401 · 403 · 404 · 422 · 429 · 503