hosting
PATCH /v1/sites/{siteId}/cdn/budget
Set this site's metered CDN spend ceiling.
Xaqiijinta aqoonsiga
U dir furaha API ah calaamad dusha ah (bearer token). Furaha waa inuu wataa ruqadda hosting.cdn.manage; furaha aan wadan waxaa loo diidayaa 403, ee ma aha 404.
Boggan ma qaato aqoonsiga ururka. Furahaagu wuxuu horay u aqoonsanayaa ururka uu ka tirsan yahay, jawaabtuna waxay ku kooban tahay halkaas.
Isku day
Ku beddel wax kasta oo ku dhex jira qeebaha xaglaha ah qiimayaashaada, sidoo kalena haystaaha furaha ku beddel fure ka dhex muuqda dashboordigaaga.
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> }'Ma sign-garaysay? Qalabka API ee ku jira dashboard-kaagu wuxuu buuxiyaa aqoonsigaaga ururka ee dhabta ah iyo furahaaga gaarka ah, wuxuuna ku shaqeysiiyaa codsiga API-ga nool si aad u aragto jawaabta dhabta ah. Kani ka fur barta kontoroolka ee API
Details
`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`.
Cabiraha
| Magaca | Nooc | Loo baahan yahay | Maxay tahay |
|---|---|---|---|
siteId (path) | Uuid | Haa | Site ID (UUIDv7). |
Codsiga jidhkiisa
| Magaca | Nooc | Loo baahan yahay | Maxay tahay |
|---|---|---|---|
cap_minor | integer | Haa | 0 for no per-site ceiling, otherwise at least the platform minimum. |
Jawaab
| Magaca | Nooc | Loo baahan yahay | Maxay tahay |
|---|---|---|---|
cap_minor | integer | Haa | This site's ceiling in integer minor units. `0` means no per-site ceiling — the account cap alone applies. |
spent_period_minor | integer | Haa | — |
state | string<active, paused_cap, paused_standing, paused_admin> | Haa | 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 | Maya | — |
metered | boolean | Haa | Whether this site is on the tier that pays per gigabyte. |
serving | boolean | Maya | 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 | Maya | 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… |
Cilladaha ay bartaani soo celin karto
401 · 403 · 404 · 422 · 429