hosting

GET /v1/sites/{siteId}/cdn/analytics

Read edge traffic for a site's CDN zone.

Tutti gli endpoint hosting

Autenticazione

Invia una chiave API come token di tipo bearer. La chiave deve disporre dell'autorizzazione sites.view; una chiave sprovvista di tale autorizzazione viene rifiutata con 403 anziché 404.

Questo endpoint non richiede alcun ID organizzazione. La tua chiave identifica già l'organizzazione a cui appartiene e la risposta è limitata ad essa.

Provalo

Sostituisci qualsiasi elemento tra parentesi angolari con i tuoi valori e il segnaposto key con una chiave dalla tua dashboard.

curl -X GET https://api.zinndigital.com/v1/sites/{siteId}/cdn/analytics \
  -H "Authorization: Bearer zdk_live_…"

Hai effettuato l'accesso? La console API nella tua dashboard inserisce il tuo ID organizzazione reale e la tua chiave personale, ed esegue la richiesta sull'API live in modo da poter vedere la risposta effettiva. Apri questo endpoint nella console API

Dettagli

Daily requests, bytes, threats and unique visitors as counted **at the CDN edge**. This is not the same measurement as `/v1/sites/{siteId}/cdn/statistics`, and the two will not agree. That endpoint reports the hosting platform's own edge cache for a site on a managed hosting plan; this one reports the Cloudflare zone's. A site may have one, the other, both or neither, and they are counted at different edges — collapsing them into one number would invent a figure that is true of neither. Requires `sites.view`.

Parametri

NomeTipoObbligatorioChe cos'è
siteId (path)UuidSite ID (UUIDv7).
days (query)integerNoHow many days to report, clamped to 1–30. Clamped rather than trusted: this is reachable from a screen a customer can refresh, against a provider API whose request budget is sha…

Risposta

NomeTipoObbligatorioChe cos'è
site_idUuidUUIDv7 identifier — sortable by creation time (docs/02 §8).
supportedboolean
daysCdnTrafficDay[]Most recent first.
total_requestsinteger
total_threatsinteger

Errori che questo endpoint può restituire

401 · 403 · 404 · 429 · 503