Skip to content
Start here

Policies

List Page Shield policies
GET/zones/{zone_id}/page_shield/policies
Get a Page Shield policy
GET/zones/{zone_id}/page_shield/policies/{policy_id}
Create a Page Shield policy
POST/zones/{zone_id}/page_shield/policies
Update a Page Shield policy
PUT/zones/{zone_id}/page_shield/policies/{policy_id}
Delete a Page Shield policy
DELETE/zones/{zone_id}/page_shield/policies/{policy_id}
ModelsExpand Collapse
Policy = object { action, description, enabled, 2 more }
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

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