dns_analytics_adaptive_groups
Analytics resource
This is a time-bounded analytics resource. Queries against it differ from typical CRUD resources in a few ways:
sinceanduntilare required. Both are RFC3339 timestamps and define the analytics window (e.g.since = '2026-05-28T00:00:00Z',until = '2026-05-29T00:00:00Z'). Queries without them will fail.- Row cap via
limit. Thelimitparameter (default100) bounds the response. Widen the time window or raiselimitto return more rows. - Token scope. Cloudflare's analytics endpoints require an API token with Account -> Analytics -> Read permission, which is broader than typical zone-scoped tokens. A token without it will return empty results.
Creates, updates, deletes, gets or lists a dns_analytics_adaptive_groups resource.
Overview
| Name | dns_analytics_adaptive_groups |
| Type | Resource |
| Id | cloudflare.dns.dns_analytics_adaptive_groups |
Fields
The following fields are returned by SELECT queries:
- list
Response
| Name | Datatype | Description |
|---|---|---|
colo_name | string | IATA code of the Cloudflare colo. |
query_name | string | DNS query name (no trailing dot). |
datetime | string (date-time) | |
ip_version | string | IPv4 / IPv6. |
protocol | string | Transport protocol (UDP / TCP / DoH / DoT). |
queries | integer | Total DNS queries for this dimension tuple. |
queries_not_cached_not_stale | integer | Queries served fresh (not cache |
queries_stale | integer | Queries served from stale cache. |
query_type | string | DNS query type (A |
response_cached | string | Whether the response was served from cache. |
response_code | string | DNS response code (NOERROR |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
list | select | zone_tag, since, until | limit | DNS query analytics for a zone, grouped by query name, type, response code, cache status, and serving colo. Replaces the deprecated REST endpoints /zones/{zone_id}/dns_analytics/* (hard EOL 2026-12-01). |
Parameters
Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
| Name | Datatype | Description |
|---|---|---|
since | string (date-time) | Lower bound (inclusive). RFC3339. |
until | string (date-time) | Upper bound (exclusive). RFC3339. |
zone_tag | string | Cloudflare zone ID (the 32-char hex tag). |
limit | integer | Maximum dimension-tuple rows per call. |
SELECT examples
- list
DNS query analytics for a zone, grouped by query name, type, response code, cache status, and serving colo. Replaces the deprecated REST endpoints /zones/{zone_id}/dns_analytics/* (hard EOL 2026-12-01).
SELECT
colo_name,
query_name,
datetime,
ip_version,
protocol,
queries,
queries_not_cached_not_stale,
queries_stale,
query_type,
response_cached,
response_code
FROM cloudflare.dns.dns_analytics_adaptive_groups
WHERE zone_tag = '{{ zone_tag }}' -- required
AND since = '{{ since }}' -- required
AND until = '{{ until }}' -- required
AND limit = '{{ limit }}'
;