hosting

POST /v1/sites/{siteId}/cdn/purge

Purge a site's CDN cache.

Lahat ng hosting endpoint

Pagpapatotoo

Magpadala ng API key bilang isang bearer token. Kailangang taglayin ng key ang pahintulot na sites.cache.purge; ang key na wala nito ay tatanggihan gamit ang 403, hindi 404.

Ang endpoint na ito ay hindi nangangailangan ng id ng organisasyon. Natutukoy na ng iyong key ang organisasyong kinabibilangan nito, at nakatuon ang tugon dito.

Subukan ito

Palitan ang anuman sa loob ng mga panaklong na may anggulo ng iyong sariling mga halaga, at ang placeholder ng key na may key mula sa iyong dashboard.

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

Nakalagda? Ang API console sa iyong dashboard ay awtomatikong naglalagay ng iyong tunay na ID ng organisasyon at sariling susi, at pinapatakbo ang kahilingan laban sa live na API upang makita mo ang aktwal na tugon. Buksan ang endpoint na ito sa console ng API

Mga Detalye

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`.

Mga Parameter

PangalanUriKailanganAno ito
siteId (path)UuidOoSite ID (UUIDv7).
Idempotency-Key (header)stringHindiClient-generated key that makes an unsafe request replay-safe: the server stores the first response and returns it verbatim for repeats.

Tugon

PangalanUriKailanganAno ito
purgedbooleanOo

Mga error na maibabalik ng endpoint na ito

401 · 403 · 404 · 422 · 429 · 503