Cloudflare Filters API
Cloudflare Filters is an API-only component of firewall rules for designing complex criteria that rely on boolean operators and other logic to examine incoming HTTP traffic and look for a match.
For example, a filter matching:
- An HTTP user agent, and
- The HTTP path, and
- The source IP address
Associate a filter with a firewall rule to define the scope of that rule.
Differences from other Cloudflare APIs
The Firewall Rules API behaves differently from most Cloudflare APIs in two ways:
- API calls accept and return multiple items, and allow applying data changes to multiple items.
- Although API calls return the , the error object follows the , such that in an error condition, it is clear which item produced the error and why.