hosting
GET /v1/sites/{siteId}/cdn/budget
This site's slice of the account's metered CDN spend.
Автентифікація
Надішліть ключ API як маркер носія (bearer token). Ключ повинен мати дозвіл sites.view; ключ без нього відхиляється з кодом 403, а не 404.
Цей кінцевий пункт не потребує ідентифікатора організації. Ваш ключ уже ідентифікує організацію, якій він належить, і відповідь обмежується її межами.
Спробувати
Замініть усе в кутових дужках власними значеннями, а заповнювач ключа — ключем із вашої панелі керування.
curl -X GET https://api.zinndigital.com/v1/sites/{siteId}/cdn/budget \
-H "Authorization: Bearer zdk_live_…"Увійшли в систему? Консоль API у вашій панелі керування автоматично підставляє ваш реальний ідентифікатор організації та ваш власний ключ, а також виконує запит до робочого API, щоб ви могли побачити справжню відповідь. Відкрийте цю кінцеву точку в консолі API
Деталі
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`.
Параметри
| Назва | Тип | Обов'язкове | Що це таке |
|---|---|---|---|
siteId (path) | Uuid | Так | Site ID (UUIDv7). |
Відповідь
| Назва | Тип | Обов'язкове | Що це таке |
|---|---|---|---|
cap_minor | integer | Так | This site's ceiling in integer minor units. `0` means no per-site ceiling — the account cap alone applies. |
spent_period_minor | integer | Так | — |
state | string<active, paused_cap, paused_standing, paused_admin> | Так | 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 | Ні | — |
metered | boolean | Так | Whether this site is on the tier that pays per gigabyte. |
serving | boolean | Ні | 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 | Ні | 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… |
Помилки, які може повертати ця кінцева точка
401 · 403 · 404 · 429