Update and deploy rulesets
You can use the API to update basic properties of a ruleset (currently only the description) and the list of rules in the ruleset.
Use one of the following API endpoints:
Operation | Method + Endpoint |
---|---|
Update an account ruleset | PUT /accounts/{account_id}/rulesets/{ruleset_id} |
Update a zone ruleset | PUT /zones/{zone_id}/rulesets/{ruleset_id} |
Update an account entry point ruleset | PUT /accounts/{account_id}/rulesets/phases/{phase_name}/entrypoint |
Update a zone entry point ruleset | PUT /zones/{zone_id}/rulesets/phases/{phase_name}/entrypoint |
Use this API method to set the rules of a ruleset. You must include all the rules you want to associate with the ruleset in every request.
To deploy a ruleset, create a rule with "action": "execute"
that executes the ruleset, and add the ruleset ID to the action_parameters
field in the id
parameter.
The following example deploys a managed ruleset to the zone-level http_request_firewall_managed
phase of a zone ({zone_id}
).
For more information on deploying rulesets, refer to Deploy rulesets.
You can use this API method to update the description of an existing ruleset or phase entry point.
The response will include the complete ruleset definition, including all the rules.