compute

GET /v1/compute/servers/{serverId}/usage

One server's metered hours, charges and ledger check for a month.

Wszystkie punkty końcowe compute

Wszystkie dokumentacje dla programistów

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

NazwaTypWymaganeCo to jest
serverId (path)UuidTakThe 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)stringNieThe month, YYYY-MM (UTC). Defaults to the current month.

Odpowiedź

NazwaTypWymaganeCo to jest
periodstringTak
hoursintegerTakStarted hours rated in the month.
rated_minorintegerTakWhole minor units rated. A sub-unit remainder is carried, never rounded up.
settled_minorintegerTakNet of tax
unsettled_minorintegerTakRated and not yet paid.
currencystringTak
settlementsComputeUsageSettlement[]Tak
reconcilesbooleanTakWhether hours, settlements, their orders and the balance draws all agree. It is computed from four independently written records, never a figure against itself.
discrepanciesstring[]TakEvery 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