compute
GET /v1/compute/servers/{serverId}/usage
One server's metered hours, charges and ledger check for a month.
Uwierzytelnianie
Wyślij klucz API jako token bearer. Ten punkt końcowy nie określa konkretnego uprawnienia w specyfikacji, więc nadaj swojemu kluczowi minimum potrzebnych uprawnień i sprawdź odpowiedź zamiast zakładać.
Ten punkt końcowy nie wymaga identyfikatora organizacji. Twój klucz już identyfikuje organizację, do której należy, a odpowiedź jest do niej ograniczona.
Wypróbuj
Zastąp wszystko w nawiasach ostrych własnymi wartościami, a zastępczy znacznik klucza kluczem ze swojego pulpitu nawigacyjnego.
curl -X GET https://api.zinndigital.com/v1/compute/servers/{serverId}/usage \
-H "Authorization: Bearer zdk_live_…"Zalogowany? Konsola API w Twoim panelu uzupełnia rzeczywiste identyfikator organizacji oraz Twój własny klucz i wykonuje żądanie względem aktywnego API, dzięki czemu możesz zobaczyć rzeczywistą odpowiedź. Otwórz ten punkt końcowy w konsoli API
Parametry
| Nazwa | Typ | Wymagane | Co to jest |
|---|---|---|---|
serverId (path) | Uuid | Tak | 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 | Nie | The month, YYYY-MM (UTC). Defaults to the current month. |
Odpowiedź
| Nazwa | Typ | Wymagane | Co to jest |
|---|---|---|---|
period | string | Tak | — |
hours | integer | Tak | Started hours rated in the month. |
rated_minor | integer | Tak | Whole minor units rated. A sub-unit remainder is carried, never rounded up. |
settled_minor | integer | Tak | Net of tax |
unsettled_minor | integer | Tak | Rated and not yet paid. |
currency | string | Tak | — |
settlements | ComputeUsageSettlement[] | Tak | — |
reconciles | boolean | Tak | 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[] | Tak | Every disagreement found, in words. Empty when reconciles is true. |
Błędy, które ten punkt końcowy może zwrócić
401 · 403 · 404 · 422 · 429