Skip to content
Start here

Log Explorer

Log ExplorerQuery

Run a log query
logs.log_explorer.query.sql(QuerySqlParams**kwargs) -> SyncSinglePage[QuerySqlResponse]
POST/{accounts_or_zones}/{account_or_zone_id}/logs/explorer/query/sql
ModelsExpand Collapse
Dict[str, object]

Log ExplorerDatasets

List account or zone datasets
logs.log_explorer.datasets.list(DatasetListParams**kwargs) -> SyncSinglePage[DatasetSummary]
GET/{accounts_or_zones}/{account_or_zone_id}/logs/explorer/datasets
Get an account or zone dataset
logs.log_explorer.datasets.get(strdataset_id, DatasetGetParams**kwargs) -> Dataset
GET/{accounts_or_zones}/{account_or_zone_id}/logs/explorer/datasets/{dataset_id}
Create an account or zone dataset
logs.log_explorer.datasets.create(DatasetCreateParams**kwargs) -> Dataset
POST/{accounts_or_zones}/{account_or_zone_id}/logs/explorer/datasets
Update an account or zone dataset
logs.log_explorer.datasets.update(strdataset_id, DatasetUpdateParams**kwargs) -> Dataset
PUT/{accounts_or_zones}/{account_or_zone_id}/logs/explorer/datasets/{dataset_id}
Delete an account or zone dataset
logs.log_explorer.datasets.delete(strdataset_id, DatasetDeleteParams**kwargs) -> Dataset
DELETE/{accounts_or_zones}/{account_or_zone_id}/logs/explorer/datasets/{dataset_id}
ModelsExpand Collapse
class CreateRequest:
dataset: str

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

fields: Optional[List[Field]]

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

enabled: bool

Whether the API includes this field in log ingest.

name: str

Field name in lowercase.

filter: Optional[str]

Optional Logpush filter predicate to restrict which events are ingested. If provided, replaces the dataset’s default filter entirely. See Logpush filters for syntax and examples.

class Dataset:

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

created_at: datetime

RFC3339 timestamp recording when the API created this dataset.

formatdate-time
dataset: str

Dataset type name (e.g. http_requests).

dataset_id: str

Unique dataset ID.

deletion_protection: bool

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

enabled: bool

Whether log ingest is currently active for this dataset.

fields: List[Field]

The field configuration for this dataset.

enabled: bool

Whether the API includes this field in log ingest.

name: str

Field name in lowercase.

object_id: str

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

object_type: Literal["account", "zone"]

Whether this dataset belongs to an account or a zone.

One of the following:
"account"
"zone"
updated_at: datetime

RFC3339 timestamp recording when the API last updated this dataset.

formatdate-time
filter: Optional[str]

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

class DatasetSummary:

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

created_at: datetime

RFC3339 timestamp recording when the API created this dataset.

formatdate-time
dataset: str

Dataset type name (e.g. http_requests).

dataset_id: str

Unique dataset ID.

deletion_protection: bool

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

enabled: bool

Whether log ingest is currently active for this dataset.

object_id: str

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

object_type: Literal["account", "zone"]

Whether this dataset belongs to an account or a zone.

One of the following:
"account"
"zone"
updated_at: datetime

RFC3339 timestamp recording when the API last updated this dataset.

formatdate-time
class UpdateRequest:
enabled: bool

Whether to enable or disable log ingest for this dataset.

deletion_protection: Optional[bool]

Set to false to allow deletion of this dataset.

fields: Optional[List[Field]]

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

enabled: bool

Whether the API includes this field in log ingest.

name: str

Field name in lowercase.

filter: Optional[str]

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 for syntax and examples.

Log ExplorerDatasetsAvailable

List available account or zone datasets
logs.log_explorer.datasets.available.list(AvailableListParams**kwargs) -> SyncSinglePage[AvailableDataset]
GET/{accounts_or_zones}/{account_or_zone_id}/logs/explorer/datasets/available
ModelsExpand Collapse
class AvailableDataset:

A dataset type that the account or zone can create.

dataset: str

Dataset type name (e.g. http_requests).

object_type: Literal["account", "zone"]

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

One of the following:
"account"
"zone"
schema: Schema

JSON Schema that describes the fields this dataset exposes.

properties: Optional[Dict[str, object]]
required: Optional[List[str]]
type: Optional[Literal["object"]]
timestamp_field: str

The primary timestamp field name for this dataset.

class AvailableList:
errors: List[ResponseInfo]
code: int
minimum1000
message: str
documentation_url: Optional[str]
source: Optional[Source]
pointer: Optional[str]
messages: List[str]
success: bool
result: Optional[List[AvailableDataset]]
dataset: str

Dataset type name (e.g. http_requests).

object_type: Literal["account", "zone"]

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

One of the following:
"account"
"zone"
schema: Schema

JSON Schema that describes the fields this dataset exposes.

properties: Optional[Dict[str, object]]
required: Optional[List[str]]
type: Optional[Literal["object"]]
timestamp_field: str

The primary timestamp field name for this dataset.