compute
GET /v1/compute/servers/{serverId}/usage
One server's metered hours, charges and ledger check for a month.
Autentifikacija
Pošaljite API ključ kao bearer token. Ova krajnja točka ne navodi određenu dozvolu u specifikaciji, stoga dajte svom ključu najmanje što mu je potrebno i provjerite odgovor umjesto da pretpostavljate.
Ova krajnja točka ne prihvaća ID organizacije. Vaš ključ već identificira organizaciju kojoj pripada, a odgovor je ograničen na nju.
Isprobajte
Zamijenite sve unutar šiljastih zagrada svojim vlastitim vrijednostima, a rezervirano mjesto za ključ s ključem iz vaše nadzorne ploče.
curl -X GET https://api.zinndigital.com/v1/compute/servers/{serverId}/usage \
-H "Authorization: Bearer zdk_live_…"Prijavljeni ste? API konzola na vašoj nadzornoj ploči automatski unosi stvarni ID vaše organizacije i vaš vlastiti ključ te šalje zahtjev prema aktivnom API-ju kako biste mogli vidjeti stvarni odgovor. Otvori ovu krajnju točku u API konzoli
Parametri
| Naziv | Vrsta | Obavezno | Što je to |
|---|---|---|---|
serverId (path) | Uuid | Da | 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 | Ne | The month, YYYY-MM (UTC). Defaults to the current month. |
Odgovor
| Naziv | Vrsta | Obavezno | Što je to |
|---|---|---|---|
period | string | Da | — |
hours | integer | Da | Started hours rated in the month. |
rated_minor | integer | Da | Whole minor units rated. A sub-unit remainder is carried, never rounded up. |
settled_minor | integer | Da | Net of tax |
unsettled_minor | integer | Da | Rated and not yet paid. |
currency | string | Da | — |
settlements | ComputeUsageSettlement[] | Da | — |
reconciles | boolean | Da | 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[] | Da | Every disagreement found, in words. Empty when reconciles is true. |
Pogreške koje ova krajnja točka može vratiti
401 · 403 · 404 · 422 · 429