hosting

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

Set this site's metered CDN spend ceiling.

Toate punctele finale hosting

Autentificare

Trimiteți o cheie API ca token de tip bearer. Cheia trebuie să aibă permisiunea hosting.cdn.manage; o cheie care nu o are va fi respinsă cu 403, nu 404.

Acest endpoint nu necesită un ID de organizație. Cheia ta identifică deja organizația căreia îi aparține, iar răspunsul este limitat la aceasta.

Încearcă

Înlocuiți tot ce se află între paranteze unghiulare cu propriile valori și substituentul cheie cu o cheie din tabloul de bord.

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> }'

Autentificat? Consola API din panoul de control îți completează ID-ul real al organizației și propria cheie și rulează cererea în API-ul live, astfel încât să poți vedea răspunsul efectiv. Deschideți acest punct final în consola API

Detalii

`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

NumeTipObligatoriuCe este
siteId (path)UuidDaSite ID (UUIDv7).

Corp cerere

NumeTipObligatoriuCe este
cap_minorintegerDa0 for no per-site ceiling, otherwise at least the platform minimum.

Răspuns

NumeTipObligatoriuCe este
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_reasonstringNu
meteredbooleanDaWhether this site is on the tier that pays per gigabyte.
servingbooleanNuWhether 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…
currencystringNuISO 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…

Erori pe care le poate returna acest punct final

401 · 403 · 404 · 422 · 429