hosting
PATCH /v1/sites/{siteId}/cdn/budget
Set this site's metered CDN spend ceiling.
Autentifikacija
Pošaljite API ključ kao bearer token. Ključ mora imati dozvolu hosting.cdn.manage; ključ bez nje se odbija sa 403, a ne sa 404.
Ovaj krajnji tačka ne prihvata ID organizacije. Vaš ključ već identifikuje organizaciju kojoj pripada, a odgovor je ograničen na nju.
Isprobajte
Zamenite bilo šta u uglastim zagradama sopstvenim vrednostima, a ključni placeholder sa ključem sa vaše kontrolne table.
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> }'Prijavljeni ste? API konzola na vašoj kontrolnoj tabli automatski popunjava ID vaše stvarne organizacije i vaš sopstveni ključ, i izvršava zahtev nad API-jem uživo tako da možete videti stvarni odgovor. Otvorite ovu krajnju tačku u API konzoli
Detalji
`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`.
Parametri
| Naziv | Vrsta | Obavezno | Šta je ovo |
|---|---|---|---|
siteId (path) | Uuid | Da | Site ID (UUIDv7). |
Telo zahteva
| Naziv | Vrsta | Obavezno | Šta je ovo |
|---|---|---|---|
cap_minor | integer | Da | 0 for no per-site ceiling, otherwise at least the platform minimum. |
Odgovor
| Naziv | Vrsta | Obavezno | Šta je ovo |
|---|---|---|---|
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… |
Greške koje ovaj krajnji tačka može da vrati
401 · 403 · 404 · 422 · 429