Skip to content
Start here

Policies

List content security rules
GET/zones/{zone_id}/page_shield/policies
Get a content security rule
GET/zones/{zone_id}/page_shield/policies/{policy_id}
Create a content security rule
POST/zones/{zone_id}/page_shield/policies
Update a content security rule
PUT/zones/{zone_id}/page_shield/policies/{policy_id}
Delete a content security rule
DELETE/zones/{zone_id}/page_shield/policies/{policy_id}
ModelsExpand Collapse
PolicyListResponse object { id, action, description, 3 more }
id: string

Identifier

maxLength32
action: "allow" or "log" or "add_reporting_directives"

The action to take if the expression matches

One of the following:
"allow"
"log"
"add_reporting_directives"
description: string

A description for the policy

enabled: boolean

Whether the policy is enabled

expression: string

The expression which must match for the policy to be applied, using the Cloudflare Firewall rule expression syntax

value: string

The policy which will be applied

PolicyGetResponse object { id, action, description, 3 more }
id: string

Identifier

maxLength32
action: "allow" or "log" or "add_reporting_directives"

The action to take if the expression matches

One of the following:
"allow"
"log"
"add_reporting_directives"
description: string

A description for the policy

enabled: boolean

Whether the policy is enabled

expression: string

The expression which must match for the policy to be applied, using the Cloudflare Firewall rule expression syntax

value: string

The policy which will be applied

PolicyCreateResponse object { id, action, description, 3 more }
id: string

Identifier

maxLength32
action: "allow" or "log" or "add_reporting_directives"

The action to take if the expression matches

One of the following:
"allow"
"log"
"add_reporting_directives"
description: string

A description for the policy

enabled: boolean

Whether the policy is enabled

expression: string

The expression which must match for the policy to be applied, using the Cloudflare Firewall rule expression syntax

value: string

The policy which will be applied

PolicyUpdateResponse object { id, action, description, 3 more }
id: string

Identifier

maxLength32
action: "allow" or "log" or "add_reporting_directives"

The action to take if the expression matches

One of the following:
"allow"
"log"
"add_reporting_directives"
description: string

A description for the policy

enabled: boolean

Whether the policy is enabled

expression: string

The expression which must match for the policy to be applied, using the Cloudflare Firewall rule expression syntax

value: string

The policy which will be applied