Skip to content

Commit 92423f6

Browse files
Addressing Pedro suggestions
1 parent 69d55b6 commit 92423f6

File tree

3 files changed

+4
-62
lines changed

3 files changed

+4
-62
lines changed

src/content/docs/log-explorer/api.mdx

Lines changed: 1 addition & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -16,57 +16,7 @@ Log Explorer is available to users with the following permissions:
1616

1717
Note that these permissions exist at the account and zone level and you need the appropriate permission level for the datasets you wish to query.
1818

19-
Authentication with the API can be done via an authentication header or API token. Append your API call with either of the following additional parameters.
20-
21-
- **Authentication header**
22-
23-
- `X-Auth-Email` - the Cloudflare account email address associated with the domain
24-
- `X-Auth-Key` - the Cloudflare API key
25-
26-
- **API token**
27-
28-
- `Authorization: Bearer <API_TOKEN>` To create an appropriately scoped API token, refer to [Create API token](/fundamentals/api/get-started/create-token/) documentation. Copy and paste the token into the authorization parameter for your API call.
29-
30-
## Enable datasets
31-
32-
Use the Log Explorer API to enable Log Explorer for each dataset you wish to store. It may take a few minutes after a log stream is enabled before you can view the logs.
33-
34-
The following `curl` command is an example for enabling the zone-level dataset `http_requests`, as well as the expected response when the command succeeds.
35-
36-
```bash
37-
curl https://api.cloudflare.com/client/v4/zones/{zone_id}/logs/explorer/datasets \
38-
--header "Authorization: Bearer <API_TOKEN>" \
39-
--json '{
40-
"dataset": "http_requests"
41-
}'
42-
```
43-
44-
```json output
45-
{
46-
"result": {
47-
"dataset": "http_requests",
48-
"object_type": "zone",
49-
"object_id": "<ZONE ID>",
50-
"created_at": "2025-06-03T14:33:16Z",
51-
"updated_at": "2025-06-03T14:33:16Z",
52-
"dataset_id": "01973635f7e273a1964a02f4d4502499",
53-
"enabled": true
54-
},
55-
"success": true,
56-
"errors": [],
57-
"messages": []
58-
}
59-
```
60-
61-
If you would like to enable an account-level dataset, replace `zones/{zone_id}` with `accounts/{account_id}` in the `curl` command. For example:
62-
63-
```bash
64-
curl https://api.cloudflare.com/client/v4/accounts/{account_id}/logs/explorer/datasets \
65-
--header "Authorization: Bearer <API_TOKEN>" \
66-
--json '{
67-
"dataset": "access_requests"
68-
}'
69-
```
19+
Authentication with the API can be done via an API token or API key with an email. Refer to [Create API token](/fundamentals/api/get-started/create-token/) for further instructions.
7020

7121
## Query data
7222

src/content/docs/log-explorer/custom-dashboards.mdx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ Custom dashboards allow you to create tailored dashboards to monitor application
99

1010
:::note
1111
Enterprise customers can create up to 100 dashboards.
12+
1213
Customers on Pro and Business plans can create up to 5 dashboards.
1314
:::
1415

@@ -25,8 +26,8 @@ To create a new dashboard:
2526

2627
When creating a dashboard, you have two options: building one from scratch or using a pre-designed template.
2728

28-
- A **from-scratch dashboard** gives you full control over its structure, allowing you to choose the exact datasets, metrics, and visualizations that fit your needs. This approach is ideal if you have specific monitoring goals or need a highly customized view of your data.
29-
- On the other hand, **templates** provide a faster way to set up a dashboard with commonly used metrics and charts. They are useful for standard use cases, such as monitoring security threats, API performance, or bot traffic. Templates help you get started quickly while still allowing modifications to fit your requirements.
29+
- A **templates** provide a faster way to set up a dashboard with commonly used metrics and charts. They are useful for standard use cases, such as monitoring security threats, API performance, or bot traffic. Templates help you get started quickly while still allowing modifications to fit your requirements.
30+
- On the other hand, **from-scratch dashboard** gives you full control over its structure, allowing you to choose the exact datasets, metrics, and visualizations that fit your needs. This approach is ideal if you have specific monitoring goals or need a highly customized view of your data.
3031

3132
Choosing between these options depends on whether you need a quick setup with predefined insights or a fully customized dashboard tailored to your unique analysis needs.
3233

src/content/docs/log-explorer/log-search.mdx

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -65,11 +65,6 @@ You can filter and view your logs via the Cloudflare dashboard or the API.
6565
7. A query preview is displayed. Select **Custom SQL** to change the query.
6666
8. Select **Run query** when you are done. The results are displayed below within the **Query results** section.
6767

68-
:::note
69-
70-
71-
72-
7368
For example, to find an HTTP request with a specific [Ray ID](/fundamentals/reference/cloudflare-ray-id/), go to **Custom SQL**, and enter the following SQL query:
7469

7570
```sql
@@ -111,8 +106,6 @@ After selecting all the fields for your query, you can save it by selecting **Sa
111106

112107
You can also access the Log Explorer dashboard directly from the [Security Analytics dashboard](/waf/analytics/security-analytics/#logs). When doing so, the filters you applied in Security Analytics will automatically carry over to your query in Log Explorer.
113108

114-
:::
115-
116109
## Optimize your queries
117110

118111
All the tables supported by Log Explorer contain a special column called `date`, which helps to narrow down the amount of data that is scanned to respond to your query, resulting in faster query response times. The value of `date` must be in the form of `YYYY-MM-DD`. For example, to query logs that occurred on October 12, 2023, add the following to your `WHERE` clause: `date = '2023-10-12'`. The column supports the standard operators of `<`, `>`, and `=`.
@@ -157,8 +150,6 @@ All fields listed in [Log Fields](/logs/reference/log-fields/) for the [supporte
157150

158151
Log Explorer performs best when query parameters focus on narrower ranges of time. You may experience query timeouts when your query would return a large quantity of data. Consider refining your query to improve performance.
159152

160-
If your query times out with an HTTP status of 524 (Gateway Timeout), consider using one of the [streaming output formats](/logs/log-explorer/#output-formats), such as `application/x-ndjson`.
161-
162153
### Why don't I see any logs in my queries after enabling the dataset?
163154

164155
Log Explorer starts ingesting logs from the moment you enable the dataset. It will not display logs for events that occurred before the dataset was enabled. Make sure that new events have been generated since enabling the dataset, and check again.

0 commit comments

Comments
 (0)