Skip to content
Start here

Get BGP hijack events

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

Retrieves the BGP hijack 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, 13 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"
hijackerAsn?: number

The potential hijacker AS of a BGP hijack event.

involvedAsn?: number

The potential hijacker or victim AS of a BGP hijack event.

involvedCountry?: string

The country code of the potential hijacker or victim AS of a BGP hijack event.

maxLength2
minLength2
maxConfidence?: number

Filters events by maximum confidence score (1-4 low, 5-7 mid, 8+ high).

minConfidence?: number

Filters events by minimum confidence score (1-4 low, 5-7 mid, 8+ high).

page?: number

Current page number, starting from 1.

exclusiveMinimum
minimum0
per_page?: number

Number of entries per page.

exclusiveMinimum
minimum0
prefix?: string
sortBy?: "ID" | "TIME" | "CONFIDENCE"

Sorts results by the specified field.

One of the following:
"ID"
"TIME"
"CONFIDENCE"
sortOrder?: "ASC" | "DESC"

Sort order.

One of the following:
"ASC"
"DESC"
victimAsn?: number

The potential victim AS of a BGP hijack event.

ReturnsExpand Collapse
EventListResponse { asn_info, events, total_monitors }
asn_info: Array<ASNInfo>
asn: number
country_code: string
org_name: string
events: Array<Event>
id: number
confidence_score: number
duration: number
event_type: number
hijack_msgs_count: number
hijacker_asn: number
hijacker_country: string
is_stale: boolean
max_hijack_ts: string
max_msg_ts: string
min_hijack_ts: string
on_going_count: number
peer_asns: Array<number>
peer_ip_count: number
prefixes: Array<string>
tags: Array<Tag>
name: string
score: number
victim_asns: Array<number>
victim_countries: Array<string>
total_monitors: number

Get BGP hijack 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.hijacks.events.list()) {
  console.log(eventListResponse.asn_info);
}
{
  "result": {
    "asn_info": [
      {
        "asn": 0,
        "country_code": "country_code",
        "org_name": "org_name"
      }
    ],
    "events": [
      {
        "id": 0,
        "confidence_score": 0,
        "duration": 0,
        "event_type": 0,
        "hijack_msgs_count": 0,
        "hijacker_asn": 0,
        "hijacker_country": "hijacker_country",
        "is_stale": true,
        "max_hijack_ts": "max_hijack_ts",
        "max_msg_ts": "max_msg_ts",
        "min_hijack_ts": "min_hijack_ts",
        "on_going_count": 0,
        "peer_asns": [
          0
        ],
        "peer_ip_count": 0,
        "prefixes": [
          "string"
        ],
        "tags": [
          {
            "name": "name",
            "score": 0
          }
        ],
        "victim_asns": [
          0
        ],
        "victim_countries": [
          "string"
        ]
      }
    ],
    "total_monitors": 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,
        "confidence_score": 0,
        "duration": 0,
        "event_type": 0,
        "hijack_msgs_count": 0,
        "hijacker_asn": 0,
        "hijacker_country": "hijacker_country",
        "is_stale": true,
        "max_hijack_ts": "max_hijack_ts",
        "max_msg_ts": "max_msg_ts",
        "min_hijack_ts": "min_hijack_ts",
        "on_going_count": 0,
        "peer_asns": [
          0
        ],
        "peer_ip_count": 0,
        "prefixes": [
          "string"
        ],
        "tags": [
          {
            "name": "name",
            "score": 0
          }
        ],
        "victim_asns": [
          0
        ],
        "victim_countries": [
          "string"
        ]
      }
    ],
    "total_monitors": 0
  },
  "result_info": {
    "count": 0,
    "page": 0,
    "per_page": 0,
    "total_count": 0
  },
  "success": true
}