Skip to content
Start here

Logs

LogsLog Explorer

LogsLog ExplorerQuery

Run a log query
client.logs.logExplorer.query.sql(QuerySqlParams { body, account_id, zone_id } params, RequestOptionsoptions?): SinglePage<QuerySqlResponse>
POST/{accounts_or_zones}/{account_or_zone_id}/logs/explorer/query/sql
ModelsExpand Collapse
QuerySqlResponse = Record<string, unknown>

LogsLog ExplorerDatasets

List account or zone datasets
client.logs.logExplorer.datasets.list(DatasetListParams { account_id, zone_id, include_zones } params?, RequestOptionsoptions?): SinglePage<DatasetSummary { created_at, dataset, dataset_id, 5 more } >
GET/{accounts_or_zones}/{account_or_zone_id}/logs/explorer/datasets
Get an account or zone dataset
client.logs.logExplorer.datasets.get(stringdatasetID, DatasetGetParams { account_id, zone_id } params?, RequestOptionsoptions?): Dataset { created_at, dataset, dataset_id, 7 more }
GET/{accounts_or_zones}/{account_or_zone_id}/logs/explorer/datasets/{dataset_id}
Create an account or zone dataset
client.logs.logExplorer.datasets.create(DatasetCreateParams { dataset, account_id, zone_id, 2 more } params, RequestOptionsoptions?): Dataset { created_at, dataset, dataset_id, 7 more }
POST/{accounts_or_zones}/{account_or_zone_id}/logs/explorer/datasets
Update an account or zone dataset
client.logs.logExplorer.datasets.update(stringdatasetID, DatasetUpdateParams { enabled, account_id, zone_id, 3 more } params, RequestOptionsoptions?): Dataset { created_at, dataset, dataset_id, 7 more }
PUT/{accounts_or_zones}/{account_or_zone_id}/logs/explorer/datasets/{dataset_id}
Delete an account or zone dataset
client.logs.logExplorer.datasets.delete(stringdatasetID, DatasetDeleteParams { account_id, zone_id } params?, RequestOptionsoptions?): Dataset { created_at, dataset, dataset_id, 7 more }
DELETE/{accounts_or_zones}/{account_or_zone_id}/logs/explorer/datasets/{dataset_id}
ModelsExpand Collapse
CreateRequest { dataset, fields, filter }
dataset: string

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

fields?: Array<Field>

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?: string

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.

Dataset { 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<Field>

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" | "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?: string

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

DatasetSummary { 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" | "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 { enabled, deletion_protection, fields, filter }
enabled: boolean

Whether to enable or disable log ingest for this dataset.

deletion_protection?: boolean

Set to false to allow deletion of this dataset.

fields?: Array<Field>

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?: string | null

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.

LogsLog ExplorerDatasetsAvailable

List available account or zone datasets
client.logs.logExplorer.datasets.available.list(AvailableListParams { account_id, zone_id } params?, RequestOptionsoptions?): SinglePage<AvailableDataset { dataset, object_type, schema, timestamp_field } >
GET/{accounts_or_zones}/{account_or_zone_id}/logs/explorer/datasets/available
ModelsExpand Collapse
AvailableDataset { 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" | "zone"

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

One of the following:
"account"
"zone"
schema: Schema { properties, required, type }

JSON Schema that describes the fields this dataset exposes.

properties?: Record<string, unknown>
required?: Array<string>
type?: "object"
timestamp_field: string

The primary timestamp field name for this dataset.

AvailableList { errors, messages, success, result }
errors: Array<ResponseInfo { code, message, documentation_url, source } >
code: number
minimum1000
message: string
documentation_url?: string
source?: Source { pointer }
pointer?: string
messages: Array<string>
success: boolean
result?: Array<AvailableDataset { dataset, object_type, schema, timestamp_field } > | null
dataset: string

Dataset type name (e.g. http_requests).

object_type: "account" | "zone"

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

One of the following:
"account"
"zone"
schema: Schema { properties, required, type }

JSON Schema that describes the fields this dataset exposes.

properties?: Record<string, unknown>
required?: Array<string>
type?: "object"
timestamp_field: string

The primary timestamp field name for this dataset.

LogsControl

LogsControlRetention

Get log retention flag
client.logs.control.retention.get(RetentionGetParams { zone_id } params, RequestOptionsoptions?): RetentionGetResponse { flag } | null
GET/zones/{zone_id}/logs/control/retention/flag
Update log retention flag
client.logs.control.retention.create(RetentionCreateParams { zone_id, flag } params, RequestOptionsoptions?): RetentionCreateResponse { flag } | null
POST/zones/{zone_id}/logs/control/retention/flag
ModelsExpand Collapse
RetentionGetResponse { flag }
flag?: boolean

The log retention flag for Logpull API.

RetentionCreateResponse { flag }
flag?: boolean

The log retention flag for Logpull API.

LogsControlCmb

LogsControlCmbConfig

Get CMB config
client.logs.control.cmb.config.get(ConfigGetParams { account_id } params, RequestOptionsoptions?): CmbConfig { allow_out_of_region_access, regions } | null
GET/accounts/{account_id}/logs/control/cmb/config
Update CMB config
client.logs.control.cmb.config.create(ConfigCreateParams { account_id, allow_out_of_region_access, regions } params, RequestOptionsoptions?): CmbConfig { allow_out_of_region_access, regions } | null
POST/accounts/{account_id}/logs/control/cmb/config
Delete CMB config
client.logs.control.cmb.config.delete(ConfigDeleteParams { account_id } params, RequestOptionsoptions?): ConfigDeleteResponse | null
DELETE/accounts/{account_id}/logs/control/cmb/config
ModelsExpand Collapse
CmbConfig { allow_out_of_region_access, regions }
allow_out_of_region_access?: boolean

Allow out of region access

regions?: string

Name of the region.

maxLength256
ConfigDeleteResponse = unknown

LogsRayID

Get logs RayIDs
client.logs.RayID.get(stringRayID, RayIDGetParams { zone_id, fields, timestamps } params, RequestOptionsoptions?): RayIDGetResponse
GET/zones/{zone_id}/logs/rayids/{ray_id}
ModelsExpand Collapse
RayIDGetResponse = string | unknown
One of the following:
string
unknown

LogsReceived

Get logs received
client.logs.received.get(ReceivedGetParams { zone_id, end, count, 4 more } params, RequestOptionsoptions?): ReceivedGetResponse
GET/zones/{zone_id}/logs/received
ModelsExpand Collapse
ReceivedGetResponse = string | unknown
One of the following:
string
unknown

LogsReceivedFields

List fields
client.logs.received.fields.get(FieldGetParams { zone_id } params, RequestOptionsoptions?): FieldGetResponse { key }
GET/zones/{zone_id}/logs/received/fields
ModelsExpand Collapse
FieldGetResponse { key }
key?: string