Skip to content
Start here

Page Shield

Get Page Shield settings
client.pageShield.get(PageShieldGetParams { zone_id } params, RequestOptionsoptions?): Setting { enabled, updated_at, use_cloudflare_reporting_endpoint, use_connection_url_path } | null
GET/zones/{zone_id}/page_shield
Update Page Shield settings
client.pageShield.update(PageShieldUpdateParams { zone_id, enabled, use_cloudflare_reporting_endpoint, use_connection_url_path } params, RequestOptionsoptions?): PageShieldUpdateResponse { enabled, updated_at, use_cloudflare_reporting_endpoint, use_connection_url_path }
PUT/zones/{zone_id}/page_shield
ModelsExpand Collapse
Setting { enabled, updated_at, use_cloudflare_reporting_endpoint, use_connection_url_path }
enabled: boolean

When true, indicates that Page Shield is enabled.

updated_at: string

The timestamp of when Page Shield was last updated.

use_cloudflare_reporting_endpoint: boolean
use_connection_url_path: boolean

When true, the paths associated with connections URLs will also be analyzed.

PageShieldUpdateResponse { enabled, updated_at, use_cloudflare_reporting_endpoint, use_connection_url_path }
enabled: boolean

When true, indicates that Page Shield is enabled.

updated_at: string

The timestamp of when Page Shield was last updated.

use_cloudflare_reporting_endpoint: boolean
use_connection_url_path: boolean

When true, the paths associated with connections URLs will also be analyzed.

Page ShieldPolicies

List Page Shield policies
client.pageShield.policies.list(PolicyListParams { zone_id } params, RequestOptionsoptions?): SinglePage<PolicyListResponse { id, action, description, 3 more } >
GET/zones/{zone_id}/page_shield/policies
Get a Page Shield policy
client.pageShield.policies.get(stringpolicyId, PolicyGetParams { zone_id } params, RequestOptionsoptions?): PolicyGetResponse { id, action, description, 3 more } | null
GET/zones/{zone_id}/page_shield/policies/{policy_id}
Create a Page Shield policy
client.pageShield.policies.create(PolicyCreateParams { zone_id, action, description, 3 more } params, RequestOptionsoptions?): PolicyCreateResponse { id, action, description, 3 more } | null
POST/zones/{zone_id}/page_shield/policies
Update a Page Shield policy
client.pageShield.policies.update(stringpolicyId, PolicyUpdateParams { zone_id, action, description, 3 more } params, RequestOptionsoptions?): PolicyUpdateResponse { id, action, description, 3 more } | null
PUT/zones/{zone_id}/page_shield/policies/{policy_id}
Delete a Page Shield policy
client.pageShield.policies.delete(stringpolicyId, PolicyDeleteParams { zone_id } params, RequestOptionsoptions?): void
DELETE/zones/{zone_id}/page_shield/policies/{policy_id}
ModelsExpand Collapse
Policy { action, description, enabled, 2 more }
action: "allow" | "log" | "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 { id, action, description, 3 more }
id: string

Identifier

maxLength32
action: "allow" | "log" | "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 { id, action, description, 3 more }
id: string

Identifier

maxLength32
action: "allow" | "log" | "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 { id, action, description, 3 more }
id: string

Identifier

maxLength32
action: "allow" | "log" | "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 { id, action, description, 3 more }
id: string

Identifier

maxLength32
action: "allow" | "log" | "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

Page ShieldConnections

List Page Shield connections
client.pageShield.connections.list(ConnectionListParams { zone_id, direction, exclude_cdn_cgi, 10 more } params, RequestOptionsoptions?): SinglePage<Connection { id, added_at, first_seen_at, 10 more } >
GET/zones/{zone_id}/page_shield/connections
Get a Page Shield connection
client.pageShield.connections.get(stringconnectionId, ConnectionGetParams { zone_id } params, RequestOptionsoptions?): Connection { id, added_at, first_seen_at, 10 more } | null
GET/zones/{zone_id}/page_shield/connections/{connection_id}
ModelsExpand Collapse
Connection { id, added_at, first_seen_at, 10 more }
id: string

Identifier

maxLength32
added_at: string
formatdate-time
first_seen_at: string
formatdate-time
host: string
last_seen_at: string
formatdate-time
url: string
url_contains_cdn_cgi_path: boolean
domain_reported_malicious?: boolean
first_page_url?: string
malicious_domain_categories?: Array<string>
malicious_url_categories?: Array<string>
page_urls?: Array<string>
url_reported_malicious?: boolean

Page ShieldScripts

