Skip to main content

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:

  • since and until are 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. The limit parameter (default 100) bounds the response. Widen the time window or raise limit to 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

Namedns_analytics_adaptive_groups
TypeResource
Idcloudflare.dns.dns_analytics_adaptive_groups

Fields

The following fields are returned by SELECT queries:

Response

NameDatatypeDescription
colo_namestringIATA code of the Cloudflare colo.
query_namestringDNS query name (no trailing dot).
datetimestring (date-time)
ip_versionstringIPv4 / IPv6.
protocolstringTransport protocol (UDP / TCP / DoH / DoT).
queriesintegerTotal DNS queries for this dimension tuple.
queries_not_cached_not_staleintegerQueries served fresh (not cache
queries_staleintegerQueries served from stale cache.
query_typestringDNS query type (A
response_cachedstringWhether the response was served from cache.
response_codestringDNS response code (NOERROR

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
listselectzone_tag, since, untillimitDNS 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.

NameDatatypeDescription
sincestring (date-time)Lower bound (inclusive). RFC3339.
untilstring (date-time)Upper bound (exclusive). RFC3339.
zone_tagstringCloudflare zone ID (the 32-char hex tag).
limitintegerMaximum dimension-tuple rows per call.

SELECT examples

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 }}'
;