For some operations, you can use specific endpoints provided by the Rulesets API for managing phase entry point rulesets. These endpoints include the phase name in the endpoint instead of the ruleset ID.
For example, instead of using the following endpoint:
You can use the following endpoint:
To invoke a Rulesets API operation, append the endpoint to the Cloudflare API base URL:
The Cloudflare Rulesets API supports the operations outlined below. Visit the associated links for API endpoints and examples.
List and view rulesets
|List existing rulesets|
Returns the list of existing rulesets at the account level or at the zone level.
|View a specific ruleset|
Returns the properties of the most recent version of a specific ruleset.
|List all versions of a ruleset|
Returns a list of all the versions of a ruleset.
|View a specific version of a ruleset|
Returns the configuration of a specific version of a ruleset, including its rules.
|List rules in a managed ruleset with a specific tag|
Returns a list of all the rules in a managed ruleset with a specific tag.
Creates a new ruleset or a new phase entry point.
Update and deploy rulesets
|Update or deploy a ruleset|
Updates the basic properties of a ruleset and the list of rules in the ruleset.
|Add rule to ruleset|
Adds a single rule to an existing ruleset.
|Update a rule in a ruleset|
Updates the definition of a single rule within a ruleset.
|Delete a rule in a ruleset|
Deletes a single rule in a ruleset.
Deletes all the versions of a ruleset.
|Delete ruleset version|
Deletes a specific version of a ruleset.