Skip to content
Start here

Page Shield

Get Page Shield settings
client.PageShield.Get(ctx, query) (*Setting, error)
GET/zones/{zone_id}/page_shield
Update Page Shield settings
client.PageShield.Update(ctx, params) (*PageShieldUpdateResponse, error)
PUT/zones/{zone_id}/page_shield
ModelsExpand Collapse
type Setting struct{…}
Enabled bool

When true, indicates that Page Shield is enabled.

UpdatedAt string

The timestamp of when Page Shield was last updated.

UseCloudflareReportingEndpoint bool
UseConnectionURLPath bool

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

Page ShieldPolicies

List Page Shield policies
client.PageShield.Policies.List(ctx, query) (*SinglePage[PolicyListResponse], error)
GET/zones/{zone_id}/page_shield/policies
Get a Page Shield policy
client.PageShield.Policies.Get(ctx, policyID, query) (*PolicyGetResponse, error)
GET/zones/{zone_id}/page_shield/policies/{policy_id}
Create a Page Shield policy
client.PageShield.Policies.New(ctx, params) (*PolicyNewResponse, error)
POST/zones/{zone_id}/page_shield/policies
Update a Page Shield policy
client.PageShield.Policies.Update(ctx, policyID, params) (*PolicyUpdateResponse, error)
PUT/zones/{zone_id}/page_shield/policies/{policy_id}
Delete a Page Shield policy
client.PageShield.Policies.Delete(ctx, policyID, body) error
DELETE/zones/{zone_id}/page_shield/policies/{policy_id}
ModelsExpand Collapse
type Policy struct{…}
Action PolicyAction

The action to take if the expression matches

One of the following:
const PolicyActionAllow PolicyAction = "allow"
const PolicyActionLog PolicyAction = "log"
const PolicyActionAddReportingDirectives PolicyAction = "add_reporting_directives"
Description string

A description for the policy

Enabled bool

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(ctx, params) (*SinglePage[Connection], error)
GET/zones/{zone_id}/page_shield/connections
Get a Page Shield connection
client.PageShield.Connections.Get(ctx, connectionID, query) (*Connection, error)
GET/zones/{zone_id}/page_shield/connections/{connection_id}
ModelsExpand Collapse
type Connection struct{…}
ID string

Identifier

maxLength32
AddedAt Time
formatdate-time
FirstSeenAt Time
formatdate-time
Host string
LastSeenAt Time
formatdate-time
URL string
URLContainsCDNCGIPath bool
DomainReportedMalicious booloptional
FirstPageURL stringoptional
MaliciousDomainCategories []stringoptional
MaliciousURLCategories []stringoptional
PageURLs []stringoptional
URLReportedMalicious booloptional

Page ShieldScripts

List Page Shield scripts
client.PageShield.Scripts.List(ctx, params) (*SinglePage[Script], error)
GET/zones/{zone_id}/page_shield/scripts
Get a Page Shield script
client.PageShield.Scripts.Get(ctx, scriptID, query) (*ScriptGetResponse, error)
GET/zones/{zone_id}/page_shield/scripts/{script_id}
ModelsExpand Collapse
type Script struct{…}
ID string

Identifier

maxLength32
AddedAt Time
formatdate-time
FirstSeenAt Time
formatdate-time
Host string
LastSeenAt Time
formatdate-time
URL string
URLContainsCDNCGIPath bool
CryptominingScore int64optional

The cryptomining score of the JavaScript content.

maximum99
minimum1
DeprecatedDataflowScore int64optional

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

maximum99
minimum1
DomainReportedMalicious booloptional
FetchedAt stringoptional

The timestamp of when the script was last fetched.

FirstPageURL stringoptional
Hash stringoptional

The computed hash of the analyzed script.

maxLength64
minLength64
JSIntegrityScore int64optional

The integrity score of the JavaScript content.

maximum99
minimum1
MagecartScore int64optional

The magecart score of the JavaScript content.

maximum99
minimum1
MaliciousDomainCategories []stringoptional
MaliciousURLCategories []stringoptional
MalwareScore int64optional

The malware score of the JavaScript content.

maximum99
minimum1
DeprecatedObfuscationScore int64optional

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

maximum99
minimum1
PageURLs []stringoptional
URLReportedMalicious booloptional

Page ShieldCookies

List Page Shield Cookies
client.PageShield.Cookies.List(ctx, params) (*SinglePage[CookieListResponse], error)
GET/zones/{zone_id}/page_shield/cookies
Get a Page Shield cookie
client.PageShield.Cookies.Get(ctx, cookieID, query) (*CookieGetResponse, error)
GET/zones/{zone_id}/page_shield/cookies/{cookie_id}