Autenticazione
Invia una chiave API come token di tipo bearer. La chiave deve disporre dell'autorizzazione sites.cache.purge; 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 POST https://api.zinndigital.com/v1/sites/{siteId}/cdn/purge \
-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
Purges the whole zone for this site. The engine verifies the site owns the domain before purging, because on a pooled CDN account a zone resolves by name alone and an unchecked purge could clear a different tenant's cache — so the hostname is read off the site row and **the request body must be empty**. A body carrying a `domain`, `zone` or `urls` key is a `422`, not a silently ignored field. A site that is not served through our CDN is a `404`, answered before any vendor call. `Idempotency-Key` is accepted and requires no de-duplication here: purging a zone twice has the same effect as purging it once. Requires `sites.cache.purge`.
Parametri
| Nome | Tipo | Obbligatorio | Che cos'è |
|---|---|---|---|
siteId (path) | Uuid | Sì | Site ID (UUIDv7). |
Idempotency-Key (header) | string | No | Client-generated key that makes an unsafe request replay-safe: the server stores the first response and returns it verbatim for repeats. |
Risposta
| Nome | Tipo | Obbligatorio | Che cos'è |
|---|---|---|---|
purged | boolean | Sì | — |
Errori che questo endpoint può restituire
401 · 403 · 404 · 422 · 429 · 503