hosting
PATCH /v1/sites/{siteId}/cdn/budget
Set this site's metered CDN spend ceiling.
Аутентификација
Пошаљите API кључ као bearer токен. Кључ мора имати дозволу hosting.cdn.manage; кључ без ње се одбија уз 403, а не 404.
Ова крајња тачка не прихвата id организације. Ваш кључ већ идентификује организацију којој припада, а одговор је ограничен на њу.
Испробајте
Замените све што је у угластим заградама сопственим вредностима, а чувар места кључа кључем са своје контролне табле.
curl -X PATCH https://api.zinndigital.com/v1/sites/{siteId}/cdn/budget \
-H "Authorization: Bearer zdk_live_…" \
-H "Content-Type: application/json" \
-d '{ "cap_minor": <integer> }'Пријављени сте? API конзола на вашој контролној табли попуњава ваш прави id организације и ваш сопствени кључ, и покреће захтев према живом API-ју како бисте могли да видите стварни одговор. Отворите ову крајњу тачку у API конзоли
Детаљи
cap_minor: 0 means no per-site ceiling — the account cap alone applies — and is the default. Any other value must be at least the platform minimum; a cap of a few cents is a site that pauses on its first visitor and reads as broken hosting rather than as a budget working. Raising the cap above what the site has already spent resumes it. Leaving it paused would require a second, undiscoverable action and would read as the setting not working. A site paused by staff is not resumed by this — that pause is not the customer's to lift. Requires hosting.cdn.manage.
Параметри
| Назив | Тип | Обавезно | Шта је ово |
|---|---|---|---|
siteId (path) | Uuid | Да | Site ID (UUIDv7). |
Тело захтева
| Назив | Тип | Обавезно | Шта је ово |
|---|---|---|---|
cap_minor | integer | Да | 0 for no per-site ceiling, otherwise at least the platform minimum. |
Одговор
| Назив | Тип | Обавезно | Шта је ово |
|---|---|---|---|
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,… |
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 · 422 · 429