compute

POST /v1/compute/servers/{serverId}/resize/quote

Get what resizing a server would cost, before the charge.

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

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

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

Изпратете API ключ като токен за носене. Ключът трябва да притежава разрешението sites.view; ключ без него се отхвърля с 403, а не с 404.

Този ендпойнт не изисква идентификатор на организация. Вашият ключ вече идентифицира организацията, към която принадлежи, и отговорът е ограничен до нея.

Опитайте

Заменете всичко в квадратни скоби със собствени стойности, а ключовия заместващ символ – с ключ от вашето табло за управление.

curl -X POST https://api.zinndigital.com/v1/compute/servers/{serverId}/resize/quote \
  -H "Authorization: Bearer zdk_live_…" \
  -H "Content-Type: application/json" \
  -d '{  }'

Влязохте ли в профила си? API конзолата във вашето табло за управление попълва действителното идентификационно число на вашата организация и вашия собствен ключ и изпълнява заявката спрямо реалното API, за да можете да видите действителния отговор. Отворете този крайpoint в API конзолата

Детайли

The provider's own figure for moving this machine to another size. A POST that changes nothing, deliberately: the size being quoted is a body field, and a quote is not a cacheable representation of a resource. ⛔ Showing it is not optional — an upgrade charged at an unstated amount is a refund request (§2.8). ⛔ amount is the provider's own string, unparsed, and it carries no currency field. Inventing one to fit a money type would put a number in front of a customer in the wrong currency, so a client renders it exactly as the provider stated it and labels it as the provider's estimate. 404 for a server that is not the caller's; 422 for a size the provider does not offer or a machine that is not in an operable state. Requires sites.view — reading a price commits to nothing.

Параметри

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

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

ИмеТипЗадължителноКакво представлява
specstringНеThe target size, as getComputeCatalogue reported it.
plan_codestringНеThe plan to move to, as getComputeCatalogue's tiers[].plan_code.

Отговор

ИмеТипЗадължителноКакво представлява
specstringДаThe size the figure is for.
plan_codestringДаThe plan quoted, on an own-account range. "" on the resold range.
price_minorintegerДа⛔ D24975 (W43-48). OUR price for the plan, in minor units, in the machine's own data centre at its own cadence. On an own-account range this is the only figure; amount and…
currencystringДаISO currency of price_minor, or "".
intervalstringДаmonthly or annual — the machine's billing cadence — or "".
amountstringДаThe provider's figure, verbatim. Rendered as the provider stated it and labelled as the provider's estimate, never reformatted.
detailstringДаWhatever else the provider said about the change, or "". Blank is common and is not an error.

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

401 · 403 · 404 · 422 · 429 · 503