Cloudflare 中文文档
Ruleset Engine
编辑这个页面
跳转官方原文档
Set theme to dark (⇧+D)

Delete a rule in a ruleset

Deletes a single rule in a ruleset at the account or zone level.

Use one of the following API endpoints:

Operation Method + Endpoint
Delete an account ruleset rule DELETE /accounts/{account_id}/rulesets/{ruleset_id}/rules/{rule_id}
Delete a zone ruleset rule DELETE /zones/{zone_id}/rulesets/{ruleset_id}/rules/{rule_id}

If the delete operation succeeds, the API method call returns a 200 OK HTTP status code with the complete ruleset in the response body.

​​ Example

The following example deletes rule {rule_id_1} belonging to ruleset {ruleset_id}.

Request
Response

The response includes the complete ruleset after deleting the rule.