compute
POST /v1/compute/servers/{serverId}/resize/quote
Get what resizing a server would cost, before the charge.
Xác thực
Gửi khóa API dưới dạng mã thông báo bearer. Khóa này phải có quyền sites.view; khóa không có quyền này sẽ bị từ chối với mã lỗi 403, không phải 404.
Endpoint này không nhận ID tổ chức. Khóa của bạn đã xác định tổ chức mà nó thuộc về và phản hồi được giới hạn trong phạm vi đó.
Dùng thử
Thay thế bất kỳ nội dung nào trong ngoعل (angle brackets) bằng giá trị của riêng bạn và trình giữ chỗ key bằng một key từ trang tổng quan của bạn.
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> }'Đã đăng nhập? Bảng điều khiển API trong trang quản lý của bạn sẽ tự điền ID tổ chức thực tế và khóa của riêng bạn, sau đó chạy yêu cầu đối với API trực tiếp để bạn có thể xem phản hồi thực tế. Mở điểm cuối này trong bảng điều khiển API
Chi tiết
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.
Tham số
| Tên | Loại | Bắt buộc | Nội dung này là gì |
|---|---|---|---|
serverId (path) | Uuid | Có | 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. |
Nội dung yêu cầu
| Tên | Loại | Bắt buộc | Nội dung này là gì |
|---|---|---|---|
spec | string | Có | The target size, as `getComputeCatalogue` reported it. |
Phản hồi
| Tên | Loại | Bắt buộc | Nội dung này là gì |
|---|---|---|---|
spec | string | Có | The size the figure is for. |
amount | string | Có | The provider's figure, verbatim. Rendered as the provider stated it and labelled as the provider's estimate, never reformatted. |
detail | string | Có | Whatever else the provider said about the change, or `""`. Blank is common and is not an error. |
Các lỗi điểm cuối này có thể trả về
401 · 403 · 404 · 422 · 429 · 503