compute
GET /v1/compute/servers/{serverId}/usage
One server's metered hours, charges and ledger check for a month.
Kimlik Doğrulama
Bir API anahtarını bearer token olarak gönderin. Bu uç nokta, teknik özelliklerde belirli bir yetki belirtmemektedir; bu nedenle, varsaymak yerine anahtarınıza ihtiyaç duyduğu en az yetkiyi verin ve yanıtı kontrol edin.
Bu uç nokta hiçbir organizasyon kimliği almaz. Anahtarınız zaten ait olduğu organizasyonu tanımlar ve yanıt bu organizasyonla sınırlandırılır.
Dene
Köşeli parantez içindeki her şeyi kendi değerlerinizle ve anahtar yer tutucusunu panonuzdan bir anahtarla değiştirin.
curl -X GET https://api.zinndigital.com/v1/compute/servers/{serverId}/usage \
-H "Authorization: Bearer zdk_live_…"Oturum açtınız mı? Panonuzdaki API konsolu, gerçek organizasyon kimliğinizi ve kendi anahtarınızı otomatik olarak doldurur ve isteği canlı API üzerinde çalıştırarak gerçek yanıtı görmenizi sağlar. Bu uç noktayı API konsolunda açın
Parametreler
| Ad | Tür | Zorunlu | Ne olduğu |
|---|---|---|---|
serverId (path) | Uuid | Evet | 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. |
period (query) | string | Hayır | The month, YYYY-MM (UTC). Defaults to the current month. |
Yanıt
| Ad | Tür | Zorunlu | Ne olduğu |
|---|---|---|---|
period | string | Evet | — |
hours | integer | Evet | Started hours rated in the month. |
rated_minor | integer | Evet | Whole minor units rated. A sub-unit remainder is carried, never rounded up. |
settled_minor | integer | Evet | Net of tax |
unsettled_minor | integer | Evet | Rated and not yet paid. |
currency | string | Evet | — |
settlements | ComputeUsageSettlement[] | Evet | — |
reconciles | boolean | Evet | Whether hours, settlements, their orders and the balance draws all agree. It is computed from four independently written records, never a figure against itself. |
discrepancies | string[] | Evet | Every disagreement found, in words. Empty when reconciles is true. |
Bu uç noktanın dönderebileceği hatalar
401 · 403 · 404 · 422 · 429