Programmable Flow Protection (Beta)
Use the Cloudflare API to configure Programmable Flow Protection via API.
For examples of API calls, refer to the Programmable Flow Protection documentation.
To obtain the complete endpoint, append the Programmable Flow Protection API endpoints listed below to the Cloudflare API base URL:
https://api.cloudflare.com/client/v4The {account_id} argument is the account ID (a hexadecimal string). You can find this value in the Cloudflare dashboard.
The following table summarizes the available operations.
| Operation | Verb + Endpoint |
|---|---|
| Upload a program | POST /accounts/{account_id}/magic/programmable_flow_protection/configs/programs |
| Update a program | PATCH /accounts/{account_id}/magic/programmable_flow_protection/configs/programs/{program_id} |
| List programs | GET /accounts/{account_id}/magic/programmable_flow_protection/configs/programs |
| Delete a program | DELETE /accounts/{account_id}/magic/programmable_flow_protection/configs/programs/{program_id} |
| Delete all programs | DELETE /accounts/{account_id}/magic/programmable_flow_protection/configs/programs |
| Operation | Verb + Endpoint |
|---|---|
| Create a rule | POST /accounts/{account_id}/magic/programmable_flow_protection/configs/rules |
| Update a rule | PATCH /accounts/{account_id}/magic/programmable_flow_protection/configs/rules/{rule_id} |
| List rules | GET /accounts/{account_id}/magic/programmable_flow_protection/configs/rules |
| Delete a rule | DELETE /accounts/{account_id}/magic/programmable_flow_protection/configs/rules/{rule_id} |
| Delete all rules | DELETE /accounts/{account_id}/magic/programmable_flow_protection/configs/rules |
| Operation | Verb + Endpoint |
|---|---|
| Debug Packet CAPture (PCAP) | POST /accounts/{account_id}/magic/programmable_flow_protection/configs/programs/{program_id}/pcap?ip_offset={ip_offset_value} |