Autentikasi
Kirim kunci API sebagai token bearer. Kunci tersebut harus memiliki izin sites.cache.purge; kunci tanpa izin tersebut akan ditolak dengan status 403, bukan 404.
Endpoint ini tidak memerlukan id organisasi. Kunci Anda telah mengidentifikasi organisasi tempatnya berafiliasi, dan respons akan dibatasi untuk organisasi tersebut.
Coba
Ganti apa pun di dalam tanda kurung sudut dengan nilai Anda sendiri, dan placeholder kunci dengan kunci dari dasbor Anda.
curl -X POST https://api.zinndigital.com/v1/sites/{siteId}/cdn/purge \
-H "Authorization: Bearer zdk_live_…"Sudah masuk? Konsol API di dasbor Anda akan mengisi ID organisasi asli dan kunci Anda sendiri, serta menjalankan permintaan terhadap API langsung sehingga Anda dapat melihat respons aktualnya. Buka titik akhir ini di konsol API
Detail
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`.
Parameter
| Nama | Jenis | Wajib | Tentang apa ini |
|---|---|---|---|
siteId (path) | Uuid | Ya | Site ID (UUIDv7). |
Idempotency-Key (header) | string | Tidak | Client-generated key that makes an unsafe request replay-safe: the server stores the first response and returns it verbatim for repeats. |
Tanggapan
| Nama | Jenis | Wajib | Tentang apa ini |
|---|---|---|---|
purged | boolean | Ya | — |
Kesalahan yang dapat dikembalikan oleh titik akhir ini
401 · 403 · 404 · 422 · 429 · 503