Page Shield

page_shield

Methods

Get Page Shield Settings -> Envelope<>
get/zones/{zone_id}/page_shield

Fetches the Page Shield settings.

Update Page Shield Settings -> Envelope<{ enabled, updated_at, use_cloudflare_reporting_endpoint, 1 more... }>
put/zones/{zone_id}/page_shield

Updates Page Shield settings.

Domain types

Setting = { enabled, updated_at, use_cloudflare_reporting_endpoint, 1 more... }
Page Shield

Connections

page_shield.connections

Methods

Get A Page Shield Connection -> Envelope<>
get/zones/{zone_id}/page_shield/connections/{connection_id}

Fetches a connection detected by Page Shield by connection ID.

List Page Shield Connections -> SinglePage<>
get/zones/{zone_id}/page_shield/connections

Lists all connections detected by Page Shield.

Domain types

Connection = { id, added_at, first_seen_at, 10 more... }

page_shield.cookies

Methods

Get A Page Shield Cookie -> Envelope<{ id, first_seen_at, host, 11 more... }>
get/zones/{zone_id}/page_shield/cookies/{cookie_id}

Fetches a cookie collected by Page Shield by cookie ID.

List Page Shield Cookies -> SinglePage<{ id, first_seen_at, host, 11 more... }>
get/zones/{zone_id}/page_shield/cookies

Lists all cookies collected by Page Shield.

Security
API Email + API Key

The previous authorization scheme for interacting with the Cloudflare API, used in conjunction with a Global API key.

Example: X-Auth-Email: user@example.com

The previous authorization scheme for interacting with the Cloudflare API. When possible, use API tokens instead of Global API keys.

Example: X-Auth-Key: 144c9defac04969c7bfad8efaa8ea194

Accepted Permissions (at least one required)

Page Shield Domain Page Shield Read Domain Page Shield Page Shield Read Zone Settings Write Zone Settings Read

Parameters
zone_id: string
(maxLength: 32)

Identifier

direction:
Optional

The direction used to sort returned cookies.'

"asc"
"desc"
domain: string
Optional
(maxLength: 1024)

Filters the returned cookies that match the specified domain attribute

export:
Optional

Export the list of cookies as a file.

"csv"
hosts: string
Optional

Includes cookies that match one or more URL-encoded hostnames separated by commas.

Wildcards are supported at the start and end of each hostname to support starts with, ends with and contains. If no wildcards are used, results will be filtered by exact match

http_only: boolean
Optional

Filters the returned cookies that are set with HttpOnly

name: string
Optional
(maxLength: 1024)

Filters the returned cookies that match the specified name. Wildcards are supported at the start and end to support starts with, ends with and contains. e.g. session*

order_by:
Optional

The field used to sort returned cookies.

"first_seen_at"
"last_seen_at"
page: string
Optional

The current page number of the paginated results.

We additionally support a special value "all". When "all" is used, the API will return all the cookies with the applied filters in a single page. This feature is best-effort and it may only work for zones with a low number of cookies

page_url: string
Optional

Includes connections that match one or more page URLs (separated by commas) where they were last seen

Wildcards are supported at the start and end of each page URL to support starts with, ends with and contains. If no wildcards are used, results will be filtered by exact match

path: string
Optional
(maxLength: 1024)

Filters the returned cookies that match the specified path attribute

per_page: number
Optional
(maximum: 100, minimum: 1)

The number of results per page.

same_site:
Optional

Filters the returned cookies that match the specified same_site attribute

"lax"
"strict"
"none"
secure: boolean
Optional

Filters the returned cookies that are set with Secure

type:
Optional

Filters the returned cookies that match the specified type attribute

"first_party"
"unknown"
Response fields
result: Array<{ id, first_seen_at, host, 11 more... }>
result_info: { count, page, per_page, 2 more... }
success: true

Whether the API call was successful

errors: Array<>
Optional
messages: Array<>
Optional
Request example
200Example
Page Shield

Policies

page_shield.policies

Methods

Create A Page Shield Policy -> Envelope<{ id, action, description, 3 more... }>
post/zones/{zone_id}/page_shield/policies

Create a Page Shield policy.

Delete A Page Shield Policy ->
delete/zones/{zone_id}/page_shield/policies/{policy_id}

Delete a Page Shield policy by ID.

Get A Page Shield Policy -> Envelope<{ id, action, description, 3 more... }>
get/zones/{zone_id}/page_shield/policies/{policy_id}

Fetches a Page Shield policy by ID.

List Page Shield Policies -> SinglePage<{ id, action, description, 3 more... }>
get/zones/{zone_id}/page_shield/policies

Lists all Page Shield policies.

Update A Page Shield Policy -> Envelope<{ id, action, description, 3 more... }>
put/zones/{zone_id}/page_shield/policies/{policy_id}

Update a Page Shield policy by ID.

Domain types

Policy = { action, description, enabled, 2 more... }

page_shield.scripts

Methods

Get A Page Shield Script -> Envelope<{ id, added_at, first_seen_at, 19 more... }>
get/zones/{zone_id}/page_shield/scripts/{script_id}

Fetches a script detected by Page Shield by script ID.

List Page Shield Scripts -> SinglePage<>
get/zones/{zone_id}/page_shield/scripts

Lists all scripts detected by Page Shield.

Domain types

Script = { id, added_at, first_seen_at, 18 more... }