Purging content
Purging removes cached copies from every edge location. The next request for a purged file fetches a fresh copy from your origin.
Purge paths or everything
A path purge (kind url) removes up to 500 paths per request. Each path starts with /, as in /images/logo.png.
A full purge (kind all) removes all the content of the site. Your origin receives more traffic until the cache is rebuilt, so prefer path purges when you know what changed.
curl -X POST 'https://api.cdnify.lat/api/v2/sites/site_0a1b2c3/purge-requests' \
-H "Authorization: Bearer $CDNIFY_API_TOKEN" \
-H "Idempotency-Key: $(uuidgen)" \
-H "Content-Type: application/json" \
-d '{"kind":"all"}'Follow a purge
A purge is accepted at once with the status queued, then in_progress, and ends as completed, partial when some edge locations failed, failed or cancelled. The purge request shows how many edge locations have completed it.
The purge history of each site lists every purge with who requested it and when.
curl 'https://api.cdnify.lat/api/v2/sites/site_0a1b2c3/purge-requests/purge_example' \
-H "Authorization: Bearer $CDNIFY_API_TOKEN"Good practices
Send an Idempotency-Key with purges you may retry, so that a retried request is not queued twice.
API tokens need the cache.purge permission to purge, and sites.read to read the history.