compute
POST /v1/compute/servers/{serverId}/terminal
Mint a single-use ticket for one web terminal session on a server.
Hitelesítés
Küldjön egy API-kulcsot bearer tokenként. A kulcsnak rendelkeznie kell a(z) sites.restart jogosultsággal; az ezzel nem rendelkező kulcsok esetén a rendszer 403-as hibát ad vissza 404 helyett.
Ez a végpont nem fogad el szervezeti azonosítót. Az Ön kulcsa már azonosítja azt a szervezetet, amelyhez tartozik, és a válasz is erre vonatkozik.
Próbálja ki
Cserélje ki a hegyes zárójelek közötti részt a saját értékeivel, a kulcshelyőrzőt pedig a vezérlőpultján található kulccsal.
curl -X POST https://api.zinndigital.com/v1/compute/servers/{serverId}/terminal \
-H "Authorization: Bearer zdk_live_…" \
-H "Content-Type: application/json" \
-d '{ }'Be van jelentkezve? A vezérlőpultban lévő API-konzol kitölti a valós szervezetazonosítóját és a saját kulcsát, és a kérést az éles API-n futtatja, hogy láthassa a tényleges választ. Nyissa meg ezt a végpontot az API konzolban
Részletek
⛔⛔ 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.
Paraméterek
| Név | Típus | Kötelező | Mi ez |
|---|---|---|---|
serverId (path) | Uuid | Igen | 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. |
Kérés törzse
| Név | Típus | Kötelező | Mi ez |
|---|---|---|---|
username | string | Nem | The login name. "" means root. |
Válasz
| Név | Típus | Kötelező | Mi ez |
|---|---|---|---|
ticket | string | Igen | — |
path | string | Igen | The gateway path on this API's host — connect to wss://<host><path>. |
expires_at | integer | Igen | Unix seconds. |
host | string | Igen | The machine address the gateway will connect to. |
username | string | Igen | — |
Hibák, amelyeket ez a végpont visszaadhattatlan
401 · 403 · 404 · 422 · 429 · 503