Skip to content
Start here

List account or zone datasets

GET/{accounts_or_zones}/{account_or_zone_id}/logs/explorer/datasets

Returns all Log Explorer datasets configured for the account or zone.

Pass include_zones=true to also include zone-level datasets that belong to this account or zone. List responses omit the fields property; use the single-dataset endpoint to retrieve field configuration.

Security

API Token

The preferred authorization scheme for interacting with the Cloudflare API. Create a token.

Example:Authorization: Bearer Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY
Accepted Permissions (at least one required)
Logs WriteLogs Read
Path ParametersExpand Collapse
account_id: optional string

The Account ID to use for this endpoint. Mutually exclusive with the Zone ID.

zone_id: optional string

The Zone ID to use for this endpoint. Mutually exclusive with the Account ID.

Query ParametersExpand Collapse
include_zones: optional boolean

Set to true to include zone-scoped datasets belonging to this account.

ReturnsExpand Collapse
errors: array of ResponseInfo { 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 DatasetSummary { created_at, dataset, dataset_id, 4 more }
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.

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

List account or zone datasets

curl https://api.cloudflare.com/client/v4/$ACCOUNTS_OR_ZONES/$ACCOUNT_OR_ZONE_ID/logs/explorer/datasets \
    -H "Authorization: Bearer $CLOUDFLARE_API_TOKEN"
{
  "errors": [
    {
      "code": 1000,
      "message": "message",
      "documentation_url": "documentation_url",
      "source": {
        "pointer": "pointer"
      }
    }
  ],
  "messages": [
    "string"
  ],
  "success": true,
  "result": [
    {
      "created_at": "2019-12-27T18:11:19.117Z",
      "dataset": "dataset",
      "dataset_id": "dataset_id",
      "enabled": true,
      "object_id": "object_id",
      "object_type": "account",
      "updated_at": "2019-12-27T18:11:19.117Z"
    }
  ]
}
Returns Examples
{
  "errors": [
    {
      "code": 1000,
      "message": "message",
      "documentation_url": "documentation_url",
      "source": {
        "pointer": "pointer"
      }
    }
  ],
  "messages": [
    "string"
  ],
  "success": true,
  "result": [
    {
      "created_at": "2019-12-27T18:11:19.117Z",
      "dataset": "dataset",
      "dataset_id": "dataset_id",
      "enabled": true,
      "object_id": "object_id",
      "object_type": "account",
      "updated_at": "2019-12-27T18:11:19.117Z"
    }
  ]
}