compute

POST /v1/compute/servers/{serverId}/terminal

Mint a single-use ticket for one web terminal session on a server.

Барлық compute соңғы нүктелері

Барлық әзірлеуші құжаттамасы

Аутентификация

API кілтін bearer токені ретінде жіберіңіз. Кілтте sites.restart рұқсаты болуы тиіс; онсыз кілтке 404 емес, 403 қатесі қайтарылады.

Бұл соңғы нүкте ұйым идентификаторын қабылдамайды. Сіздің кілтіңіз оның қай ұйымға тиесілі екенін өзі анықтайды және жауап соған шектеледі.

Әрекет етіп көру

Бұрыштық жақшалардағы кез келген нәрсені өз мәндеріңізбен, ал кілт орналастырушысын басқару тақтасынан алынған кілтпен алмастырыңыз.

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.

Параметрлер

АтыTүріМіндеттіМазмұны
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.

Сұрау денесі

АтыTүріМіндеттіМазмұны
usernamestringЖоқThe login name. "" means root.

Жауап

АтыTүріМіндеттіМазмұны
ticketstringИә
pathstringИәThe gateway path on this API's host — connect to wss://<host><path>.
expires_atintegerИәUnix seconds.
hoststringИәThe machine address the gateway will connect to.
usernamestringИә

Бұл соңғы нүкте қайтара алатын қателер

401 · 403 · 404 · 422 · 429 · 503