hosting
PATCH /v1/sites/{siteId}/cdn/budget
Set this site's metered CDN spend ceiling.
Authentification
Envoyez une clé API en tant que jeton du porteur. La clé doit posséder l'autorisation hosting.cdn.manage ; une clé qui ne l'a pas est refusée avec le code 403, et non 404.
Cet endpoint ne prend aucun identifiant d'organisation. Votre clé identifie déjà l'organisation à laquelle elle appartient, et la réponse y est limitée.
Essayer
Remplacez tout ce qui se trouve entre crochets par vos propres valeurs, et le espace réservé à la clé par une clé de votre tableau 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> }'Connecté ? La console d'API de votre tableau de bord saisit votre véritable ID d'organisation ainsi que votre propre clé, et exécute la requête sur l'API de production afin que vous puissiez voir la réponse réelle. Ouvrir ce point de terminaison dans la console API
Détails
`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`.
Paramètres
| Nom | Type | Obligatoire | Qu'est-ce que c'est |
|---|---|---|---|
siteId (path) | Uuid | Oui | Site ID (UUIDv7). |
Corps de la requête
| Nom | Type | Obligatoire | Qu'est-ce que c'est |
|---|---|---|---|
cap_minor | integer | Oui | 0 for no per-site ceiling, otherwise at least the platform minimum. |
Réponse
| Nom | Type | Obligatoire | Qu'est-ce que c'est |
|---|---|---|---|
cap_minor | integer | Oui | This site's ceiling in integer minor units. `0` means no per-site ceiling — the account cap alone applies. |
spent_period_minor | integer | Oui | — |
state | string<active, paused_cap, paused_standing, paused_admin> | Oui | 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 | Non | — |
metered | boolean | Oui | Whether this site is on the tier that pays per gigabyte. |
serving | boolean | Non | 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 | Non | 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… |
Erreurs que cet point de terminaison peut renvoyer
401 · 403 · 404 · 422 · 429