Skip to content

Commit 4959576

Browse files
committed
Moves section to the end of the page.
1 parent 808614f commit 4959576

File tree

1 file changed

+17
-17
lines changed

1 file changed

+17
-17
lines changed

src/content/docs/log-explorer/manage-datasets.mdx

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -20,23 +20,6 @@ Log Explorer currently supports the following datasets:
2020
- [Secure Web Gateway](/cloudflare-one/policies/gateway/)
2121
- [WARP](/warp-client/)
2222

23-
### Headers and cookies
24-
25-
To query request headers and cookies, you must first enable logging for these fields using [Custom fields](/logs/logpush/logpush-job/custom-fields/).
26-
27-
The example below shows how to query HTTP requests by date, timestamp, client country, and a custom request header. Be sure to log the specific headers or cookies you plan to query in advance.
28-
29-
```bash
30-
SELECT clientip, clientrequesthost, clientrequestmethod, edgeendtimestamp, edgestarttimestamp, rayid, clientcountry, requestheaders
31-
FROM http_requests
32-
WHERE Date >= '2025-07-17'
33-
AND Date <= '2025-07-17'
34-
AND edgeendtimestamp >= '2025-07-17T07:54:19Z'
35-
AND edgeendtimestamp <= '2025-07-18T07:54:19Z'
36-
AND clientcountry = 'us'
37-
AND requestheaders."x-test-header" like '%654AM%';
38-
```
39-
4023
## Enable Log Explorer
4124

4225
In order for Log Explorer to begin storing logs, you need to enable the desired datasets. You can do this via the dashboard or the API.
@@ -87,4 +70,21 @@ curl https://api.cloudflare.com/client/v4/accounts/{account_id}/logs/explorer/da
8770
--json '{
8871
"dataset": "access_requests"
8972
}'
73+
```
74+
75+
## Headers and cookies
76+
77+
To query request headers and cookies, you must first enable logging for these fields using [Custom fields](/logs/logpush/logpush-job/custom-fields/).
78+
79+
The example below shows how to query HTTP requests by date, timestamp, client country, and a custom request header. Be sure to log the specific headers or cookies you plan to query in advance.
80+
81+
```bash
82+
SELECT clientip, clientrequesthost, clientrequestmethod, edgeendtimestamp, edgestarttimestamp, rayid, clientcountry, requestheaders
83+
FROM http_requests
84+
WHERE Date >= '2025-07-17'
85+
AND Date <= '2025-07-17'
86+
AND edgeendtimestamp >= '2025-07-17T07:54:19Z'
87+
AND edgeendtimestamp <= '2025-07-18T07:54:19Z'
88+
AND clientcountry = 'us'
89+
AND requestheaders."x-test-header" like '%654AM%';
9090
```

0 commit comments

Comments
 (0)