List Page Shield scripts
client.pageShield.scripts.list(ScriptListParams { zone_id, direction, exclude_cdn_cgi, 11 more } params, RequestOptionsoptions?): SinglePage<Script { id, added_at, first_seen_at, 18 more } >
GET/zones/{zone_id}/page_shield/scripts
Get a Page Shield script
client.pageShield.scripts.get(stringscriptId, ScriptGetParams { zone_id } params, RequestOptionsoptions?): ScriptGetResponse { id, added_at, first_seen_at, 19 more } | null
GET/zones/{zone_id}/page_shield/scripts/{script_id}
ModelsExpand Collapse
Script { id, added_at, first_seen_at, 18 more }
id: string

Identifier

maxLength32
added_at: string
formatdate-time
first_seen_at: string
formatdate-time
host: string
last_seen_at: string
formatdate-time
url: string
url_contains_cdn_cgi_path: boolean
cryptomining_score?: number | null

The cryptomining score of the JavaScript content.

maximum99
minimum1
Deprecateddataflow_score?: number | null

The dataflow score of the JavaScript content. This field has been deprecated in favour of js_integrity_score.

maximum99
minimum1
domain_reported_malicious?: boolean
fetched_at?: string | null

The timestamp of when the script was last fetched.

first_page_url?: string
hash?: string | null

The computed hash of the analyzed script.

maxLength64
minLength64
js_integrity_score?: number | null

The integrity score of the JavaScript content.

maximum99
minimum1
magecart_score?: number | null

The magecart score of the JavaScript content.

maximum99
minimum1
malicious_domain_categories?: Array<string>
malicious_url_categories?: Array<string>
malware_score?: number | null

The malware score of the JavaScript content.

maximum99
minimum1
Deprecatedobfuscation_score?: number | null

The obfuscation score of the JavaScript content. This field has been deprecated in favour of js_integrity_score.

maximum99
minimum1
page_urls?: Array<string>
url_reported_malicious?: boolean
ScriptGetResponse { id, added_at, first_seen_at, 19 more }
id: string

Identifier

maxLength32
added_at: string
formatdate-time
first_seen_at: string
formatdate-time
host: string
last_seen_at: string
formatdate-time
url: string
url_contains_cdn_cgi_path: boolean
cryptomining_score?: number | null

The cryptomining score of the JavaScript content.

maximum99
minimum1
Deprecateddataflow_score?: number | null

The dataflow score of the JavaScript content. This field has been deprecated in favour of js_integrity_score.

maximum99
minimum1
domain_reported_malicious?: boolean
fetched_at?: string | null

The timestamp of when the script was last fetched.

first_page_url?: string
hash?: string | null

The computed hash of the analyzed script.

maxLength64
minLength64
js_integrity_score?: number | null

The integrity score of the JavaScript content.

maximum99
minimum1
magecart_score?: number | null

The magecart score of the JavaScript content.

maximum99
minimum1
malicious_domain_categories?: Array<string>
malicious_url_categories?: Array<string>
malware_score?: number | null

The malware score of the JavaScript content.

maximum99
minimum1
Deprecatedobfuscation_score?: number | null

The obfuscation score of the JavaScript content. This field has been deprecated in favour of js_integrity_score.

maximum99
minimum1
page_urls?: Array<string>
url_reported_malicious?: boolean
versions?: Array<Version> | null
cryptomining_score?: number | null

The cryptomining score of the JavaScript content.

maximum99
minimum1
Deprecateddataflow_score?: number | null

The dataflow score of the JavaScript content. This field has been deprecated in favour of js_integrity_score.

maximum99
minimum1
fetched_at?: string | null

The timestamp of when the script was last fetched.

hash?: string | null

The computed hash of the analyzed script.

maxLength64
minLength64
js_integrity_score?: number | null

The integrity score of the JavaScript content.

maximum99
minimum1
magecart_score?: number | null

The magecart score of the JavaScript content.

maximum99
minimum1
malware_score?: number | null

The malware score of the JavaScript content.

maximum99
minimum1
Deprecatedobfuscation_score?: number | null

The obfuscation score of the JavaScript content. This field has been deprecated in favour of js_integrity_score.

maximum99
minimum1

Page ShieldCookies

List Page Shield Cookies
client.pageShield.cookies.list(CookieListParams { zone_id, direction, domain, 12 more } params, RequestOptionsoptions?): SinglePage<CookieListResponse { id, first_seen_at, host, 11 more } >
GET/zones/{zone_id}/page_shield/cookies
Get a Page Shield cookie
client.pageShield.cookies.get(stringcookieId, CookieGetParams { zone_id } params, RequestOptionsoptions?): CookieGetResponse { id, first_seen_at, host, 11 more } | null
GET/zones/{zone_id}/page_shield/cookies/{cookie_id}
ModelsExpand Collapse
One of the following:
One of the following:
One of the following:
One of the following: