Skip to content
Start here

Get BGP hijack events

client.Radar.BGP.Hijacks.Events.List(ctx, query) (*V4PagePagination[BGPHijackEventListResponse], error)
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 BGPHijackEventListParams
DateEnd param.Field[Time]Optional

End of the date range (inclusive).

formatdate-time
DateRange param.Field[string]Optional

Filters results by date range.

DateStart param.Field[Time]Optional

Start of the date range (inclusive).

formatdate-time
EventID param.Field[int64]Optional

The unique identifier of a event.

Format param.Field[BGPHijackEventListParamsFormat]Optional

Format in which results will be returned.

const BGPHijackEventListParamsFormatJson BGPHijackEventListParamsFormat = "JSON"
const BGPHijackEventListParamsFormatCsv BGPHijackEventListParamsFormat = "CSV"
HijackerASN param.Field[int64]Optional

The potential hijacker AS of a BGP hijack event.

InvolvedASN param.Field[int64]Optional

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

InvolvedCountry param.Field[string]Optional

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

maxLength2
minLength2
MaxConfidence param.Field[int64]Optional

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

MinConfidence param.Field[int64]Optional

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

Page param.Field[int64]Optional

Current page number, starting from 1.

exclusiveMinimum
minimum0
PerPage param.Field[int64]Optional

Number of entries per page.

exclusiveMinimum
minimum0
Prefix param.Field[string]Optional
SortBy param.Field[BGPHijackEventListParamsSortBy]Optional

Sorts results by the specified field.

const BGPHijackEventListParamsSortByID BGPHijackEventListParamsSortBy = "ID"
const BGPHijackEventListParamsSortByTime BGPHijackEventListParamsSortBy = "TIME"
const BGPHijackEventListParamsSortByConfidence BGPHijackEventListParamsSortBy = "CONFIDENCE"
SortOrder param.Field[BGPHijackEventListParamsSortOrder]Optional

Sort order.

const BGPHijackEventListParamsSortOrderAsc BGPHijackEventListParamsSortOrder = "ASC"
const BGPHijackEventListParamsSortOrderDesc BGPHijackEventListParamsSortOrder = "DESC"
VictimASN param.Field[int64]Optional

The potential victim AS of a BGP hijack event.

ReturnsExpand Collapse
type BGPHijackEventListResponse struct{…}
ASNInfo []BGPHijackEventListResponseASNInfo
ASN int64
CountryCode string
OrgName string
Events []BGPHijackEventListResponseEvent
ID int64
ConfidenceScore int64
Duration int64
EventType int64
HijackMsgsCount int64
HijackerASN int64
HijackerCountry string
IsStale bool
MaxHijackTs string
MaxMsgTs string
MinHijackTs string
OnGoingCount int64
PeerASNs []int64
PeerIPCount int64
Prefixes []string
Tags []BGPHijackEventListResponseEventsTag
Name string
Score int64
VictimASNs []int64
VictimCountries []string
TotalMonitors int64

Get BGP hijack events

package main

import (
  "context"
  "fmt"

  "github.com/stainless-sdks/cloudflare-go"
  "github.com/stainless-sdks/cloudflare-go/option"
  "github.com/stainless-sdks/cloudflare-go/radar"
)

func main() {
  client := cloudflare.NewClient(
    option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"),
  )
  page, err := client.Radar.BGP.Hijacks.Events.List(context.TODO(), radar.BGPHijackEventListParams{

  })
  if err != nil {
    panic(err.Error())
  }
  fmt.Printf("%+v\n", page)
}
{
  "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
}