Skip to content
Start here

Get BGP route leak events

client.radar.bgp.leaks.events.list(EventListParams { dateEnd, dateRange, dateStart, 9 more } query?, RequestOptionsoptions?): V4PagePagination<EventListResponse { asn_info, events } >
GET/radar/bgp/leaks/events

Retrieves the BGP route leak events.

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: EventListParams { dateEnd, dateRange, dateStart, 9 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
eventId?: number

The unique identifier of a event.

format?: "JSON" | "CSV"

Format in which results will be returned.

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

ASN that is causing or affected by a route leak event.

involvedCountry?: string

Country code of a involved ASN in a route leak event.

maxLength2
minLength2
leakAsn?: number

The leaking AS of a route leak event.

page?: number

Current page number, starting from 1.

exclusiveMinimum
minimum0
per_page?: number

Number of entries per page.

exclusiveMinimum
minimum0
sortBy?: "ID" | "LEAKS" | "PEERS" | 3 more

Sorts results by the specified field.

One of the following:
"ID"
"LEAKS"
"PEERS"
"PREFIXES"
"ORIGINS"
"TIME"
sortOrder?: "ASC" | "DESC"

Sort order.

One of the following:
"ASC"
"DESC"
ReturnsExpand Collapse
EventListResponse { asn_info, events }
asn_info: Array<ASNInfo>
asn: number
country_code: string
org_name: string
events: Array<Event>
id: number
countries: Array<string>
detected_ts: string
finished: boolean
leak_asn: number
leak_count: number
leak_seg: Array<number>
leak_type: number
max_ts: string
min_ts: string
origin_count: number
peer_count: number
prefix_count: number

Get BGP route leak events

import Cloudflare from 'cloudflare';

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

// Automatically fetches more pages as needed.
for await (const eventListResponse of client.radar.bgp.leaks.events.list()) {
  console.log(eventListResponse.asn_info);
}
{
  "result": {
    "asn_info": [
      {
        "asn": 0,
        "country_code": "country_code",
        "org_name": "org_name"
      }
    ],
    "events": [
      {
        "id": 0,
        "countries": [
          "string"
        ],
        "detected_ts": "detected_ts",
        "finished": true,
        "leak_asn": 0,
        "leak_count": 0,
        "leak_seg": [
          0
        ],
        "leak_type": 0,
        "max_ts": "max_ts",
        "min_ts": "min_ts",
        "origin_count": 0,
        "peer_count": 0,
        "prefix_count": 0
      }
    ]
  },
  "result_info": {
    "count": 0,
    "page": 0,
    "per_page": 0,
    "total_count": 0
  },
  "success": true
}
Returns Examples
{
  "result": {
    "asn_info": [
      {
        "asn": 0,
        "country_code": "country_code",
        "org_name": "org_name"
      }
    ],
    "events": [
      {
        "id": 0,
        "countries": [
          "string"
        ],
        "detected_ts": "detected_ts",
        "finished": true,
        "leak_asn": 0,
        "leak_count": 0,
        "leak_seg": [
          0
        ],
        "leak_type": 0,
        "max_ts": "max_ts",
        "min_ts": "min_ts",
        "origin_count": 0,
        "peer_count": 0,
        "prefix_count": 0
      }
    ]
  },
  "result_info": {
    "count": 0,
    "page": 0,
    "per_page": 0,
    "total_count": 0
  },
  "success": true
}