Get top locations by AS112 DNS queries for an IP version
Changed onRetrieves the top locations of DNS queries to AS112 for an IP version.
Request
- Base URLhttps://api.cloudflare.com/client/v4
- AuthAPI key in header X-Auth-Email and API key in header X-Auth-Key and HTTP bearer
- TypeScriptA function with typed inputs. Its response is checked against the schema.
Path parameters
IP version.
Query parameters
Limits the number of objects returned in the response.
Array of names used to label the series in the response.
[ "main_series" ]
Filters results by relative date range ending at the current time, with each value producing a separate series. Use <n>d for days (up to 364d) or <n>w for weeks (up to 52w). Append control to request the equivalent previous period for comparison: the comparison window is shifted back by the current window's length rounded up to a whole number of weeks, so it keeps the same weekday alignment and does not overlap the current window (e.g. 7dcontrol covers days -14 to -7, 10dcontrol covers days -24 to -14). For example, pass 7d and 7dcontrol to compare this week with the previous week. All series must resolve to the same duration as the main series; relative ranges (including control) satisfy this automatically. Use this parameter or set specific start and end dates (dateStart and dateEnd parameters).
[ "7d" ]
Start of the date range. Alternative to dateRange; provide together with dateEnd. When requesting comparison series, every series must resolve to the same duration as the main series. Each dateStart/dateEnd is floored to the nearest 15 minutes before evaluation, so windows whose durations match only before alignment may be rejected.
End of the date range (inclusive). Alternative to dateRange; provide together with dateStart. When requesting comparison series, every series must resolve to the same duration as the main series. Each dateStart/dateEnd is floored to the nearest 15 minutes before evaluation, so windows whose durations match only before alignment may be rejected.
Filters results by location. Specify a comma-separated list of alpha-2 codes. Prefix with - to exclude locations from results. For example, -US,PT excludes results from the US, but includes results from PT.
Filters results by continent. Specify a comma-separated list of alpha-2 codes. Prefix with - to exclude continents from results. For example, -EU,NA excludes results from EU, but includes results from NA.
Format in which results will be returned.
Response
Successful response.
Example response
{
"result": {
"meta": {
"confidenceInfo": {
"annotations": [
{
"description": "Cable cut in Tonga",
"tags": [
"BOT_CLASS"
]
}
]
},
"dateRange": [
{
"endTime": "2022-09-17T10:22:57.555Z",
"startTime": "2022-09-16T10:22:57.555Z"
}
],
"units": [
{
"name": "*",
"value": "requests"
}
]
},
"top_0": [
{
"clientCountryAlpha2": "US",
"clientCountryName": "United States",
"value": "10"
}
]
},
"success": true
}Changes
- info
removed the
EVENTenum value from the/////response property for the response status
- info
- info
added the optional property
/////to the response with the status
- info