hosting

PATCH /v1/sites/{siteId}/cdn/budget

Set this site's metered CDN spend ceiling.

Svi hosting krajnji točke

Sva developerska dokumentacija

Autentifikacija

Pošaljite API ključ kao nosivi token. Ključ mora imati dozvolu hosting.cdn.manage; 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 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 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

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

NazivVrstaObaveznoŠto je to
siteId (path)UuidDaSite ID (UUIDv7).

Tijelo zahtjeva

NazivVrstaObaveznoŠto je to
cap_minorintegerDa0 for no per-site ceiling, otherwise at least the platform minimum.

Odgovor

NazivVrstaObaveznoŠto je to
cap_minorintegerDaThis site's ceiling in integer minor units. 0 means no per-site ceiling — the account cap alone applies.
spent_period_minorintegerDa
statestring<active, paused_cap, paused_standing, paused_admin>DaFour 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_reasonstringNe
meteredbooleanDaWhether this site is on the tier that pays per gigabyte.
servingbooleanNeWhether 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,…
currencystringNeISO 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 · 422 · 429