Skip to main content

cookies

Creates, updates, deletes, gets or lists a cookies resource.

Overview

Namecookies
TypeResource
Idcloudflare.page_shield.cookies

Fields

The following fields are returned by SELECT queries:

Get a Page Shield cookie response

NameDatatypeDescription
idstringIdentifier (example: 023e105f4ecef8ad9ca31a8372d0c353)
namestring (example: session_id)
domain_attributestring (example: cloudflare.com)
expires_attributestring (date-time) (example: 2021-10-02T09:57:54Z)
first_seen_atstring (date-time) (example: 2021-08-18T10:51:08Z)
hoststring (example: blog.cloudflare.com)
http_only_attributeboolean
last_seen_atstring (date-time) (example: 2021-09-02T09:57:54Z)
max_age_attributeinteger
page_urlsarray
path_attributestring (example: /)
same_site_attributestring (lax, strict, none) (example: strict)
secure_attributeboolean
typestring (first_party, unknown) (example: first_party)

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectzone_id, cookie_idFetches a cookie collected by Page Shield by cookie ID.
listselectzone_idhosts, page, per_page, order_by, direction, page_url, export, name, secure, http_only, same_site, type, path, domainLists all cookies collected by Page Shield.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
zone_idstringThe Cloudflare zone ID.
directionstring
domainstring
exportstring
hostsstring
http_onlyboolean
namestring
order_bystring
pagestring
page_urlstring
pathstring
per_pagenumber
same_sitestring
secureboolean
typestring

SELECT examples

Fetches a cookie collected by Page Shield by cookie ID.

SELECT
id,
name,
domain_attribute,
expires_attribute,
first_seen_at,
host,
http_only_attribute,
last_seen_at,
max_age_attribute,
page_urls,
path_attribute,
same_site_attribute,
secure_attribute,
type
FROM cloudflare.page_shield.cookies
WHERE zone_id = '{{ zone_id }}' -- required
AND cookie_id = '{{ cookie_id }}' -- required
;