compute

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

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

Semua titik akhir compute

Pengesahan

Hantar kunci API sebagai token pembawa. Kunci tersebut mesti membawa kebenaran sites.view; kunci yang tidak mempunyainya akan ditolak dengan 403, bukan 404.

Titik akhir ini tidak memerlukan id organisasi. Kunci anda telah mengenal pasti organisasi kepunyaannya, dan respons dis skopkan kepadanya.

Cuba

Gantikan apa sahaja di dalam kurungan sudut dengan nilai anda sendiri, dan pemegang tempat kunci dengan kunci dari papan pemuka anda.

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> }'

Sudah log masuk? Konsol API dalam papan pemuka anda mengisi id organisasi sebenar dan kunci anda sendiri, serta menjalankan permintaan terhadap API langsung supaya anda boleh melihat respons sebenar. Buka penamat ini dalam konsol API

Butiran

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.

Parameter

NamaJenisDiperlukanApakah ia
serverId (path)UuidYaThe 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.

Badan permintaan

NamaJenisDiperlukanApakah ia
specstringYaThe target size, as `getComputeCatalogue` reported it.

Respons

NamaJenisDiperlukanApakah ia
specstringYaThe size the figure is for.
amountstringYaThe provider's figure, verbatim. Rendered as the provider stated it and labelled as the provider's estimate, never reformatted.
detailstringYaWhatever else the provider said about the change, or `""`. Blank is common and is not an error.

Ralat yang boleh dikembalikan oleh titik akhir ini

401 · 403 · 404 · 422 · 429 · 503