---
title: Analytics
---

[Skip to content](#_top)

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

[DNS](https://developers.cloudflare.com/api/go/resources/dns)

Copy Markdown

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

---

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

# Analytics

#### AnalyticsReports

##### [Table](https://developers.cloudflare.com/api/go/resources/dns/subresources/analytics/subresources/reports/methods/get)

Deprecated

client.DNS.Analytics.Reports.Get(ctx, params) (\*[Report](<https://developers.cloudflare.com/api/go/resources/dns#(resource)%20dns.analytics.reports%20%3E%20(model)%20report%20%3E%20(schema)>), error)

GET/zones/{zone\_id}/dns\_analytics/report

##### ModelsExpand Collapse

<details>

<summary>

type Report struct{…}

</summary>

<details>

<summary>

Data \[]ReportData

Array with one row per combination of dimension values.

</summary>

Dimensions \[]string

Array of dimension values, representing the combination of dimension values corresponding to this row.

<a href="#(resource)%20dns.analytics.reports%20%3E%20(model)%20report%20%3E%20(schema)%20%3E%20(property)%20data%20%3E%20(items)%20%3E%20(property)%20dimensions">Link to this property</a>

Metrics \[]float64

Array with one item per requested metric. Each item is a single value.

<a href="#(resource)%20dns.analytics.reports%20%3E%20(model)%20report%20%3E%20(schema)%20%3E%20(property)%20data%20%3E%20(items)%20%3E%20(property)%20metrics">Link to this property</a>

</details>

<a href="#(resource)%20dns.analytics.reports%20%3E%20(model)%20report%20%3E%20(schema)%20%3E%20(property)%20data">Link to this property</a>

DataLag float64

Number of seconds between current time and last processed event, in another words how many seconds of data could be missing.

minimum0

<a href="#(resource)%20dns.analytics.reports%20%3E%20(model)%20report%20%3E%20(schema)%20%3E%20(property)%20data_lag">Link to this property</a>

Max unknown

Maximum results for each metric (object mapping metric names to values). Currently always an empty object.

<a href="#(resource)%20dns.analytics.reports%20%3E%20(model)%20report%20%3E%20(schema)%20%3E%20(property)%20max">Link to this property</a>

Min unknown

Minimum results for each metric (object mapping metric names to values). Currently always an empty object.

<a href="#(resource)%20dns.analytics.reports%20%3E%20(model)%20report%20%3E%20(schema)%20%3E%20(property)%20min">Link to this property</a>

<details>

<summary>

Query ReportQuery

</summary>

Dimensions \[]string

Array of dimension names.

<a href="#(resource)%20dns.analytics.reports%20%3E%20(model)%20report%20%3E%20(schema)%20%3E%20(property)%20query%20%3E%20(property)%20dimensions">Link to this property</a>

Limit int64

Limit number of returned metrics.

<a href="#(resource)%20dns.analytics.reports%20%3E%20(model)%20report%20%3E%20(schema)%20%3E%20(property)%20query%20%3E%20(property)%20limit">Link to this property</a>

Metrics \[]string

Array of metric names.

<a href="#(resource)%20dns.analytics.reports%20%3E%20(model)%20report%20%3E%20(schema)%20%3E%20(property)%20query%20%3E%20(property)%20metrics">Link to this property</a>

Since Time

Start date and time of requesting data period in ISO 8601 format.

formatdate-time

<a href="#(resource)%20dns.analytics.reports%20%3E%20(model)%20report%20%3E%20(schema)%20%3E%20(property)%20query%20%3E%20(property)%20since">Link to this property</a>

Until Time

End date and time of requesting data period in ISO 8601 format.

formatdate-time

<a href="#(resource)%20dns.analytics.reports%20%3E%20(model)%20report%20%3E%20(schema)%20%3E%20(property)%20query%20%3E%20(property)%20until">Link to this property</a>

Filters stringOptional

Segmentation filter in ‘attribute operator value’ format.

<a href="#(resource)%20dns.analytics.reports%20%3E%20(model)%20report%20%3E%20(schema)%20%3E%20(property)%20query%20%3E%20(property)%20filters">Link to this property</a>

Sort \[]stringOptional

Array of dimensions to sort by, where each dimension may be prefixed by - (descending) or + (ascending).

<a href="#(resource)%20dns.analytics.reports%20%3E%20(model)%20report%20%3E%20(schema)%20%3E%20(property)%20query%20%3E%20(property)%20sort">Link to this property</a>

</details>

<a href="#(resource)%20dns.analytics.reports%20%3E%20(model)%20report%20%3E%20(schema)%20%3E%20(property)%20query">Link to this property</a>

Rows float64

Total number of rows in the result.

minimum0

<a href="#(resource)%20dns.analytics.reports%20%3E%20(model)%20report%20%3E%20(schema)%20%3E%20(property)%20rows">Link to this property</a>

Totals unknown

Total results for metrics across all data (object mapping metric names to values).

<a href="#(resource)%20dns.analytics.reports%20%3E%20(model)%20report%20%3E%20(schema)%20%3E%20(property)%20totals">Link to this property</a>

</details>

[Link to this property](<#(resource)%20dns.analytics.reports%20%3E%20(model)%20report%20%3E%20(schema)>)

#### AnalyticsReportsBytimes

##### [By Time](https://developers.cloudflare.com/api/go/resources/dns/subresources/analytics/subresources/reports/subresources/bytimes/methods/get)

Deprecated

client.DNS.Analytics.Reports.Bytimes.Get(ctx, params) (\*[ByTime](<https://developers.cloudflare.com/api/go/resources/dns#(resource)%20dns.analytics.reports.bytimes%20%3E%20(model)%20by_time%20%3E%20(schema)>), error)

GET/zones/{zone\_id}/dns\_analytics/report/bytime

##### ModelsExpand Collapse

<details>

<summary>

type ByTime struct{…}

</summary>

<details>

<summary>

Data \[]ByTimeData

Array with one row per combination of dimension values.

</summary>

Dimensions \[]string

Array of dimension values, representing the combination of dimension values corresponding to this row.

<a href="#(resource)%20dns.analytics.reports.bytimes%20%3E%20(model)%20by_time%20%3E%20(schema)%20%3E%20(property)%20data%20%3E%20(items)%20%3E%20(property)%20dimensions">Link to this property</a>

Metrics \[]\[]float64

Array with one item per requested metric. Each item is an array of values, broken down by time interval.

<a href="#(resource)%20dns.analytics.reports.bytimes%20%3E%20(model)%20by_time%20%3E%20(schema)%20%3E%20(property)%20data%20%3E%20(items)%20%3E%20(property)%20metrics">Link to this property</a>

</details>

<a href="#(resource)%20dns.analytics.reports.bytimes%20%3E%20(model)%20by_time%20%3E%20(schema)%20%3E%20(property)%20data">Link to this property</a>

DataLag float64

Number of seconds between current time and last processed event, in another words how many seconds of data could be missing.

minimum0

<a href="#(resource)%20dns.analytics.reports.bytimes%20%3E%20(model)%20by_time%20%3E%20(schema)%20%3E%20(property)%20data_lag">Link to this property</a>

Max unknown

Maximum results for each metric (object mapping metric names to values). Currently always an empty object.

<a href="#(resource)%20dns.analytics.reports.bytimes%20%3E%20(model)%20by_time%20%3E%20(schema)%20%3E%20(property)%20max">Link to this property</a>

Min unknown

Minimum results for each metric (object mapping metric names to values). Currently always an empty object.

<a href="#(resource)%20dns.analytics.reports.bytimes%20%3E%20(model)%20by_time%20%3E%20(schema)%20%3E%20(property)%20min">Link to this property</a>

<details>

<summary>

Query ByTimeQuery

</summary>

Dimensions \[]string

Array of dimension names.

<a href="#(resource)%20dns.analytics.reports.bytimes%20%3E%20(model)%20by_time%20%3E%20(schema)%20%3E%20(property)%20query%20%3E%20(property)%20dimensions">Link to this property</a>

Limit int64

Limit number of returned metrics.

<a href="#(resource)%20dns.analytics.reports.bytimes%20%3E%20(model)%20by_time%20%3E%20(schema)%20%3E%20(property)%20query%20%3E%20(property)%20limit">Link to this property</a>

Metrics \[]string

Array of metric names.

<a href="#(resource)%20dns.analytics.reports.bytimes%20%3E%20(model)%20by_time%20%3E%20(schema)%20%3E%20(property)%20query%20%3E%20(property)%20metrics">Link to this property</a>

Since Time

Start date and time of requesting data period in ISO 8601 format.

formatdate-time

<a href="#(resource)%20dns.analytics.reports.bytimes%20%3E%20(model)%20by_time%20%3E%20(schema)%20%3E%20(property)%20query%20%3E%20(property)%20since">Link to this property</a>

<details>

<summary>

TimeDelta ByTimeQueryTimeDelta

Unit of time to group data by.

</summary>

One of the following:

const ByTimeQueryTimeDeltaAll ByTimeQueryTimeDelta = "all"

<a href="#(resource)%20dns.analytics.reports.bytimes%20%3E%20(model)%20by_time%20%3E%20(schema)%20%3E%20(property)%20query%20%3E%20(property)%20time_delta%20%3E%20(member)%200">Link to this property</a>

const ByTimeQueryTimeDeltaAuto ByTimeQueryTimeDelta = "auto"

<a href="#(resource)%20dns.analytics.reports.bytimes%20%3E%20(model)%20by_time%20%3E%20(schema)%20%3E%20(property)%20query%20%3E%20(property)%20time_delta%20%3E%20(member)%201">Link to this property</a>

const ByTimeQueryTimeDeltaYear ByTimeQueryTimeDelta = "year"

<a href="#(resource)%20dns.analytics.reports.bytimes%20%3E%20(model)%20by_time%20%3E%20(schema)%20%3E%20(property)%20query%20%3E%20(property)%20time_delta%20%3E%20(member)%202">Link to this property</a>

const ByTimeQueryTimeDeltaQuarter ByTimeQueryTimeDelta = "quarter"

<a href="#(resource)%20dns.analytics.reports.bytimes%20%3E%20(model)%20by_time%20%3E%20(schema)%20%3E%20(property)%20query%20%3E%20(property)%20time_delta%20%3E%20(member)%203">Link to this property</a>

const ByTimeQueryTimeDeltaMonth ByTimeQueryTimeDelta = "month"

<a href="#(resource)%20dns.analytics.reports.bytimes%20%3E%20(model)%20by_time%20%3E%20(schema)%20%3E%20(property)%20query%20%3E%20(property)%20time_delta%20%3E%20(member)%204">Link to this property</a>

const ByTimeQueryTimeDeltaWeek ByTimeQueryTimeDelta = "week"

<a href="#(resource)%20dns.analytics.reports.bytimes%20%3E%20(model)%20by_time%20%3E%20(schema)%20%3E%20(property)%20query%20%3E%20(property)%20time_delta%20%3E%20(member)%205">Link to this property</a>

const ByTimeQueryTimeDeltaDay ByTimeQueryTimeDelta = "day"

<a href="#(resource)%20dns.analytics.reports.bytimes%20%3E%20(model)%20by_time%20%3E%20(schema)%20%3E%20(property)%20query%20%3E%20(property)%20time_delta%20%3E%20(member)%206">Link to this property</a>

const ByTimeQueryTimeDeltaHour ByTimeQueryTimeDelta = "hour"

<a href="#(resource)%20dns.analytics.reports.bytimes%20%3E%20(model)%20by_time%20%3E%20(schema)%20%3E%20(property)%20query%20%3E%20(property)%20time_delta%20%3E%20(member)%207">Link to this property</a>

const ByTimeQueryTimeDeltaDekaminute ByTimeQueryTimeDelta = "dekaminute"

<a href="#(resource)%20dns.analytics.reports.bytimes%20%3E%20(model)%20by_time%20%3E%20(schema)%20%3E%20(property)%20query%20%3E%20(property)%20time_delta%20%3E%20(member)%208">Link to this property</a>

const ByTimeQueryTimeDeltaMinute ByTimeQueryTimeDelta = "minute"

<a href="#(resource)%20dns.analytics.reports.bytimes%20%3E%20(model)%20by_time%20%3E%20(schema)%20%3E%20(property)%20query%20%3E%20(property)%20time_delta%20%3E%20(member)%209">Link to this property</a>

</details>

<a href="#(resource)%20dns.analytics.reports.bytimes%20%3E%20(model)%20by_time%20%3E%20(schema)%20%3E%20(property)%20query%20%3E%20(property)%20time_delta">Link to this property</a>

Until Time

End date and time of requesting data period in ISO 8601 format.

formatdate-time

<a href="#(resource)%20dns.analytics.reports.bytimes%20%3E%20(model)%20by_time%20%3E%20(schema)%20%3E%20(property)%20query%20%3E%20(property)%20until">Link to this property</a>

Filters stringOptional

Segmentation filter in ‘attribute operator value’ format.

<a href="#(resource)%20dns.analytics.reports.bytimes%20%3E%20(model)%20by_time%20%3E%20(schema)%20%3E%20(property)%20query%20%3E%20(property)%20filters">Link to this property</a>

Sort \[]stringOptional

Array of dimensions to sort by, where each dimension may be prefixed by - (descending) or + (ascending).

<a href="#(resource)%20dns.analytics.reports.bytimes%20%3E%20(model)%20by_time%20%3E%20(schema)%20%3E%20(property)%20query%20%3E%20(property)%20sort">Link to this property</a>

</details>

<a href="#(resource)%20dns.analytics.reports.bytimes%20%3E%20(model)%20by_time%20%3E%20(schema)%20%3E%20(property)%20query">Link to this property</a>

Rows float64

Total number of rows in the result.

minimum0

<a href="#(resource)%20dns.analytics.reports.bytimes%20%3E%20(model)%20by_time%20%3E%20(schema)%20%3E%20(property)%20rows">Link to this property</a>

TimeIntervals \[]\[]Time

Array of time intervals in the response data. Each interval is represented as an array containing two values: the start time, and the end time.

<a href="#(resource)%20dns.analytics.reports.bytimes%20%3E%20(model)%20by_time%20%3E%20(schema)%20%3E%20(property)%20time_intervals">Link to this property</a>

Totals unknown

Total results for metrics across all data (object mapping metric names to values).

<a href="#(resource)%20dns.analytics.reports.bytimes%20%3E%20(model)%20by_time%20%3E%20(schema)%20%3E%20(property)%20totals">Link to this property</a>

</details>

[Link to this property](<#(resource)%20dns.analytics.reports.bytimes%20%3E%20(model)%20by_time%20%3E%20(schema)>)