cloudflare.cache.purge ​
Purge Cloudflare CDN cache for specific URLs or entire zone
Purge the Cloudflare CDN cache for specific URLs or the entire zone.
If urls is provided, only those URLs are purged. If urls is empty or omitted, purge_everything must be true to purge the entire zone cache.
Inputs:
- zone_id: Cloudflare zone ID (required).
- urls: List of fully-qualified URLs to purge (optional).
- purge_everything: Purge the entire zone cache — use with care (optional, default: false).
Outputs (terminal state_data):
- zone_id: str
- purge_everything: bool
- urls_purged: list — the URLs that were purged (empty when purge_everything=true)
Plugin required: context.get_plugin("cloudflare") must expose .api_token.
Overview ​
| Property | Value |
|---|---|
| Workflow type | Atomic |
| Library | App-cloudflare |
| Version | 1.0 |
Input Schema ​
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
zone_id | string | Yes | — | Cloudflare zone ID |
urls | json | No | — | List of URLs to purge |
purge_everything | boolean | No | — | Purge entire zone cache (default: false) |
Output Schema ​
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
purge_everything | boolean | No | — | — |
urls_purged | list | No | — | — |
zone_id | string | No | — | — |
urls | json | No | — | — |
failure_reason | string | No | — | — |
failure_type | string | No | — | — |
failed_action | string | No | — | — |
failed_at_state | string | No | — | — |
failed_step | string | No | — | — |
failed_layer | string | No | — | — |
error | string | No | — | — |
error_type | string | No | — | — |
States ​
| State | Initial | Terminal | Success | Auto-advance | Description |
|---|---|---|---|---|---|
pending | Yes | No | — | execute | — |
completed | No | Yes | Yes | — | — |
failed | No | Yes | No | — | — |
State Diagram ​
Transitions ​
| From | Action | To | Description |
|---|---|---|---|
pending | execute | completed | — |
* (any state) | fail | failed | — |
API Usage ​
bash
POST /api/workflows/start
Content-Type: application/json
{
"workflow_type": "cloudflare.cache.purge",
"initial_data": {
"zone_id": "value"
}
}