Endpoints
To invoke a Cloudflare Rulesets API operation, append the endpoint to the Cloudflare API base URL:
https://api.cloudflare.com/client/v4/
For authentication instructions, see Getting Started: Requests in the Cloudflare API documentation.
For help with endpoints and pagination, see Getting Started: Endpoints.
The Cloudflare Rulesets API supports the operations outlined below. Visit the associated links for examples.
Operation | Method & Endpoint | Notes |
---|---|---|
List Rulesets | GET accounts/{account_id}/rulesets | Returns the latest version of all rulesets owned by the account and any managed rulesets the account is entitled to execute. |
Get Ruleset | GET accounts/{account_id}/rulesets/{ruleset_id} | Returns the latest version of a ruleset with the specified ruleset ID. |
Create a root Ruleset | POST accounts/{account_id}/rulesets | Creates a new root ruleset. An account can only have one root ruleset. |
Update Ruleset | PUT accounts/{account_id}/rulesets/{root_ruleset_id} | Creates a new version of an existing root ruleset. |