hosting
GET /v1/sites/{siteId}/cdn/usage
This month's CDN allowance on a pool CDN, and how much of it the site has used.
Authentication
Send an API key as a bearer token. The key must carry the sites.view permission; a key without it is refused with 403, not 404.
This endpoint takes no organisation id. Your key already identifies the organisation it belongs to, and the response is scoped to it.
Try it
Replace anything in angle brackets with your own values, and the key placeholder with a key from your dashboard.
curl -X GET https://api.zinndigital.com/v1/sites/{siteId}/cdn/usage \
-H "Authorization: Bearer zdk_live_…"Signed in? The API console in your dashboard fills in your real organisation id and your own key, and runs the request against the live API so you can see the actual response. Open this endpoint in the API console
Details
Every site served by one of our pooled CDNs includes a monthly CDN allowance (the provider's cost of serving it, cap_micros, $0.25 by default, plus any top-ups bought this month). The customer is warned at warn_low_pct and warn_high_pct; at 100% the site's CDN is paused (status: paused) until the month ends or a top-up is added. A site on an unmetered CDN reads metered: false and status: unmetered (included, no cap). tiers are the one-off top-ups on sale, priced in integer minor units with their ISO currency. Requires sites.view.
Parameters
| Name | Type | Required | What it is |
|---|---|---|---|
siteId (path) | Uuid | Yes | Site ID (UUIDv7). |
Response
| Name | Type | Required | What it is |
|---|---|---|---|
metered | boolean | Yes | False on an unmetered CDN (included, no allowance, never paused). |
period | string | Yes | The UTC month, YYYY-MM. |
spend_micros | integer | Yes | Provider cost of serving the site this month, in micro-USD. |
cap_micros | integer | Yes | This month's allowance (default or override, plus top-ups), in micro-USD. |
cap_source | string<default, override, upgraded> | Yes | — |
percent | integer | Yes | — |
status | string<ok, warned, paused, failed, unmetered> | Yes | — |
warn_low_pct | integer | Yes | — |
warn_high_pct | integer | Yes | — |
last_checked_at | string | Yes | — |
tiers | SiteCdnUsageTier[] | Yes | — |
Errors this endpoint can return
401 · 403 · 404 · 429