compute
POST /v1/compute/servers/{serverId}/terminal
Mint a single-use ticket for one web terminal session on a server.
المصادقة
أرسل مفتاح واجهة برمجة التطبيقات (API key) كرمز حامل (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
التفاصيل
⛔⛔ 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