compute
POST /v1/compute/servers/{serverId}/root-password
Reset a server's root password. ⛔ Reboots the machine.
การยืนยันตัวตน
ส่ง API key ในรูปแบบ bearer token คีย์ดังกล่าวต้องมีสิทธิ์ sites.delete หากไม่มีสิทธิ์ ระบบจะปฏิเสธด้วยรหัส 403 แทนที่จะเป็น 404
ปลายทางนี้ไม่ต้องใช้รหัสองค์กร คีย์ของคุณระบุองค์กรที่เป็นเจ้าของอยู่แล้ว และการตอบกลับจะถูกจำกัดขอบเขตไว้เฉพาะองค์กรนั้น
ทดลองใช้เลย
แทนที่สิ่งใดๆ ที่อยู่ภายในวงเล็บแหลมด้วยค่าของคุณเอง และตัวยึดตำแหน่งคีย์ด้วยคีย์จากแดชบอร์ดของคุณ
curl -X POST https://api.zinndigital.com/v1/compute/servers/{serverId}/root-password \
-H "Authorization: Bearer zdk_live_…" \
-H "Content-Type: application/json" \
-d '{ "password": <string>, "confirm": <string> }'เข้าสู่ระบบแล้วใช่ไหม คอนโซล API ในแดชบอร์ดของคุณจะเติมรหัสองค์กรจริงและคีย์ของคุณเองโดยอัตโนมัติ และทำการส่งคำขอไปยัง API จริง เพื่อให้คุณเห็นผลลัพธ์ที่เป็นข้อมูลจริง เปิดจุดสิ้นสุดนี้ในคอนโซล API
รายละเอียด
⭐⭐ **The other half of "I am locked out of my own server"**, and the half a console alone does not solve: the console gets you to a login prompt, and this is what you type into it when the password is the thing you lost. ⛔⛔ **The machine reboots.** The provider restarts the guest as part of applying the change, so everything running on it goes offline for a minute or two. A surface offering this must say so *before* the button, not in the result. ⛔ Requires `sites.delete`, **not** `sites.restart`: a root password is total control of the machine and everything on it, which is the same order of trust as destroying it. The server's name must be typed to confirm, and that is checked server-side — a dialog the client owns is a dialog an API caller never sees. ⛔ At least 16 characters, length only and no composition rules: this credential faces the public internet on port 22, and length is what makes it hard to guess. The value is never logged, never audited and never echoed back. `503` on a range whose provider publishes no reset (our own cloud installs an SSH key instead and mints no root password at all).
พารามิเตอร์
| ชื่อ | ประเภท | จำเป็นต้องมี | ลักษณะของสิ่งนี้ |
|---|---|---|---|
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. |
เนื้อหาคำขอ
| ชื่อ | ประเภท | จำเป็นต้องมี | ลักษณะของสิ่งนี้ |
|---|---|---|---|
password | string | ใช่ | The new root password. At least 16 characters. |
confirm | string | ใช่ | The server's name, typed exactly. |
ข้อผิดพลาดที่เอนด์พอยต์นี้สามารถส่งกลับได้
401 · 403 · 404 · 422 · 429 · 503