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.
Nơi điền id tổ chức của bạn
Điểm cuối này nhận org_id làm tham số truy vấn. Hãy bỏ trống để áp dụng cho toàn bộ cây thuê của bạn; hoặc truyền giá trị vào để thu hẹp phạm vi gọi về một tổ chức duy nhất.
Mã tổ chức của bạn nằm ở màn hình khóa API trong bảng điều khiển, ngay bên cạnh khóa đó. Đây là cùng một mã trong mọi lệnh gọi mà bạn thực hiện.
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 GET https://api.zinndigital.com/v1/compute/servers \
-H "Authorization: Bearer zdk_live_…"Đã đă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
Every machine the caller can see, or — with `?org_id=` — one organisation's. The scoped form is what a reseller's console sends. An organisation outside the readable scope narrows to nothing rather than `403`-ing, exactly as `listSites` does: a `403` would confirm the organisation exists. ⛔ **Resolved from our own rows, not from the provider's listing**, which is every customer on the reseller account. `status` is ours (how far the order got) and `power_state` is the machine's (what it is doing now); they are separate facts and rounding the provider's word into ours would silently make an unrecognised state `active`, which is what unlocks the power and resize controls. `operable` is read rather than re-derived from `status`, so a screen never offers a control the engine refuses. Requires `sites.view`.
Tham số
| Tên | Loại | Bắt buộc | Nội dung này là gì |
|---|---|---|---|
org_id (query) | Uuid | Không | Narrow the list to one organisation the caller can read. |
Phản hồi
| Tên | Loại | Bắt buộc | Nội dung này là gì |
|---|---|---|---|
data | ComputeServer[] | Có | The machines, across every organisation the caller can read. |
Các lỗi điểm cuối này có thể trả về
401 · 403 · 404 · 422 · 429 · 503