compute
GET /v1/compute/servers/{serverId}/usage
One server's metered hours, charges and ledger check for a month.
Санҷиши ҳаққоният
Kalitи API-ро ҳамчун token-и bearer фиристед. Ин нуқтаи ниҳоӣ дар мушаххасот иҷозати мушаххасеро нишон намедиҳад, бинобар ин ба калиди худ ҳадди ақали заруриро диҳед ва ба ҷои тахмин кардан, ҷавобро санҷед.
Ин нуқтаи поёнӣ ягон рақами мушаххаси созмонро талаб намекунад. Калиди шумо аллакай созмонеро, ки ба он тааллуқ дорад, муайян мекунад ва ҷавоб ба он маҳдуд карда мешавад.
Санҷидан
Ҳар чизро дар қаavски кунҷӣ бо қиматҳои худ ва ҷойи нигоҳдорандаи калидро бо калима аз панели идоракунии худ иваз кунед.
curl -X GET https://api.zinndigital.com/v1/compute/servers/{serverId}/usage \
-H "Authorization: Bearer zdk_live_…"Воarid шудаед? Консоли API дар панели идоракунии шумо рақами мушаххаси ташкилоти воқеӣ ва калиди худро пур мекунад ва дархостро бар зидди API-и фаъол иҷро мекунад, то шумо посухи воқеиро бубинед. Ин нуқтаи ниҳоиро дар консоли API кушоед
Параметрҳо
| Ном | Намуд | Талаб карда мешавад | Ин чӣ аст |
|---|---|---|---|
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. |
Ҷавоб
| Ном | Намуд | Талаб карда мешавад | Ин чӣ аст |
|---|---|---|---|
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