compute
POST /v1/compute/servers/{serverId}/resize/quote
Get what resizing a server would cost, before the charge.
Uwierzytelnianie
Wyślij klucz API jako token bearer. Klucz musi posiadać uprawnienie sites.view; klucz bez niego jest odrzucany z kodem 403, a nie 404.
Ten punkt końcowy nie wymaga identyfikatora organizacji. Twój klucz już identyfikuje organizację, do której należy, a odpowiedź jest do niej ograniczona.
Wypróbuj
Zastąp wszystko w nawiasach ostrych własnymi wartościami, a zastępczy znacznik klucza kluczem ze swojego pulpitu nawigacyjnego.
curl -X POST https://api.zinndigital.com/v1/compute/servers/{serverId}/resize/quote \
-H "Authorization: Bearer zdk_live_…" \
-H "Content-Type: application/json" \
-d '{ "spec": <string> }'Zalogowany? Konsola API w Twoim panelu uzupełnia rzeczywiste identyfikator organizacji oraz Twój własny klucz i wykonuje żądanie względem aktywnego API, dzięki czemu możesz zobaczyć rzeczywistą odpowiedź. Otwórz ten punkt końcowy w konsoli API
Szczegóły
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.
Parametry
| Nazwa | Typ | Wymagane | Co to jest |
|---|---|---|---|
serverId (path) | Uuid | Tak | 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. |
Treść żądania
| Nazwa | Typ | Wymagane | Co to jest |
|---|---|---|---|
spec | string | Tak | The target size, as `getComputeCatalogue` reported it. |
Odpowiedź
| Nazwa | Typ | Wymagane | Co to jest |
|---|---|---|---|
spec | string | Tak | The size the figure is for. |
amount | string | Tak | The provider's figure, verbatim. Rendered as the provider stated it and labelled as the provider's estimate, never reformatted. |
detail | string | Tak | Whatever else the provider said about the change, or `""`. Blank is common and is not an error. |
Błędy, które ten punkt końcowy może zwrócić
401 · 403 · 404 · 422 · 429 · 503