Get top locations by total traffic anomalies
radar.traffic_anomalies.locations.get(LocationGetParams**kwargs) -> LocationGetResponse
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:
API Email + API Key
The previous authorization scheme for interacting with the Cloudflare API, used in conjunction with a Global API key.
Example:
The previous authorization scheme for interacting with the Cloudflare API. When possible, use API tokens instead of Global API keys.
Example:
Accepted Permissions (at least one required)
Parameters
Get top locations by total traffic anomalies
import os
from cloudflare import Cloudflare
client = Cloudflare(
api_token=os.environ.get("CLOUDFLARE_API_TOKEN"), # This is the default and can be omitted
)
location = client.radar.traffic_anomalies.locations.get()
print(location.traffic_anomalies){
"result": {
"trafficAnomalies": [
{
"clientCountryAlpha2": "PT",
"clientCountryName": "Portugal",
"value": "10"
}
]
},
"success": true
}Returns Examples
{
"result": {
"trafficAnomalies": [
{
"clientCountryAlpha2": "PT",
"clientCountryName": "Portugal",
"value": "10"
}
]
},
"success": true
}