---
title: Log Explorer
---

[Skip to content](#%5Ftop) 

[API Reference](https://developers.cloudflare.com/api)

[Logs](https://developers.cloudflare.com/api/resources/logs)

Copy Markdown

Open in **Claude**

Open in **ChatGPT**

Open in **Cursor**

---

**Copy Markdown**

**View as Markdown**

# Log Explorer

#### Log ExplorerQuery

##### [Run a log query](https://developers.cloudflare.com/api/resources/logs/subresources/log%5Fexplorer/subresources/query/methods/sql)

POST/{accounts\_or\_zones}/{account\_or\_zone\_id}/logs/explorer/query/sql

##### ModelsExpand Collapse 

QuerySqlResponse \= map\[unknown\]

#### Log ExplorerDatasets

##### [List account or zone datasets](https://developers.cloudflare.com/api/resources/logs/subresources/log%5Fexplorer/subresources/datasets/methods/list)

GET/{accounts\_or\_zones}/{account\_or\_zone\_id}/logs/explorer/datasets

##### [Get an account or zone dataset](https://developers.cloudflare.com/api/resources/logs/subresources/log%5Fexplorer/subresources/datasets/methods/get)

GET/{accounts\_or\_zones}/{account\_or\_zone\_id}/logs/explorer/datasets/{dataset\_id}

##### [Create an account or zone dataset](https://developers.cloudflare.com/api/resources/logs/subresources/log%5Fexplorer/subresources/datasets/methods/create)

POST/{accounts\_or\_zones}/{account\_or\_zone\_id}/logs/explorer/datasets

##### [Update an account or zone dataset](https://developers.cloudflare.com/api/resources/logs/subresources/log%5Fexplorer/subresources/datasets/methods/update)

PUT/{accounts\_or\_zones}/{account\_or\_zone\_id}/logs/explorer/datasets/{dataset\_id}

##### [Delete an account or zone dataset](https://developers.cloudflare.com/api/resources/logs/subresources/log%5Fexplorer/subresources/datasets/methods/delete)

DELETE/{accounts\_or\_zones}/{account\_or\_zone\_id}/logs/explorer/datasets/{dataset\_id}

##### ModelsExpand Collapse 

CreateRequest object { dataset, fields, filter } 

dataset: string

Dataset type name to create (e.g. `http_requests`).

fields: optional array of object { enabled, name } 

Controls which fields the API ingests. Defaults to all available fields when absent.

enabled: boolean

Whether the API includes this field in log ingest.

name: string

Field name in lowercase.

filter: optional string

Optional Logpush filter predicate to restrict which events are ingested. If provided, replaces the dataset’s default filter entirely. See [Logpush filters](https://developers.cloudflare.com/logs/reference/filters/)for syntax and examples.

Dataset object { created\_at, dataset, dataset\_id, 7 more } 

A Log Explorer dataset summary. List endpoints return this type and omit field configuration; use the single-dataset endpoint to retrieve it.

created\_at: string

RFC3339 timestamp recording when the API created this dataset.

formatdate-time

dataset: string

Dataset type name (e.g. `http_requests`).

dataset\_id: string

Unique dataset ID.

deletion\_protection: boolean

Whether deletion is blocked. Set to `false` before deleting the dataset.

enabled: boolean

Whether log ingest is currently active for this dataset.

fields: array of object { enabled, name } 

The field configuration for this dataset.

enabled: boolean

Whether the API includes this field in log ingest.

name: string

Field name in lowercase.

object\_id: string

Public ID of the account or zone that owns this dataset.

object\_type: "account" or "zone"

Whether this dataset belongs to an account or a zone.

One of the following:

"account"

"zone"

updated\_at: string

RFC3339 timestamp recording when the API last updated this dataset.

formatdate-time

filter: optional string

The Logpush filter predicate applied to this dataset. Omitted when no filter is set.

DatasetSummary object { created\_at, dataset, dataset\_id, 5 more } 

A Log Explorer dataset summary. List endpoints return this type and omit field configuration; use the single-dataset endpoint to retrieve it.

created\_at: string

RFC3339 timestamp recording when the API created this dataset.

formatdate-time

dataset: string

Dataset type name (e.g. `http_requests`).

dataset\_id: string

Unique dataset ID.

deletion\_protection: boolean

Whether deletion is blocked. Set to `false` before deleting the dataset.

enabled: boolean

Whether log ingest is currently active for this dataset.

object\_id: string

Public ID of the account or zone that owns this dataset.

object\_type: "account" or "zone"

Whether this dataset belongs to an account or a zone.

One of the following:

"account"

"zone"

updated\_at: string

RFC3339 timestamp recording when the API last updated this dataset.

formatdate-time

UpdateRequest object { enabled, deletion\_protection, fields, filter } 

enabled: boolean

Whether to enable or disable log ingest for this dataset.

deletion\_protection: optional boolean

Set to `false` to allow deletion of this dataset.

fields: optional array of object { enabled, name } 

Controls which fields the API ingests after the update. Defaults to all available fields when absent.

enabled: boolean

Whether the API includes this field in log ingest.

name: string

Field name in lowercase.

filter: optional string

Optional Logpush filter predicate to restrict which events are ingested. If omitted, the existing filter is left unchanged. Set to an empty string (`""`) to clear the filter. Otherwise, replaces the dataset’s filter entirely. See [Logpush filters](https://developers.cloudflare.com/logs/reference/filters/)for syntax and examples.

#### Log ExplorerDatasetsAvailable

##### [List available account or zone datasets](https://developers.cloudflare.com/api/resources/logs/subresources/log%5Fexplorer/subresources/datasets/subresources/available/methods/list)

GET/{accounts\_or\_zones}/{account\_or\_zone\_id}/logs/explorer/datasets/available

##### ModelsExpand Collapse 

AvailableDataset object { dataset, object\_type, schema, timestamp\_field } 

A dataset type that the account or zone can create.

dataset: string

Dataset type name (e.g. `http_requests`).

object\_type: "account" or "zone"

Whether this dataset type is account-scoped or zone-scoped.

One of the following:

"account"

"zone"

schema: object { properties, required, type } 

JSON Schema that describes the fields this dataset exposes.

properties: optional map\[unknown\]

required: optional array of string

type: optional "object"

timestamp\_field: string

The primary timestamp field name for this dataset.

AvailableList object { errors, messages, success, result } 

errors: array of [ResponseInfo](https://developers.cloudflare.com/api/resources/$shared#%28resource%29%20%24shared%20%3E%20%28model%29%20response%5Finfo%20%3E%20%28schema%29) { code, message, documentation\_url, source } 

code: number

minimum1000

message: string

documentation\_url: optional string

source: optional object { pointer } 

pointer: optional string

messages: array of string

success: boolean

result: optional array of [AvailableDataset](https://developers.cloudflare.com/api/resources/logs#%28resource%29%20logs.log%5Fexplorer.datasets.available%20%3E%20%28model%29%20available%5Fdataset%20%3E%20%28schema%29) { dataset, object\_type, schema, timestamp\_field } 

dataset: string

Dataset type name (e.g. `http_requests`).

object\_type: "account" or "zone"

Whether this dataset type is account-scoped or zone-scoped.

One of the following:

"account"

"zone"

schema: object { properties, required, type } 

JSON Schema that describes the fields this dataset exposes.

properties: optional map\[unknown\]

required: optional array of string

type: optional "object"

timestamp\_field: string

The primary timestamp field name for this dataset.