v1

latestOpenAPI 3.1.12026-07-17111158225.7 KB
billing
zones

Analytics about DNS queries

Queries and returns DNS Analytics data available for the provided query parameters. This API is currently in Public Beta. During the Public Beta period, changes may occur at any time.

get/{account}/dns_analytics

Path parameters

accountinteger required

The account id

Query parameters

start_datestring date

A date value formatted as ISO 8601.

Example:2010-01-01

Only include results after the given date. Format is ISO8601 (YYYY-MM-DD). It can be a max of 31 days away from the end_date. If omitted, it defaults to 31 days ago.

end_datestring date

A date value formatted as ISO 8601.

Example:2010-01-01

Only include results before the given date. Format is ISO8601 (YYYY-MM-DD). It can be a max of 31 days away from the start_date. If omitted, it defaults to 1 day ago.

groupings'date' | 'volume' | 'zone_name'

How to group the results of the account's DNS analytics. No groupings will be applied by default unless specified. Multiple groupings can be provided, separated by a comma. Applying groupings to the query will add columns to the response payload.

sortstring
Example:volume:desc,zone_name:asc

Sort results. Default sorting policy is by ascending date, then ascending zone_name.

pageinteger

The page of the results requested. Defaults to 1.

per_pageinteger

The amount of rows to return in each page. The default is usually 100. There are endpoints that override this default to accommodate specific use cases.

Response

Successfully retrieved DNS analytics data.

Example response

{
  "data": {
    "rows": [
      "2010-01-01"
    ],
    "headers": [
      "zone_name,volume"
    ]
  },
  "query": {
    "sort": "date:asc,zone_name:asc",
    "groupings": "date,zone_name",
    "page": 1,
    "per_page": 1000
  },
  "pagination": {
    "current_page": 1,
    "per_page": 30,
    "total_entries": 2,
    "total_pages": 1
  }
}