compute
GET /v1/compute/servers/{serverId}/usage
One server's metered hours, charges and ledger check for a month.
Аутентификация
API кілтін bearer токені ретінде жіберіңіз. Бұл соңғы нүкте сипаттамада арнайы рұқсатты көрсетпейді, сондықтан болжағаннан гөрі кілтіңізге қажетті ең аз рұқсатты беріп, жауапты тексеріңіз.
Бұл соңғы нүкте ұйым идентификаторын қабылдамайды. Сіздің кілтіңіз оның қай ұйымға тиесілі екенін өзі анықтайды және жауап соған шектеледі.
Әрекет етіп көру
Бұрыштық жақшалардағы кез келген нәрсені өз мәндеріңізбен, ал кілт орналастырушысын басқару тақтасынан алынған кілтпен алмастырыңыз.
curl -X GET https://api.zinndigital.com/v1/compute/servers/{serverId}/usage \
-H "Authorization: Bearer zdk_live_…"Жүйеге кіргенсіз бе? Бақылау тақтасындағы API консолі ұйымыңыздың нақты идентификаторы мен жеке кілтіңізді автоматты түрде толтырады да, нақты жауапты көре алуыңыз үшін сұрауды тікелей жұмыс істеп тұрған API арқылы орындайды. Бұл соңғы нүктені API консолінде ашыңыз
Параметрлер
| Аты | Tүрі | Міндетті | Мазмұны |
|---|---|---|---|
serverId (path) | Uuid | Иә | 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 | Жоқ | The month, YYYY-MM (UTC). Defaults to the current month. |
Жауап
| Аты | Tүрі | Міндетті | Мазмұны |
|---|---|---|---|
period | string | Иә | — |
hours | integer | Иә | Started hours rated in the month. |
rated_minor | integer | Иә | Whole minor units rated. A sub-unit remainder is carried, never rounded up. |
settled_minor | integer | Иә | Net of tax |
unsettled_minor | integer | Иә | Rated and not yet paid. |
currency | string | Иә | — |
settlements | ComputeUsageSettlement[] | Иә | — |
reconciles | boolean | Иә | 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[] | Иә | Every disagreement found, in words. Empty when reconciles is true. |
Бұл соңғы нүкте қайтара алатын қателер
401 · 403 · 404 · 422 · 429