Skip to content
Start here

Get the number of outages by location

client.radar.annotations.outages.locations(OutageLocationsParams { dateEnd, dateRange, dateStart, 2 more } query?, RequestOptionsoptions?): OutageLocationsResponse { annotations }
GET/radar/annotations/outages/locations

Retrieves the number of outages by location.

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: OutageLocationsParams { dateEnd, dateRange, dateStart, 2 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
ReturnsExpand Collapse
OutageLocationsResponse { annotations }
annotations: Array<Annotation>
clientCountryAlpha2: string
clientCountryName: string
value: string

A numeric string.

Get the number of outages by location

import Cloudflare from 'cloudflare';

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

const response = await client.radar.annotations.outages.locations();

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