Retrieves a list of aggregate metrics grouped by time interval. See [Analytics API properties](https://developers.cloudflare.com/dns/reference/analytics-api-properties/) for detailed information about the available query parameters.
/accounts/{account_identifier}/dns_firewall/{identifier}/dns_analytics/report/bytime
get
DNS Firewall Analytics
dns-firewall-analytics-by-time
null {
"enum": [
"#analytics:read"
]
} [
{
"in": "path",
"name": "identifier",
"required": true,
"schema": {
"description": "Identifier",
"example": "023e105f4ecef8ad9ca31a8372d0c353",
"maxLength": 32,
"readOnly": true,
"type": "string"
}
},
{
"in": "path",
"name": "account_identifier",
"required": true,
"schema": {
"description": "Identifier",
"example": "023e105f4ecef8ad9ca31a8372d0c353",
"maxLength": 32,
"readOnly": true,
"type": "string"
}
},
{
"in": "query",
"name": "metrics",
"schema": {
"description": "A comma-separated list of metrics to query.",
"example": "queryCount,uncachedCount",
"type": "string"
}
},
{
"in": "query",
"name": "dimensions",
"schema": {
"description": "A comma-separated list of dimensions to group results by.",
"example": "queryType",
"type": "string"
}
},
{
"in": "query",
"name": "since",
"schema": {
"description": "Start date and time of requesting data period in ISO 8601 format.",
"example": "2023-11-11T12:00:00Z",
"format": "date-time",
"type": "string"
}
},
{
"in": "query",
"name": "until",
"schema": {
"description": "End date and time of requesting data period in ISO 8601 format.",
"example": "2023-11-11T13:00:00Z",
"format": "date-time",
"type": "string"
}
},
{
"in": "query",
"name": "limit",
"schema": {
"default": 100000,
"description": "Limit number of returned metrics.",
"example": 100,
"type": "integer"
}
},
{
"in": "query",
"name": "sort",
"schema": {
"description": "A comma-separated list of dimensions to sort by, where each dimension may be prefixed by - (descending) or + (ascending).",
"example": "+responseCode,-queryName",
"type": "string"
}
},
{
"in": "query",
"name": "filters",
"schema": {
"description": "Segmentation filter in 'attribute operator value' format.",
"example": "responseCode==NOERROR,queryType==A",
"type": "string"
}
},
{
"in": "query",
"name": "time_delta",
"schema": {
"description": "Unit of time to group data by.",
"enum": [
"all",
"auto",
"year",
"quarter",
"month",
"week",
"day",
"hour",
"dekaminute",
"minute"
],
"example": "hour",
"type": "string"
}
}
] null {
"200": {
"content": {
"application/json": {
"schema": {
"allOf": [
{
"allOf": [
{
"properties": {
"errors": {
"example": [],
"items": {
"properties": {
"code": {
"minimum": 1000,
"type": "integer"
},
"message": {
"type": "string"
}
},
"required": [
"code",
"message"
],
"type": "object",
"uniqueItems": true
},
"type": "array"
},
"messages": {
"example": [],
"items": {
"properties": {
"code": {
"minimum": 1000,
"type": "integer"
},
"message": {
"type": "string"
}
},
"required": [
"code",
"message"
],
"type": "object",
"uniqueItems": true
},
"type": "array"
},
"result": {
"anyOf": [
{
"type": "object"
},
{
"items": {},
"type": "array"
},
{
"type": "string"
}
]
},
"success": {
"description": "Whether the API call was successful",
"enum": [
true
],
"example": true,
"type": "boolean"
}
},
"required": [
"success",
"errors",
"messages",
"result"
],
"type": "object"
},
{
"properties": {
"result": {
"anyOf": [
{
"type": "object"
},
{
"type": "string"
}
]
}
}
}
],
"type": "object"
},
{
"properties": {
"result": {
"allOf": [
{
"properties": {
"data": {
"description": "Array with one row per combination of dimension values.",
"items": {
"properties": {
"dimensions": {
"description": "Array of dimension values, representing the combination of dimension values corresponding to this row.",
"items": {
"description": "Dimension value.",
"example": "NODATA",
"type": "string"
},
"type": "array"
}
},
"required": [
"dimensions"
],
"type": "object"
},
"type": "array"
},
"data_lag": {
"description": "Number of seconds between current time and last processed event, in another words how many seconds of data could be missing.",
"example": 60,
"minimum": 0,
"type": "number"
},
"max": {
"description": "Maximum results for each metric (object mapping metric names to values). Currently always an empty object.",
"type": "object"
},
"min": {
"description": "Minimum results for each metric (object mapping metric names to values). Currently always an empty object.",
"type": "object"
},
"query": {
"properties": {
"dimensions": {
"description": "Array of dimension names.",
"example": [
"responseCode",
"queryName"
],
"items": {
"description": "Dimension name.",
"example": "responseCode",
"type": "string"
},
"type": "array"
},
"filters": {
"description": "Segmentation filter in 'attribute operator value' format.",
"example": "responseCode==NOERROR,queryType==A",
"type": "string"
},
"limit": {
"default": 100000,
"description": "Limit number of returned metrics.",
"example": 100,
"type": "integer"
},
"metrics": {
"description": "Array of metric names.",
"example": [
"queryCount",
"responseTimeAvg"
],
"items": {
"description": "Metric name.",
"example": "queries",
"type": "string"
},
"type": "array"
},
"since": {
"description": "Start date and time of requesting data period in ISO 8601 format.",
"example": "2023-11-11T12:00:00Z",
"format": "date-time",
"type": "string"
},
"sort": {
"description": "Array of dimensions to sort by, where each dimension may be prefixed by - (descending) or + (ascending).",
"example": [
"+responseCode",
"-queryName"
],
"items": {
"description": "Dimension name (may be prefixed by - (descending) or + (ascending).",
"example": "+responseCode",
"type": "string"
},
"type": "array"
},
"until": {
"description": "End date and time of requesting data period in ISO 8601 format.",
"example": "2023-11-11T13:00:00Z",
"format": "date-time",
"type": "string"
}
},
"required": [
"dimensions",
"metrics",
"since",
"until",
"limit"
],
"type": "object"
},
"rows": {
"description": "Total number of rows in the result.",
"example": 100,
"minimum": 0,
"type": "number"
},
"totals": {
"description": "Total results for metrics across all data (object mapping metric names to values).",
"type": "object"
}
},
"required": [
"rows",
"totals",
"min",
"max",
"data_lag",
"query",
"data"
],
"type": "object"
},
{
"properties": {
"data": {
"items": {
"properties": {
"metrics": {
"description": "Array with one item per requested metric. Each item is an array of values, broken down by time interval.",
"items": {
"description": "Nominal metric values, broken down by time interval.",
"items": {},
"properties": {
"items": {
"description": "Nominal metric value.",
"type": "number"
}
},
"type": "array"
},
"type": "array"
}
},
"required": [
"metrics"
]
}
},
"query": {
"properties": {
"time_delta": {
"description": "Unit of time to group data by.",
"enum": [
"all",
"auto",
"year",
"quarter",
"month",
"week",
"day",
"hour",
"dekaminute",
"minute"
],
"example": "hour",
"type": "string"
}
},
"required": [
"time_delta"
],
"type": "object"
},
"time_intervals": {
"description": "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.\n",
"items": {
"description": "Array with exactly two items, representing the start and end time (respectively) of this time interval.",
"items": {
"description": "Time value.",
"example": "2023-11-11T12:00:00Z",
"format": "date-time",
"type": "string"
},
"type": "array"
},
"type": "array"
}
},
"required": [
"time_intervals",
"query",
"data"
]
}
]
}
},
"type": "object"
}
]
}
}
},
"description": "By Time response"
},
"4XX": {
"content": {
"application/json": {
"schema": {
"allOf": [
{
"allOf": [
{
"allOf": [
{
"properties": {
"errors": {
"example": [],
"items": {
"properties": {
"code": {
"minimum": 1000,
"type": "integer"
},
"message": {
"type": "string"
}
},
"required": [
"code",
"message"
],
"type": "object",
"uniqueItems": true
},
"type": "array"
},
"messages": {
"example": [],
"items": {
"properties": {
"code": {
"minimum": 1000,
"type": "integer"
},
"message": {
"type": "string"
}
},
"required": [
"code",
"message"
],
"type": "object",
"uniqueItems": true
},
"type": "array"
},
"result": {
"anyOf": [
{
"type": "object"
},
{
"items": {},
"type": "array"
},
{
"type": "string"
}
]
},
"success": {
"description": "Whether the API call was successful",
"enum": [
true
],
"example": true,
"type": "boolean"
}
},
"required": [
"success",
"errors",
"messages",
"result"
],
"type": "object"
},
{
"properties": {
"result": {
"anyOf": [
{
"type": "object"
},
{
"type": "string"
}
]
}
}
}
],
"type": "object"
},
{
"properties": {
"result": {
"allOf": [
{
"properties": {
"data": {
"description": "Array with one row per combination of dimension values.",
"items": {
"properties": {
"dimensions": {
"description": "Array of dimension values, representing the combination of dimension values corresponding to this row.",
"items": {
"description": "Dimension value.",
"example": "NODATA",
"type": "string"
},
"type": "array"
}
},
"required": [
"dimensions"
],
"type": "object"
},
"type": "array"
},
"data_lag": {
"description": "Number of seconds between current time and last processed event, in another words how many seconds of data could be missing.",
"example": 60,
"minimum": 0,
"type": "number"
},
"max": {
"description": "Maximum results for each metric (object mapping metric names to values). Currently always an empty object.",
"type": "object"
},
"min": {
"description": "Minimum results for each metric (object mapping metric names to values). Currently always an empty object.",
"type": "object"
},
"query": {
"properties": {
"dimensions": {
"description": "Array of dimension names.",
"example": [
"responseCode",
"queryName"
],
"items": {
"description": "Dimension name.",
"example": "responseCode",
"type": "string"
},
"type": "array"
},
"filters": {
"description": "Segmentation filter in 'attribute operator value' format.",
"example": "responseCode==NOERROR,queryType==A",
"type": "string"
},
"limit": {
"default": 100000,
"description": "Limit number of returned metrics.",
"example": 100,
"type": "integer"
},
"metrics": {
"description": "Array of metric names.",
"example": [
"queryCount",
"responseTimeAvg"
],
"items": {
"description": "Metric name.",
"example": "queries",
"type": "string"
},
"type": "array"
},
"since": {
"description": "Start date and time of requesting data period in ISO 8601 format.",
"example": "2023-11-11T12:00:00Z",
"format": "date-time",
"type": "string"
},
"sort": {
"description": "Array of dimensions to sort by, where each dimension may be prefixed by - (descending) or + (ascending).",
"example": [
"+responseCode",
"-queryName"
],
"items": {
"description": "Dimension name (may be prefixed by - (descending) or + (ascending).",
"example": "+responseCode",
"type": "string"
},
"type": "array"
},
"until": {
"description": "End date and time of requesting data period in ISO 8601 format.",
"example": "2023-11-11T13:00:00Z",
"format": "date-time",
"type": "string"
}
},
"required": [
"dimensions",
"metrics",
"since",
"until",
"limit"
],
"type": "object"
},
"rows": {
"description": "Total number of rows in the result.",
"example": 100,
"minimum": 0,
"type": "number"
},
"totals": {
"description": "Total results for metrics across all data (object mapping metric names to values).",
"type": "object"
}
},
"required": [
"rows",
"totals",
"min",
"max",
"data_lag",
"query",
"data"
],
"type": "object"
},
{
"properties": {
"data": {
"items": {
"properties": {
"metrics": {
"description": "Array with one item per requested metric. Each item is an array of values, broken down by time interval.",
"items": {
"description": "Nominal metric values, broken down by time interval.",
"items": {},
"properties": {
"items": {
"description": "Nominal metric value.",
"type": "number"
}
},
"type": "array"
},
"type": "array"
}
},
"required": [
"metrics"
]
}
},
"query": {
"properties": {
"time_delta": {
"description": "Unit of time to group data by.",
"enum": [
"all",
"auto",
"year",
"quarter",
"month",
"week",
"day",
"hour",
"dekaminute",
"minute"
],
"example": "hour",
"type": "string"
}
},
"required": [
"time_delta"
],
"type": "object"
},
"time_intervals": {
"description": "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.\n",
"items": {
"description": "Array with exactly two items, representing the start and end time (respectively) of this time interval.",
"items": {
"description": "Time value.",
"example": "2023-11-11T12:00:00Z",
"format": "date-time",
"type": "string"
},
"type": "array"
},
"type": "array"
}
},
"required": [
"time_intervals",
"query",
"data"
]
}
]
}
},
"type": "object"
}
]
},
{
"properties": {
"errors": {
"allOf": [
{
"example": [],
"items": {
"properties": {
"code": {
"minimum": 1000,
"type": "integer"
},
"message": {
"type": "string"
}
},
"required": [
"code",
"message"
],
"type": "object",
"uniqueItems": true
},
"type": "array"
}
],
"example": [
{
"code": 7003,
"message": "No route for the URI"
}
],
"minLength": 1
},
"messages": {
"allOf": [
{
"example": [],
"items": {
"properties": {
"code": {
"minimum": 1000,
"type": "integer"
},
"message": {
"type": "string"
}
},
"required": [
"code",
"message"
],
"type": "object",
"uniqueItems": true
},
"type": "array"
}
],
"example": []
},
"result": {
"enum": [
null
],
"nullable": true,
"type": "object"
},
"success": {
"description": "Whether the API call was successful",
"enum": [
false
],
"example": false,
"type": "boolean"
}
},
"required": [
"success",
"errors",
"messages",
"result"
],
"type": "object"
}
]
}
}
},
"description": "By Time response failure"
}
} [
{
"api_email": [],
"api_key": []
}
]