script
unanchored
cf-purge-cache
Purge CF cache for a zone by URL list or purge everything.
cloudflarecachepurgecdn
Body
param([string]$zone="6ee8bda71927640b676b0ff96bb95a26",[string[]]$urls=@(),[switch]$all,[string]$token="")\nif(-not $token){$token=$env:CF_API_TOKEN}\nif($all){$body='{"purge_everything":true}'}else{$body=@{files=$urls}|ConvertTo-Json}\n$r=(Invoke-WebRequest -Uri "https://api.cloudflare.com/client/v4/zones/$zone/purge_cache" -Method POST -Headers @{"Authorization"="Bearer $token";"Content-Type"="application/json"} -Body $body).Content|ConvertFrom-Json\nWrite-Output "ok: $($r.success)"
Provenance
Cryptographic details
| id | reg_cf_purge_cache |
| content sha256 | a208d37197d3d4ae4be3acddc1ed563565a9353eafb9c2782725e027e81e4eea |
Execute via API
POST /api/execute
{ "ref": "reg_cf_purge_cache" }
// or by hash prefix:
{ "ref": "a208d37197d3d4ae" }
Resolves this artifact by hash — deterministic, provenance-proven. Generation cost is zero when the hash exists.