compute
POST /v1/compute/servers/{serverId}/resize/quote
Get what resizing a server would cost, before the charge.
認証
ベアラー トークンとして API キーを送信します。キーには sites.view 権限が付与されている必要があります。権限のないキーは 404 ではなく 403 で拒否されます。
このエンドポイントは組織IDを受け付けません。お使いのキーによって所属する組織がすでに特定されており、レスポンスはその組織にスコープされます。
試してみる
アングルブラケット内のすべてをご自身の値に置き換え、キーのプレースホルダーをご利用中のダッシュボードのキーに置き換えてください。
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コンソールでは、実際の組織IDやお客様ご自身のキーが自動入力され、ライブAPIに対してリクエストが実行されるため、実際のレスポンスを確認することができます。 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. |
リクエスト本文
| 名前 | タイプ | 必須 | これがその内容です |
|---|---|---|---|
spec | string | いいえ | The target size, as getComputeCatalogue reported it. |
plan_code | string | いいえ | The plan to move to, as getComputeCatalogue's tiers[].plan_code. |
返信
| 名前 | タイプ | 必須 | これがその内容です |
|---|---|---|---|
spec | string | はい | The size the figure is for. |
plan_code | string | はい | The plan quoted, on an own-account range. "" on the resold range. |
price_minor | integer | はい | ⛔ 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… |
currency | string | はい | ISO currency of price_minor, or "". |
interval | string | はい | monthly or annual — the machine's billing cadence — or "". |
amount | string | はい | The provider's figure, verbatim. Rendered as the provider stated it and labelled as the provider's estimate, never reformatted. |
detail | string | はい | Whatever else the provider said about the change, or "". Blank is common and is not an error. |
このエンドポイントが返すエラー
401 · 403 · 404 · 422 · 429 · 503