compute

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

Take a snapshot of a server now.

Всички крайни точки в compute

Всички документи за разработчици

Упълномощаване

Изпратете API ключ като токен за носене. Ключът трябва да притежава разрешението 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 конзолата във вашето табло за управление попълва действителното идентификационно число на вашата организация и вашия собствен ключ и изпълнява заявката спрямо реалното API, за да можете да видите действителния отговор. Отворете този крайpoint в 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.

Тяло на заявката

ИмеТипЗадължителноКакво представлява
descriptionstringДа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.

Отговор

ИмеТипЗадължителноКакво представлява
idstringДаThe provider's identifier for the image.
descriptionstringДаWhat the customer called it, or "".
created_atstringДаWhen it was taken, ISO-8601 as the provider states it, or "".
size_gbnumberДа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…
readybooleanДа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_minorintegerДа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 measuring…
price_currencystringДаISO-4217 code for price_minor, or "" exactly when that is null.

Грешки, които този крайpoint може да върне

401 · 403 · 404 · 422 · 429 · 503