The following sections contain example requests for common API calls. For a list of available API endpoints, refer to Endpoints.
Get all DNS protection rules
The following example retrieves the currently configured rules for Advanced DNS Protection.
Create DNS protection rule
The following example creates an Advanced DNS Protection rule with a global scope.
Refer to JSON objects for more information on the fields in the JSON body.
Update DNS protection rule
The following example updates an existing DNS protection rule with ID {rule_id}
.
The request body can contain only the fields you want to update (from mode
, profile_sensitivity
, rate_sensitivity
, and burst_sensitivity
).
Refer to JSON objects for more information on the fields in the JSON body.
Thank you for helping improve Cloudflare's documentation!