compute
POST /v1/compute/servers/{serverId}/snapshots
Take a snapshot of a server now.
المصادقة
أرسل مفتاح واجهة برمجة التطبيقات (API key) كرمز حامل (bearer token). يجب أن يحمل المفتاح إذن billing.payment.manage؛ والمفتاح الذي لا يملكه يُرفض بالرمز 403 وليس 404.
لا يقبل هذا الطرف أي معرف للمؤسسة. يحدد مفتاحك بالفعل المؤسسة التي ينتمي إليها، وتكون الاستجابة محصورة في نطاقها.
جربه الآن
استبدل أي شيء بين أقواس زاوية بقيمك الخاصة، والعنصر النائب للمفتاح بمفتاح من لوحة تحكمك.
curl -X POST https://api.zinndigital.com/v1/compute/servers/{serverId}/snapshots \
-H "Authorization: Bearer zdk_live_…" \
-H "Content-Type: application/json" \
-d '{ "description": <string> }'هل سجلت الدخول؟ تقوم وحدة تحكم واجهة برمجة التطبيقات في لوحة التحكم الخاصة بك بربط معرف مؤسستك الحقيقي ومفتاحك الخاص، وتنفذ الطلب مقابل واجهة برمجة التطبيقات المباشرة لتتمكن من رؤية الاستجابة الفعلية. افتح هذه النهاية الطرفية في وحدة تحكم API
التفاصيل
Images the machine's disk as it is right now, so the customer has a point to come back to before an upgrade or a risky change. ⛔ **It bills for storage until it is deleted.** It is not destructive — snapshotting a running machine changes nothing about it — but it is a recurring cost, so it is gated on the spend key rather than on the operate key. The snapshot comes back with `ready: false`: imaging a disk takes minutes and the request is not held for it. Poll the listing; a restore must not be offered until `ready` is true. Requires `billing.payment.manage`.
المعلمات
| الاسم | النوع | مطلوب | ما هو هذا |
|---|---|---|---|
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. |
جسم الطلب
| الاسم | النوع | مطلوب | ما هو هذا |
|---|---|---|---|
description | string | نعم | What to call it. Required and non-blank: an unnamed snapshot renders as a bare provider id, and a list of bare ids is one a customer cannot choose a restore point from. |
الاستجابة
| الاسم | النوع | مطلوب | ما هو هذا |
|---|---|---|---|
id | string | نعم | The provider's identifier for the image. |
description | string | نعم | What the customer called it, or `""`. |
created_at | string | نعم | When it was taken, ISO-8601 as the provider states it, or `""`. |
size_gb | number | نعم | Billable size. `null` while the provider is still measuring it — which it is for the first seconds after creation. ⛔ "Not measured yet" and "takes no space" are different claims… |
ready | boolean | نعم | `false` while the provider is still writing it. ⛔ A restore offered on an unfinished snapshot restores an incomplete disk, and the provider will start it. |
price_minor | integer | نعم | What **we** charge per month to keep this snapshot, in integer minor units of `price_currency`. ⛔ `null` exactly while `size_gb` is `null`: the provider has not finished measuri… |
price_currency | string | نعم | ISO-4217 code for `price_minor`, or `""` exactly when that is `null`. |
الأخطاء التي يمكن أن تُرجعها نقطة النهاية هذه
401 · 403 · 404 · 422 · 429 · 503