---
title: Analytics
---

[Skip to content](#_top)

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

[DNS](https://developers.cloudflare.com/api/python/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/python/resources/dns/subresources/analytics/subresources/reports/methods/get)

Deprecated

dns.analytics.reports.get(ReportGetParams\*\*kwargs) -> [Report](<https://developers.cloudflare.com/api/python/resources/dns#(resource)%20dns.analytics.reports%20%3E%20(model)%20report%20%3E%20(schema)>)

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

##### ModelsExpand Collapse

<details>

<summary>

class Report: …

</summary>

<details>

<summary>

data: List\[Data]

Array with one row per combination of dimension values.

</summary>

dimensions: List\[str]

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: List\[float]

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>

data\_lag: float

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: object

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: object

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: Query

</summary>

dimensions: List\[str]

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: int

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: List\[str]

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: datetime

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: datetime

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: Optional\[str]

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: Optional\[List\[str]]

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: float

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: object

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/python/resources/dns/subresources/analytics/subresources/reports/subresources/bytimes/methods/get)

Deprecated

dns.analytics.reports.bytimes.get(BytimeGetParams\*\*kwargs) -> [ByTime](<https://developers.cloudflare.com/api/python/resources/dns#(resource)%20dns.analytics.reports.bytimes%20%3E%20(model)%20by_time%20%3E%20(schema)>)

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

##### ModelsExpand Collapse

<details>

<summary>

class ByTime: …

</summary>

<details>

<summary>

data: List\[Data]

Array with one row per combination of dimension values.

</summary>

dimensions: List\[str]

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: List\[List\[float]]

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>

data\_lag: float

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: object

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: object

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: Query

</summary>

dimensions: List\[str]

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: int

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: List\[str]

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: datetime

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>

time\_delta: Literal\["all", "auto", "year", 7 more]

Unit of time to group data by.

</summary>

One of the following:

"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>

"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>

"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>

"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>

"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>

"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>

"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>

"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>

"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>

"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: datetime

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: Optional\[str]

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: Optional\[List\[str]]

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: float

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>

time\_intervals: List\[List\[datetime]]

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: object

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)>)