hosting
GET /v1/sites/{siteId}/cdn/budget
This site's slice of the account's metered CDN spend.
Autentifikacija
Pošaljite API ključ kao nosivi token. Ključ mora imati dozvolu sites.view; ključ bez nje se odbija s kodom 403, a ne 404.
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/sites/{siteId}/cdn/budget \
-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
Pojedinosti
A **per-site** ceiling, which exists so that one site cannot take the rest of an account down with it. With only an account-level cap, a single crawled domain spends the whole balance and every other site in the account stops serving — a denial of service on a customer's entire estate, triggered by a stranger with a scraper. `serving` is the honest answer to "is the CDN working right now?" and reads **both** this site's state and its account's, because either can pause it. Requires `sites.view`.
Parametri
| Naziv | Vrsta | Obavezno | Što je to |
|---|---|---|---|
siteId (path) | Uuid | Da | Site ID (UUIDv7). |
Odgovor
| Naziv | Vrsta | Obavezno | Što je to |
|---|---|---|---|
cap_minor | integer | Da | This site's ceiling in integer minor units. `0` means no per-site ceiling — the account cap alone applies. |
spent_period_minor | integer | Da | — |
state | string<active, paused_cap, paused_standing, paused_admin> | Da | Four states rather than a boolean, because the remedy differs: the customer's own cap is self-service, a standing lapse needs a payment, and a staff pause needs staff. |
paused_reason | string | Ne | — |
metered | boolean | Da | Whether this site is on the tier that pays per gigabyte. |
serving | boolean | Ne | Whether the **metered** CDN is serving right now. Reads both this site's state and its account's, because either can pause it. ⛔ **Absent entirely when `metered` is `false`**, r… |
currency | string | Ne | ISO code denominating `cap_minor` and `spent_period_minor` (§2.8). ⛔ Absent when the org has not opened metered credit, because minor units without an exponent are unreadable: a… |
Pogreške koje ova krajnja točka može vratiti
401 · 403 · 404 · 429