cookies
Creates, updates, deletes, gets or lists a cookies resource.
Overview
| Name | cookies |
| Type | Resource |
| Id | cloudflare.page_shield.cookies |
Fields
The following fields are returned by SELECT queries:
- get
- list
Get a Page Shield cookie response
| Name | Datatype | Description |
|---|---|---|
id | string | Identifier (example: 023e105f4ecef8ad9ca31a8372d0c353) |
name | string | (example: session_id) |
domain_attribute | string | (example: cloudflare.com) |
expires_attribute | string (date-time) | (example: 2021-10-02T09:57:54Z) |
first_seen_at | string (date-time) | (example: 2021-08-18T10:51:08Z) |
host | string | (example: blog.cloudflare.com) |
http_only_attribute | boolean | |
last_seen_at | string (date-time) | (example: 2021-09-02T09:57:54Z) |
max_age_attribute | integer | |
page_urls | array | |
path_attribute | string | (example: /) |
same_site_attribute | string | (lax, strict, none) (example: strict) |
secure_attribute | boolean | |
type | string | (first_party, unknown) (example: first_party) |
List Page Shield cookies response
| Name | Datatype | Description |
|---|---|---|
id | string | Identifier (example: 023e105f4ecef8ad9ca31a8372d0c353) |
name | string | (example: session_id) |
domain_attribute | string | (example: cloudflare.com) |
expires_attribute | string (date-time) | (example: 2021-10-02T09:57:54Z) |
first_seen_at | string (date-time) | (example: 2021-08-18T10:51:08Z) |
host | string | (example: blog.cloudflare.com) |
http_only_attribute | boolean | |
last_seen_at | string (date-time) | (example: 2021-09-02T09:57:54Z) |
max_age_attribute | integer | |
page_urls | array | |
path_attribute | string | (example: /) |
same_site_attribute | string | (lax, strict, none) (example: strict) |
secure_attribute | boolean | |
type | string | (first_party, unknown) (example: first_party) |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | zone_id, cookie_id | Fetches a cookie collected by Page Shield by cookie ID. | |
list | select | zone_id | hosts, page, per_page, order_by, direction, page_url, export, name, secure, http_only, same_site, type, path, domain | Lists 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.
| Name | Datatype | Description |
|---|---|---|
cookie_id | string | |
zone_id | string | The Cloudflare zone ID. |
direction | string | |
domain | string | |
export | string | |
hosts | string | |
http_only | boolean | |
name | string | |
order_by | string | |
page | string | |
page_url | string | |
path | string | |
per_page | number | |
same_site | string | |
secure | boolean | |
type | string |
SELECT examples
- get
- list
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
;
Lists all cookies collected by Page Shield.
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 hosts = '{{ hosts }}'
AND page = '{{ page }}'
AND per_page = '{{ per_page }}'
AND order_by = '{{ order_by }}'
AND direction = '{{ direction }}'
AND page_url = '{{ page_url }}'
AND export = '{{ export }}'
AND name = '{{ name }}'
AND secure = '{{ secure }}'
AND http_only = '{{ http_only }}'
AND same_site = '{{ same_site }}'
AND type = '{{ type }}'
AND path = '{{ path }}'
AND domain = '{{ domain }}'
;