---
title: Logs
---

[Skip to content](#_top)

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

Copy Markdown

Open in **Claude**Open in **ChatGPT**Open in **Cursor**

---

**Copy Markdown****View as Markdown**

# Logs

#### LogsLog Explorer

#### LogsLog ExplorerQuery

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

client.Logs.LogExplorer.Query.Sql(ctx, params) (\*SinglePage\[[LogExplorerQuerySqlResponse](<https://developers.cloudflare.com/api/go/resources/logs#(resource)%20logs.log_explorer.query%20%3E%20(model)%20LogExplorerQuerySqlResponse%20%3E%20(schema)>)], error)

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

#### LogsLog ExplorerDatasets

##### [List account or zone datasets](https://developers.cloudflare.com/api/go/resources/logs/subresources/log_explorer/subresources/datasets/methods/list)

client.Logs.LogExplorer.Datasets.List(ctx, params) (\*SinglePage\[[DatasetSummary](<https://developers.cloudflare.com/api/go/resources/logs#(resource)%20logs.log_explorer.datasets%20%3E%20(model)%20dataset_summary%20%3E%20(schema)>)], error)

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

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

client.Logs.LogExplorer.Datasets.Get(ctx, datasetID, query) (\*[Dataset](<https://developers.cloudflare.com/api/go/resources/logs#(resource)%20logs.log_explorer.datasets%20%3E%20(model)%20dataset%20%3E%20(schema)>), error)

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

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

client.Logs.LogExplorer.Datasets.New(ctx, params) (\*[Dataset](<https://developers.cloudflare.com/api/go/resources/logs#(resource)%20logs.log_explorer.datasets%20%3E%20(model)%20dataset%20%3E%20(schema)>), error)

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

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

client.Logs.LogExplorer.Datasets.Update(ctx, datasetID, params) (\*[Dataset](<https://developers.cloudflare.com/api/go/resources/logs#(resource)%20logs.log_explorer.datasets%20%3E%20(model)%20dataset%20%3E%20(schema)>), error)

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

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

client.Logs.LogExplorer.Datasets.Delete(ctx, datasetID, body) (\*[Dataset](<https://developers.cloudflare.com/api/go/resources/logs#(resource)%20logs.log_explorer.datasets%20%3E%20(model)%20dataset%20%3E%20(schema)>), error)

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

##### ModelsExpand Collapse

<details>

<summary>

type CreateRequest struct{…}

</summary>

Dataset string

Dataset type name to create (e.g. <code>http_requests</code>).

<a href="#(resource)%20logs.log_explorer.datasets%20%3E%20(model)%20create_request%20%3E%20(schema)%20%3E%20(property)%20dataset">Link to this property</a>

<details>

<summary>

Fields \[]CreateRequestFieldOptional

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

</summary>

Enabled bool

Whether the API includes this field in log ingest.

<a href="#(resource)%20logs.log_explorer.datasets%20%3E%20(model)%20create_request%20%3E%20(schema)%20%3E%20(property)%20fields%20%3E%20(items)%20%3E%20(property)%20enabled">Link to this property</a>

Name string

Field name in lowercase.

<a href="#(resource)%20logs.log_explorer.datasets%20%3E%20(model)%20create_request%20%3E%20(schema)%20%3E%20(property)%20fields%20%3E%20(items)%20%3E%20(property)%20name">Link to this property</a>

</details>

<a href="#(resource)%20logs.log_explorer.datasets%20%3E%20(model)%20create_request%20%3E%20(schema)%20%3E%20(property)%20fields">Link to this property</a>

Filter stringOptional

Optional Logpush filter predicate to restrict which events are ingested. See <a href="https://developers.cloudflare.com/logs/reference/filters/">Logpush filters</a> for syntax and examples.

<a href="#(resource)%20logs.log_explorer.datasets%20%3E%20(model)%20create_request%20%3E%20(schema)%20%3E%20(property)%20filter">Link to this property</a>

FilterAttackTraffic boolOptional

Whether to filter attack traffic from the Logpush job. Defaults to <code>true</code> for supported datasets when omitted. Supported datasets are <code>http_requests</code>, <code>firewall_events</code>, and <code>network_analytics_logs</code>.

<a href="#(resource)%20logs.log_explorer.datasets%20%3E%20(model)%20create_request%20%3E%20(schema)%20%3E%20(property)%20filter_attack_traffic">Link to this property</a>

</details>

[Link to this property](<#(resource)%20logs.log_explorer.datasets%20%3E%20(model)%20create_request%20%3E%20(schema)>)

<details>

<summary>

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.

</summary>

CreatedAt Time

RFC3339 timestamp recording when the API created this dataset.

formatdate-time

<a href="#(resource)%20logs.log_explorer.datasets%20%3E%20(model)%20dataset%20%3E%20(schema)%20%3E%20(property)%20created_at">Link to this property</a>

Dataset string

Dataset type name (e.g. <code>http_requests</code>).

<a href="#(resource)%20logs.log_explorer.datasets%20%3E%20(model)%20dataset%20%3E%20(schema)%20%3E%20(property)%20dataset">Link to this property</a>

DatasetID string

Unique dataset ID.

<a href="#(resource)%20logs.log_explorer.datasets%20%3E%20(model)%20dataset%20%3E%20(schema)%20%3E%20(property)%20dataset_id">Link to this property</a>

DeletionProtection bool

Whether deletion is blocked. Set to <code>false</code> before deleting the dataset.

<a href="#(resource)%20logs.log_explorer.datasets%20%3E%20(model)%20dataset%20%3E%20(schema)%20%3E%20(property)%20deletion_protection">Link to this property</a>

Enabled bool

Whether log ingest is currently active for this dataset.

<a href="#(resource)%20logs.log_explorer.datasets%20%3E%20(model)%20dataset%20%3E%20(schema)%20%3E%20(property)%20enabled">Link to this property</a>

<details>

<summary>

Fields \[]DatasetField

The field configuration for this dataset.

</summary>

Enabled bool

Whether the API includes this field in log ingest.

<a href="#(resource)%20logs.log_explorer.datasets%20%3E%20(model)%20dataset%20%3E%20(schema)%20%3E%20(property)%20fields%20%3E%20(items)%20%3E%20(property)%20enabled">Link to this property</a>

Name string

Field name in lowercase.

<a href="#(resource)%20logs.log_explorer.datasets%20%3E%20(model)%20dataset%20%3E%20(schema)%20%3E%20(property)%20fields%20%3E%20(items)%20%3E%20(property)%20name">Link to this property</a>

</details>

<a href="#(resource)%20logs.log_explorer.datasets%20%3E%20(model)%20dataset%20%3E%20(schema)%20%3E%20(property)%20fields">Link to this property</a>

ObjectID string

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

<a href="#(resource)%20logs.log_explorer.datasets%20%3E%20(model)%20dataset%20%3E%20(schema)%20%3E%20(property)%20object_id">Link to this property</a>

<details>

<summary>

ObjectType DatasetObjectType

Whether this dataset belongs to an account or a zone.

</summary>

One of the following:

const DatasetObjectTypeAccount DatasetObjectType = "account"

<a href="#(resource)%20logs.log_explorer.datasets%20%3E%20(model)%20dataset%20%3E%20(schema)%20%3E%20(property)%20object_type%20%3E%20(member)%200">Link to this property</a>

const DatasetObjectTypeZone DatasetObjectType = "zone"

<a href="#(resource)%20logs.log_explorer.datasets%20%3E%20(model)%20dataset%20%3E%20(schema)%20%3E%20(property)%20object_type%20%3E%20(member)%201">Link to this property</a>

</details>

<a href="#(resource)%20logs.log_explorer.datasets%20%3E%20(model)%20dataset%20%3E%20(schema)%20%3E%20(property)%20object_type">Link to this property</a>

UpdatedAt Time

RFC3339 timestamp recording when the API last updated this dataset.

formatdate-time

<a href="#(resource)%20logs.log_explorer.datasets%20%3E%20(model)%20dataset%20%3E%20(schema)%20%3E%20(property)%20updated_at">Link to this property</a>

Filter stringOptional

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

<a href="#(resource)%20logs.log_explorer.datasets%20%3E%20(model)%20dataset%20%3E%20(schema)%20%3E%20(property)%20filter">Link to this property</a>

FilterAttackTraffic boolOptional

Whether the Logpush job filters attack traffic. Omitted for datasets that do not support this option.

<a href="#(resource)%20logs.log_explorer.datasets%20%3E%20(model)%20dataset%20%3E%20(schema)%20%3E%20(property)%20filter_attack_traffic">Link to this property</a>

</details>

[Link to this property](<#(resource)%20logs.log_explorer.datasets%20%3E%20(model)%20dataset%20%3E%20(schema)>)

<details>

<summary>

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.

</summary>

CreatedAt Time

RFC3339 timestamp recording when the API created this dataset.

formatdate-time

<a href="#(resource)%20logs.log_explorer.datasets%20%3E%20(model)%20dataset_summary%20%3E%20(schema)%20%3E%20(property)%20created_at">Link to this property</a>

Dataset string

Dataset type name (e.g. <code>http_requests</code>).

<a href="#(resource)%20logs.log_explorer.datasets%20%3E%20(model)%20dataset_summary%20%3E%20(schema)%20%3E%20(property)%20dataset">Link to this property</a>

DatasetID string

Unique dataset ID.

<a href="#(resource)%20logs.log_explorer.datasets%20%3E%20(model)%20dataset_summary%20%3E%20(schema)%20%3E%20(property)%20dataset_id">Link to this property</a>

DeletionProtection bool

Whether deletion is blocked. Set to <code>false</code> before deleting the dataset.

<a href="#(resource)%20logs.log_explorer.datasets%20%3E%20(model)%20dataset_summary%20%3E%20(schema)%20%3E%20(property)%20deletion_protection">Link to this property</a>

Enabled bool

Whether log ingest is currently active for this dataset.

<a href="#(resource)%20logs.log_explorer.datasets%20%3E%20(model)%20dataset_summary%20%3E%20(schema)%20%3E%20(property)%20enabled">Link to this property</a>

ObjectID string

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

<a href="#(resource)%20logs.log_explorer.datasets%20%3E%20(model)%20dataset_summary%20%3E%20(schema)%20%3E%20(property)%20object_id">Link to this property</a>

<details>

<summary>

ObjectType DatasetSummaryObjectType

Whether this dataset belongs to an account or a zone.

</summary>

One of the following:

const DatasetSummaryObjectTypeAccount DatasetSummaryObjectType = "account"

<a href="#(resource)%20logs.log_explorer.datasets%20%3E%20(model)%20dataset_summary%20%3E%20(schema)%20%3E%20(property)%20object_type%20%3E%20(member)%200">Link to this property</a>

const DatasetSummaryObjectTypeZone DatasetSummaryObjectType = "zone"

<a href="#(resource)%20logs.log_explorer.datasets%20%3E%20(model)%20dataset_summary%20%3E%20(schema)%20%3E%20(property)%20object_type%20%3E%20(member)%201">Link to this property</a>

</details>

<a href="#(resource)%20logs.log_explorer.datasets%20%3E%20(model)%20dataset_summary%20%3E%20(schema)%20%3E%20(property)%20object_type">Link to this property</a>

UpdatedAt Time

RFC3339 timestamp recording when the API last updated this dataset.

formatdate-time

<a href="#(resource)%20logs.log_explorer.datasets%20%3E%20(model)%20dataset_summary%20%3E%20(schema)%20%3E%20(property)%20updated_at">Link to this property</a>

</details>

[Link to this property](<#(resource)%20logs.log_explorer.datasets%20%3E%20(model)%20dataset_summary%20%3E%20(schema)>)

<details>

<summary>

type UpdateRequest struct{…}

</summary>

Enabled bool

Whether to enable or disable log ingest for this dataset.

<a href="#(resource)%20logs.log_explorer.datasets%20%3E%20(model)%20update_request%20%3E%20(schema)%20%3E%20(property)%20enabled">Link to this property</a>

DeletionProtection boolOptional

Set to <code>false</code> to allow deletion of this dataset.

<a href="#(resource)%20logs.log_explorer.datasets%20%3E%20(model)%20update_request%20%3E%20(schema)%20%3E%20(property)%20deletion_protection">Link to this property</a>

<details>

<summary>

Fields \[]UpdateRequestFieldOptional

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

</summary>

Enabled bool

Whether the API includes this field in log ingest.

<a href="#(resource)%20logs.log_explorer.datasets%20%3E%20(model)%20update_request%20%3E%20(schema)%20%3E%20(property)%20fields%20%3E%20(items)%20%3E%20(property)%20enabled">Link to this property</a>

Name string

Field name in lowercase.

<a href="#(resource)%20logs.log_explorer.datasets%20%3E%20(model)%20update_request%20%3E%20(schema)%20%3E%20(property)%20fields%20%3E%20(items)%20%3E%20(property)%20name">Link to this property</a>

</details>

<a href="#(resource)%20logs.log_explorer.datasets%20%3E%20(model)%20update_request%20%3E%20(schema)%20%3E%20(property)%20fields">Link to this property</a>

Filter stringOptional

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

<a href="#(resource)%20logs.log_explorer.datasets%20%3E%20(model)%20update_request%20%3E%20(schema)%20%3E%20(property)%20filter">Link to this property</a>

FilterAttackTraffic boolOptional

Whether to filter attack traffic from the Logpush job. If omitted, the existing setting is left unchanged. Supported datasets are <code>http_requests</code>, <code>firewall_events</code>, and <code>network_analytics_logs</code>.

<a href="#(resource)%20logs.log_explorer.datasets%20%3E%20(model)%20update_request%20%3E%20(schema)%20%3E%20(property)%20filter_attack_traffic">Link to this property</a>

</details>

[Link to this property](<#(resource)%20logs.log_explorer.datasets%20%3E%20(model)%20update_request%20%3E%20(schema)>)

#### LogsLog ExplorerDatasetsAvailable

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

client.Logs.LogExplorer.Datasets.Available.List(ctx, query) (\*SinglePage\[[AvailableDataset](<https://developers.cloudflare.com/api/go/resources/logs#(resource)%20logs.log_explorer.datasets.available%20%3E%20(model)%20available_dataset%20%3E%20(schema)>)], error)

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

##### ModelsExpand Collapse

<details>

<summary>

type AvailableDataset struct{…}

A dataset type that the account or zone can create.

</summary>

Dataset string

Dataset type name (e.g. <code>http_requests</code>).

<a href="#(resource)%20logs.log_explorer.datasets.available%20%3E%20(model)%20available_dataset%20%3E%20(schema)%20%3E%20(property)%20dataset">Link to this property</a>

<details>

<summary>

ObjectType AvailableDatasetObjectType

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

</summary>

One of the following:

const AvailableDatasetObjectTypeAccount AvailableDatasetObjectType = "account"

<a href="#(resource)%20logs.log_explorer.datasets.available%20%3E%20(model)%20available_dataset%20%3E%20(schema)%20%3E%20(property)%20object_type%20%3E%20(member)%200">Link to this property</a>

const AvailableDatasetObjectTypeZone AvailableDatasetObjectType = "zone"

<a href="#(resource)%20logs.log_explorer.datasets.available%20%3E%20(model)%20available_dataset%20%3E%20(schema)%20%3E%20(property)%20object_type%20%3E%20(member)%201">Link to this property</a>

</details>

<a href="#(resource)%20logs.log_explorer.datasets.available%20%3E%20(model)%20available_dataset%20%3E%20(schema)%20%3E%20(property)%20object_type">Link to this property</a>

<details>

<summary>

Schema AvailableDatasetSchema

JSON Schema that describes the fields this dataset exposes.

</summary>

Properties map\[string, unknown]Optional

<a href="#(resource)%20logs.log_explorer.datasets.available%20%3E%20(model)%20available_dataset%20%3E%20(schema)%20%3E%20(property)%20schema%20%3E%20(property)%20properties">Link to this property</a>

Required \[]stringOptional

<a href="#(resource)%20logs.log_explorer.datasets.available%20%3E%20(model)%20available_dataset%20%3E%20(schema)%20%3E%20(property)%20schema%20%3E%20(property)%20required">Link to this property</a>

Type AvailableDatasetSchemaTypeOptional

<a href="#(resource)%20logs.log_explorer.datasets.available%20%3E%20(model)%20available_dataset%20%3E%20(schema)%20%3E%20(property)%20schema%20%3E%20(property)%20type">Link to this property</a>

</details>

<a href="#(resource)%20logs.log_explorer.datasets.available%20%3E%20(model)%20available_dataset%20%3E%20(schema)%20%3E%20(property)%20schema">Link to this property</a>

TimestampField string

The primary timestamp field name for this dataset.

<a href="#(resource)%20logs.log_explorer.datasets.available%20%3E%20(model)%20available_dataset%20%3E%20(schema)%20%3E%20(property)%20timestamp_field">Link to this property</a>

</details>

[Link to this property](<#(resource)%20logs.log_explorer.datasets.available%20%3E%20(model)%20available_dataset%20%3E%20(schema)>)

<details>

<summary>

type AvailableList struct{…}

</summary>

<details>

<summary>

Errors \[]<a href="https://developers.cloudflare.com/api/go/resources/$shared#(resource)%20%24shared%20%3E%20(model)%20response_info%20%3E%20(schema)">ResponseInfo</a>

</summary>

Code int64

minimum1000

<a href="#(resource)%20%24shared%20%3E%20(model)%20response_info%20%3E%20(schema)%20%3E%20(property)%20code">Link to this property</a>

Message string

<a href="#(resource)%20%24shared%20%3E%20(model)%20response_info%20%3E%20(schema)%20%3E%20(property)%20message">Link to this property</a>

DocumentationURL stringOptional

<a href="#(resource)%20%24shared%20%3E%20(model)%20response_info%20%3E%20(schema)%20%3E%20(property)%20documentation_url">Link to this property</a>

<details>

<summary>

Source ResponseInfoSourceOptional

</summary>

Pointer stringOptional

<a href="#(resource)%20%24shared%20%3E%20(model)%20response_info%20%3E%20(schema)%20%3E%20(property)%20source%20%3E%20(property)%20pointer">Link to this property</a>

</details>

<a href="#(resource)%20%24shared%20%3E%20(model)%20response_info%20%3E%20(schema)%20%3E%20(property)%20source">Link to this property</a>

</details>

<a href="#(resource)%20logs.log_explorer.datasets.available%20%3E%20(model)%20available_list%20%3E%20(schema)%20%3E%20(property)%20errors">Link to this property</a>

Messages \[]string

<a href="#(resource)%20logs.log_explorer.datasets.available%20%3E%20(model)%20available_list%20%3E%20(schema)%20%3E%20(property)%20messages">Link to this property</a>

Success bool

<a href="#(resource)%20logs.log_explorer.datasets.available%20%3E%20(model)%20available_list%20%3E%20(schema)%20%3E%20(property)%20success">Link to this property</a>

<details>

<summary>

Result \[]<a href="https://developers.cloudflare.com/api/go/resources/logs#(resource)%20logs.log_explorer.datasets.available%20%3E%20(model)%20available_dataset%20%3E%20(schema)">AvailableDataset</a>Optional

</summary>

Dataset string

Dataset type name (e.g. <code>http_requests</code>).

<a href="#(resource)%20logs.log_explorer.datasets.available%20%3E%20(model)%20available_dataset%20%3E%20(schema)%20%3E%20(property)%20dataset">Link to this property</a>

<details>

<summary>

ObjectType AvailableDatasetObjectType

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

</summary>

One of the following:

const AvailableDatasetObjectTypeAccount AvailableDatasetObjectType = "account"

<a href="#(resource)%20logs.log_explorer.datasets.available%20%3E%20(model)%20available_dataset%20%3E%20(schema)%20%3E%20(property)%20object_type%20%3E%20(member)%200">Link to this property</a>

const AvailableDatasetObjectTypeZone AvailableDatasetObjectType = "zone"

<a href="#(resource)%20logs.log_explorer.datasets.available%20%3E%20(model)%20available_dataset%20%3E%20(schema)%20%3E%20(property)%20object_type%20%3E%20(member)%201">Link to this property</a>

</details>

<a href="#(resource)%20logs.log_explorer.datasets.available%20%3E%20(model)%20available_dataset%20%3E%20(schema)%20%3E%20(property)%20object_type">Link to this property</a>

<details>

<summary>

Schema AvailableDatasetSchema

JSON Schema that describes the fields this dataset exposes.

</summary>

Properties map\[string, unknown]Optional

<a href="#(resource)%20logs.log_explorer.datasets.available%20%3E%20(model)%20available_dataset%20%3E%20(schema)%20%3E%20(property)%20schema%20%3E%20(property)%20properties">Link to this property</a>

Required \[]stringOptional

<a href="#(resource)%20logs.log_explorer.datasets.available%20%3E%20(model)%20available_dataset%20%3E%20(schema)%20%3E%20(property)%20schema%20%3E%20(property)%20required">Link to this property</a>

Type AvailableDatasetSchemaTypeOptional

<a href="#(resource)%20logs.log_explorer.datasets.available%20%3E%20(model)%20available_dataset%20%3E%20(schema)%20%3E%20(property)%20schema%20%3E%20(property)%20type">Link to this property</a>

</details>

<a href="#(resource)%20logs.log_explorer.datasets.available%20%3E%20(model)%20available_dataset%20%3E%20(schema)%20%3E%20(property)%20schema">Link to this property</a>

TimestampField string

The primary timestamp field name for this dataset.

<a href="#(resource)%20logs.log_explorer.datasets.available%20%3E%20(model)%20available_dataset%20%3E%20(schema)%20%3E%20(property)%20timestamp_field">Link to this property</a>

</details>

<a href="#(resource)%20logs.log_explorer.datasets.available%20%3E%20(model)%20available_list%20%3E%20(schema)%20%3E%20(property)%20result">Link to this property</a>

</details>

[Link to this property](<#(resource)%20logs.log_explorer.datasets.available%20%3E%20(model)%20available_list%20%3E%20(schema)>)

#### LogsControl

#### LogsControlRetention

##### [Get log retention flag](https://developers.cloudflare.com/api/go/resources/logs/subresources/control/subresources/retention/methods/get)

client.Logs.Control.Retention.Get(ctx, query) (\*[ControlRetentionGetResponse](<https://developers.cloudflare.com/api/go/resources/logs#(resource)%20logs.control.retention%20%3E%20(model)%20ControlRetentionGetResponse%20%3E%20(schema)>), error)

GET/zones/{zone\_id}/logs/control/retention/flag

##### [Update log retention flag](https://developers.cloudflare.com/api/go/resources/logs/subresources/control/subresources/retention/methods/create)

client.Logs.Control.Retention.New(ctx, params) (\*[ControlRetentionNewResponse](<https://developers.cloudflare.com/api/go/resources/logs#(resource)%20logs.control.retention%20%3E%20(model)%20ControlRetentionNewResponse%20%3E%20(schema)>), error)

POST/zones/{zone\_id}/logs/control/retention/flag

#### LogsControlCmb

#### LogsControlCmbConfig

##### [Get CMB config](https://developers.cloudflare.com/api/go/resources/logs/subresources/control/subresources/cmb/subresources/config/methods/get)

client.Logs.Control.Cmb.Config.Get(ctx, query) (\*[CmbConfig](<https://developers.cloudflare.com/api/go/resources/logs#(resource)%20logs.control.cmb.config%20%3E%20(model)%20cmb_config%20%3E%20(schema)>), error)

GET/accounts/{account\_id}/logs/control/cmb/config

##### [Update CMB config](https://developers.cloudflare.com/api/go/resources/logs/subresources/control/subresources/cmb/subresources/config/methods/create)

client.Logs.Control.Cmb.Config.New(ctx, params) (\*[CmbConfig](<https://developers.cloudflare.com/api/go/resources/logs#(resource)%20logs.control.cmb.config%20%3E%20(model)%20cmb_config%20%3E%20(schema)>), error)

POST/accounts/{account\_id}/logs/control/cmb/config

##### [Delete CMB config](https://developers.cloudflare.com/api/go/resources/logs/subresources/control/subresources/cmb/subresources/config/methods/delete)

client.Logs.Control.Cmb.Config.Delete(ctx, body) (\*[ControlCmbConfigDeleteResponse](<https://developers.cloudflare.com/api/go/resources/logs#(resource)%20logs.control.cmb.config%20%3E%20(model)%20ControlCmbConfigDeleteResponse%20%3E%20(schema)>), error)

DELETE/accounts/{account\_id}/logs/control/cmb/config

##### ModelsExpand Collapse

<details>

<summary>

type CmbConfig struct{…}

</summary>

AllowOutOfRegionAccess boolOptional

Allow out of region access

<a href="#(resource)%20logs.control.cmb.config%20%3E%20(model)%20cmb_config%20%3E%20(schema)%20%3E%20(property)%20allow_out_of_region_access">Link to this property</a>

Regions stringOptional

Name of the region.

maxLength256

<a href="#(resource)%20logs.control.cmb.config%20%3E%20(model)%20cmb_config%20%3E%20(schema)%20%3E%20(property)%20regions">Link to this property</a>

</details>

[Link to this property](<#(resource)%20logs.control.cmb.config%20%3E%20(model)%20cmb_config%20%3E%20(schema)>)

#### LogsRayID

##### [Get logs RayIDs](https://developers.cloudflare.com/api/go/resources/logs/subresources/rayid/methods/get)

client.Logs.RayID.Get(ctx, RayID, params) (\*unknown, error)

GET/zones/{zone\_id}/logs/rayids/{ray\_id}

#### LogsReceived

##### [Get logs received](https://developers.cloudflare.com/api/go/resources/logs/subresources/received/methods/get)

client.Logs.Received.Get(ctx, params) (\*unknown, error)

GET/zones/{zone\_id}/logs/received

#### LogsReceivedFields

##### [List fields](https://developers.cloudflare.com/api/go/resources/logs/subresources/received/subresources/fields/methods/get)

client.Logs.Received.Fields.Get(ctx, query) (\*[ReceivedFieldGetResponse](<https://developers.cloudflare.com/api/go/resources/logs#(resource)%20logs.received.fields%20%3E%20(model)%20ReceivedFieldGetResponse%20%3E%20(schema)>), error)

GET/zones/{zone\_id}/logs/received/fields