hosting
PATCH /v1/sites/{siteId}/cdn/budget
Set this site's metered CDN spend ceiling.
Uwierzytelnianie
Wyślij klucz API jako token bearer. Klucz musi posiadać uprawnienie hosting.cdn.manage; klucz bez niego jest odrzucany z kodem 403, a nie 404.
Ten punkt końcowy nie wymaga identyfikatora organizacji. Twój klucz już identyfikuje organizację, do której należy, a odpowiedź jest do niej ograniczona.
Wypróbuj
Zastąp wszystko w nawiasach ostrych własnymi wartościami, a zastępczy znacznik klucza kluczem ze swojego pulpitu nawigacyjnego.
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> }'Zalogowany? Konsola API w Twoim panelu uzupełnia rzeczywiste identyfikator organizacji oraz Twój własny klucz i wykonuje żądanie względem aktywnego API, dzięki czemu możesz zobaczyć rzeczywistą odpowiedź. Otwórz ten punkt końcowy w konsoli API
Szczegóły
`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`.
Parametry
| Nazwa | Typ | Wymagane | Co to jest |
|---|---|---|---|
siteId (path) | Uuid | Tak | Site ID (UUIDv7). |
Treść żądania
| Nazwa | Typ | Wymagane | Co to jest |
|---|---|---|---|
cap_minor | integer | Tak | 0 for no per-site ceiling, otherwise at least the platform minimum. |
Odpowiedź
| Nazwa | Typ | Wymagane | Co to jest |
|---|---|---|---|
cap_minor | integer | Tak | This site's ceiling in integer minor units. `0` means no per-site ceiling — the account cap alone applies. |
spent_period_minor | integer | Tak | — |
state | string<active, paused_cap, paused_standing, paused_admin> | Tak | 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 | Nie | — |
metered | boolean | Tak | Whether this site is on the tier that pays per gigabyte. |
serving | boolean | Nie | 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 | Nie | 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… |
Błędy, które ten punkt końcowy może zwrócić
401 · 403 · 404 · 422 · 429