Skip to content
Start here

Log Explorer

Log ExplorerQuery

Run a log query
client.Logs.LogExplorer.Query.Sql(ctx, params) (*SinglePage[LogExplorerQuerySqlResponse], error)
POST/{accounts_or_zones}/{account_or_zone_id}/logs/explorer/query/sql

Log ExplorerDatasets

List account or zone datasets
client.Logs.LogExplorer.Datasets.List(ctx, params) (*SinglePage[DatasetSummary], error)
GET/{accounts_or_zones}/{account_or_zone_id}/logs/explorer/datasets
Get an account or zone dataset
client.Logs.LogExplorer.Datasets.Get(ctx, datasetID, query) (*Dataset, error)
GET/{accounts_or_zones}/{account_or_zone_id}/logs/explorer/datasets/{dataset_id}
Create an account or zone dataset
client.Logs.LogExplorer.Datasets.New(ctx, params) (*Dataset, error)
POST/{accounts_or_zones}/{account_or_zone_id}/logs/explorer/datasets
Update an account or zone dataset
client.Logs.LogExplorer.Datasets.Update(ctx, datasetID, params) (*Dataset, error)
PUT/{accounts_or_zones}/{account_or_zone_id}/logs/explorer/datasets/{dataset_id}
ModelsExpand Collapse
type CreateRequest struct{…}
Dataset string

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

Fields []CreateRequestFieldOptional

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 string

Field name in lowercase.

type Dataset struct{…}

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

CreatedAt Time

RFC3339 timestamp recording when the API created this dataset.

formatdate-time
Dataset string

Dataset type name (e.g. http_requests).

DatasetID string

Unique dataset ID.

Enabled bool

Whether log ingest is currently active for this dataset.

ObjectID string

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

ObjectType DatasetObjectType

Whether this dataset belongs to an account or a zone.

One of the following:
const DatasetObjectTypeAccount DatasetObjectType = "account"
const DatasetObjectTypeZone DatasetObjectType = "zone"
UpdatedAt Time

RFC3339 timestamp recording when the API last updated this dataset.

formatdate-time
Fields []DatasetFieldOptional

The field configuration for this dataset.

Enabled bool

Whether the API includes this field in log ingest.

Name string

Field name in lowercase.

type DatasetSummary struct{…}

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

CreatedAt Time

RFC3339 timestamp recording when the API created this dataset.

formatdate-time
Dataset string

Dataset type name (e.g. http_requests).

DatasetID string

Unique dataset ID.

Enabled bool

Whether log ingest is currently active for this dataset.

ObjectID string

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

ObjectType DatasetSummaryObjectType

Whether this dataset belongs to an account or a zone.

One of the following:
const DatasetSummaryObjectTypeAccount DatasetSummaryObjectType = "account"
const DatasetSummaryObjectTypeZone DatasetSummaryObjectType = "zone"
UpdatedAt Time

RFC3339 timestamp recording when the API last updated this dataset.

formatdate-time
type UpdateRequest struct{…}
Enabled bool

Whether to enable or disable log ingest for this dataset.

Fields []UpdateRequestFieldOptional

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 string

Field name in lowercase.

Log ExplorerDatasetsAvailable

List available account or zone datasets
client.Logs.LogExplorer.Datasets.Available.List(ctx, query) (*SinglePage[AvailableDataset], error)
GET/{accounts_or_zones}/{account_or_zone_id}/logs/explorer/datasets/available
ModelsExpand Collapse
type AvailableDataset struct{…}

A dataset type that the account or zone can create.

Dataset string

Dataset type name (e.g. http_requests).

ObjectType AvailableDatasetObjectType

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

One of the following:
const AvailableDatasetObjectTypeAccount AvailableDatasetObjectType = "account"
const AvailableDatasetObjectTypeZone AvailableDatasetObjectType = "zone"
Schema AvailableDatasetSchema

JSON Schema that describes the fields this dataset exposes.

Properties map[string, unknown]Optional
Required []stringOptional
Type AvailableDatasetSchemaTypeOptional
TimestampField string

The primary timestamp field name for this dataset.

type AvailableList struct{…}
Errors []ResponseInfo
Code int64
minimum1000
Message string
DocumentationURL stringOptional
Source ResponseInfoSourceOptional
Pointer stringOptional
Messages []string
Success bool
Result []AvailableDatasetOptional
Dataset string

Dataset type name (e.g. http_requests).

ObjectType AvailableDatasetObjectType

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

One of the following:
const AvailableDatasetObjectTypeAccount AvailableDatasetObjectType = "account"
const AvailableDatasetObjectTypeZone AvailableDatasetObjectType = "zone"
Schema AvailableDatasetSchema

JSON Schema that describes the fields this dataset exposes.

Properties map[string, unknown]Optional
Required []stringOptional
Type AvailableDatasetSchemaTypeOptional
TimestampField string

The primary timestamp field name for this dataset.