Skip to content
Start here

Get top locations by total traffic anomalies

client.radar.trafficAnomalies.locations.get(LocationGetParams { dateEnd, dateRange, dateStart, 3 more } query?, RequestOptionsoptions?): LocationGetResponse { trafficAnomalies }
GET/radar/traffic_anomalies/locations

Retrieves the sum of Internet traffic anomalies, grouped by location. These anomalies are signals that might indicate an outage, automatically detected by Radar and manually verified by our team.

Security
API Token

The preferred authorization scheme for interacting with the Cloudflare API. Create a token.

Example:Authorization: Bearer Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY
API Email + API Key

The previous authorization scheme for interacting with the Cloudflare API, used in conjunction with a Global API key.

Example:X-Auth-Email: user@example.com

The previous authorization scheme for interacting with the Cloudflare API. When possible, use API tokens instead of Global API keys.

Example:X-Auth-Key: 144c9defac04969c7bfad8efaa8ea194
Accepted Permissions (at least one required)
User Details WriteUser Details Read
ParametersExpand Collapse
query: LocationGetParams { dateEnd, dateRange, dateStart, 3 more }
dateEnd?: string

End of the date range (inclusive).

formatdate-time
dateRange?: string

Filters results by date range.

dateStart?: string

Start of the date range (inclusive).

formatdate-time
format?: "JSON" | "CSV"

Format in which results will be returned.

One of the following:
"JSON"
"CSV"
limit?: number

Limits the number of objects returned in the response.

exclusiveMinimum
minimum0
status?: "VERIFIED" | "UNVERIFIED"
One of the following:
"VERIFIED"
"UNVERIFIED"
ReturnsExpand Collapse
LocationGetResponse { trafficAnomalies }
trafficAnomalies: Array<TrafficAnomaly>
clientCountryAlpha2: string
clientCountryName: string
value: string

A numeric string.

Get top locations by total traffic anomalies

import Cloudflare from 'cloudflare';

const client = new Cloudflare({
  apiToken: process.env['CLOUDFLARE_API_TOKEN'], // This is the default and can be omitted
});

const location = await client.radar.trafficAnomalies.locations.get();

console.log(location.trafficAnomalies);
{
  "result": {
    "trafficAnomalies": [
      {
        "clientCountryAlpha2": "PT",
        "clientCountryName": "Portugal",
        "value": "10"
      }
    ]
  },
  "success": true
}
Returns Examples
{
  "result": {
    "trafficAnomalies": [
      {
        "clientCountryAlpha2": "PT",
        "clientCountryName": "Portugal",
        "value": "10"
      }
    ]
  },
  "success": true
}