Skip to content
Start here

Get top target locations of layer 3 attacks

client.Radar.Attacks.Layer3.Top.Locations.Target(ctx, query) (*AttackLayer3TopLocationTargetResponse, error)
GET/radar/attacks/layer3/top/locations/target

Retrieves the target locations of layer 3 attacks.

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 AttackLayer3TopLocationTargetParams
Continent param.Field[[]string]Optional

Filters results by continent. Specify a comma-separated list of alpha-2 codes. Prefix with - to exclude continents from results. For example, -EU,NA excludes results from EU, but includes results from NA.

DateEnd param.Field[[]Time]Optional

End of the date range (inclusive).

DateRange param.Field[[]string]Optional

Filters results by date range. For example, use 7d and 7dcontrol to compare this week with the previous week. Use this parameter or set specific start and end dates (dateStart and dateEnd parameters).

DateStart param.Field[[]Time]Optional

Start of the date range.

Format param.Field[AttackLayer3TopLocationTargetParamsFormat]Optional

Format in which results will be returned.

const AttackLayer3TopLocationTargetParamsFormatJson AttackLayer3TopLocationTargetParamsFormat = "JSON"
const AttackLayer3TopLocationTargetParamsFormatCsv AttackLayer3TopLocationTargetParamsFormat = "CSV"
IPVersion param.Field[[]AttackLayer3TopLocationTargetParamsIPVersion]Optional

Filters results by IP version (Ipv4 vs. IPv6).

const AttackLayer3TopLocationTargetParamsIPVersionIPv4 AttackLayer3TopLocationTargetParamsIPVersion = "IPv4"
const AttackLayer3TopLocationTargetParamsIPVersionIPv6 AttackLayer3TopLocationTargetParamsIPVersion = "IPv6"
Limit param.Field[int64]Optional

Limits the number of objects returned in the response.

exclusiveMinimum
minimum0
Location param.Field[[]string]Optional

Filters results by location. Specify a comma-separated list of alpha-2 codes. Prefix with - to exclude locations from results. For example, -US,PT excludes results from the US, but includes results from PT.

Name param.Field[[]string]Optional

Array of names used to label the series in the response.

Protocol param.Field[[]AttackLayer3TopLocationTargetParamsProtocol]Optional

Filters the results by layer 3/4 protocol.

const AttackLayer3TopLocationTargetParamsProtocolUdp AttackLayer3TopLocationTargetParamsProtocol = "UDP"
const AttackLayer3TopLocationTargetParamsProtocolTCP AttackLayer3TopLocationTargetParamsProtocol = "TCP"
const AttackLayer3TopLocationTargetParamsProtocolIcmp AttackLayer3TopLocationTargetParamsProtocol = "ICMP"
const AttackLayer3TopLocationTargetParamsProtocolGRE AttackLayer3TopLocationTargetParamsProtocol = "GRE"
ReturnsExpand Collapse
type AttackLayer3TopLocationTargetResponse struct{…}
Meta AttackLayer3TopLocationTargetResponseMeta

Metadata for the results.

ConfidenceInfo AttackLayer3TopLocationTargetResponseMetaConfidenceInfo
Annotations []AttackLayer3TopLocationTargetResponseMetaConfidenceInfoAnnotation
DataSource AttackLayer3TopLocationTargetResponseMetaConfidenceInfoAnnotationsDataSource

Data source for annotations.

One of the following:
const AttackLayer3TopLocationTargetResponseMetaConfidenceInfoAnnotationsDataSourceAll AttackLayer3TopLocationTargetResponseMetaConfidenceInfoAnnotationsDataSource = "ALL"
const AttackLayer3TopLocationTargetResponseMetaConfidenceInfoAnnotationsDataSourceAIBots AttackLayer3TopLocationTargetResponseMetaConfidenceInfoAnnotationsDataSource = "AI_BOTS"
const AttackLayer3TopLocationTargetResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway AttackLayer3TopLocationTargetResponseMetaConfidenceInfoAnnotationsDataSource = "AI_GATEWAY"
const AttackLayer3TopLocationTargetResponseMetaConfidenceInfoAnnotationsDataSourceBGP AttackLayer3TopLocationTargetResponseMetaConfidenceInfoAnnotationsDataSource = "BGP"
const AttackLayer3TopLocationTargetResponseMetaConfidenceInfoAnnotationsDataSourceBots AttackLayer3TopLocationTargetResponseMetaConfidenceInfoAnnotationsDataSource = "BOTS"
const AttackLayer3TopLocationTargetResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly AttackLayer3TopLocationTargetResponseMetaConfidenceInfoAnnotationsDataSource = "CONNECTION_ANOMALY"
const AttackLayer3TopLocationTargetResponseMetaConfidenceInfoAnnotationsDataSourceCT AttackLayer3TopLocationTargetResponseMetaConfidenceInfoAnnotationsDataSource = "CT"
const AttackLayer3TopLocationTargetResponseMetaConfidenceInfoAnnotationsDataSourceDNS AttackLayer3TopLocationTargetResponseMetaConfidenceInfoAnnotationsDataSource = "DNS"
const AttackLayer3TopLocationTargetResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude AttackLayer3TopLocationTargetResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_MAGNITUDE"
const AttackLayer3TopLocationTargetResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112 AttackLayer3TopLocationTargetResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_AS112"
const AttackLayer3TopLocationTargetResponseMetaConfidenceInfoAnnotationsDataSourceDos AttackLayer3TopLocationTargetResponseMetaConfidenceInfoAnnotationsDataSource = "DOS"
const AttackLayer3TopLocationTargetResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting AttackLayer3TopLocationTargetResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_ROUTING"
const AttackLayer3TopLocationTargetResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity AttackLayer3TopLocationTargetResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_SECURITY"
const AttackLayer3TopLocationTargetResponseMetaConfidenceInfoAnnotationsDataSourceFw AttackLayer3TopLocationTargetResponseMetaConfidenceInfoAnnotationsDataSource = "FW"
const AttackLayer3TopLocationTargetResponseMetaConfidenceInfoAnnotationsDataSourceFwPg AttackLayer3TopLocationTargetResponseMetaConfidenceInfoAnnotationsDataSource = "FW_PG"
const AttackLayer3TopLocationTargetResponseMetaConfidenceInfoAnnotationsDataSourceHTTP AttackLayer3TopLocationTargetResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP"
const AttackLayer3TopLocationTargetResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl AttackLayer3TopLocationTargetResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CONTROL"
const AttackLayer3TopLocationTargetResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer AttackLayer3TopLocationTargetResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CRAWLER_REFERER"
const AttackLayer3TopLocationTargetResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins AttackLayer3TopLocationTargetResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_ORIGINS"
const AttackLayer3TopLocationTargetResponseMetaConfidenceInfoAnnotationsDataSourceIQI AttackLayer3TopLocationTargetResponseMetaConfidenceInfoAnnotationsDataSource = "IQI"
const AttackLayer3TopLocationTargetResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials AttackLayer3TopLocationTargetResponseMetaConfidenceInfoAnnotationsDataSource = "LEAKED_CREDENTIALS"
const AttackLayer3TopLocationTargetResponseMetaConfidenceInfoAnnotationsDataSourceNet AttackLayer3TopLocationTargetResponseMetaConfidenceInfoAnnotationsDataSource = "NET"
const AttackLayer3TopLocationTargetResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT AttackLayer3TopLocationTargetResponseMetaConfidenceInfoAnnotationsDataSource = "ROBOTS_TXT"
const AttackLayer3TopLocationTargetResponseMetaConfidenceInfoAnnotationsDataSourceSpeed AttackLayer3TopLocationTargetResponseMetaConfidenceInfoAnnotationsDataSource = "SPEED"
const AttackLayer3TopLocationTargetResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI AttackLayer3TopLocationTargetResponseMetaConfidenceInfoAnnotationsDataSource = "WORKERS_AI"
Description string
EndDate Time
formatdate-time
EventType AttackLayer3TopLocationTargetResponseMetaConfidenceInfoAnnotationsEventType

Event type for annotations.

One of the following:
const AttackLayer3TopLocationTargetResponseMetaConfidenceInfoAnnotationsEventTypeEvent AttackLayer3TopLocationTargetResponseMetaConfidenceInfoAnnotationsEventType = "EVENT"
const AttackLayer3TopLocationTargetResponseMetaConfidenceInfoAnnotationsEventTypeGeneral AttackLayer3TopLocationTargetResponseMetaConfidenceInfoAnnotationsEventType = "GENERAL"
const AttackLayer3TopLocationTargetResponseMetaConfidenceInfoAnnotationsEventTypeOutage AttackLayer3TopLocationTargetResponseMetaConfidenceInfoAnnotationsEventType = "OUTAGE"
const AttackLayer3TopLocationTargetResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection AttackLayer3TopLocationTargetResponseMetaConfidenceInfoAnnotationsEventType = "PARTIAL_PROJECTION"
const AttackLayer3TopLocationTargetResponseMetaConfidenceInfoAnnotationsEventTypePipeline AttackLayer3TopLocationTargetResponseMetaConfidenceInfoAnnotationsEventType = "PIPELINE"
const AttackLayer3TopLocationTargetResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly AttackLayer3TopLocationTargetResponseMetaConfidenceInfoAnnotationsEventType = "TRAFFIC_ANOMALY"
IsInstantaneous bool

Whether event is a single point in time or a time range.

LinkedURL string
formaturi
StartDate Time
formatdate-time
Tags []stringOptional
Level int64

Provides an indication of how much confidence Cloudflare has in the data.

DateRange []AttackLayer3TopLocationTargetResponseMetaDateRange
EndTime Time

Adjusted end of date range.

formatdate-time
StartTime Time

Adjusted start of date range.

formatdate-time
LastUpdated Time

Timestamp of the last dataset update.

formatdate-time
Normalization AttackLayer3TopLocationTargetResponseMetaNormalization

Normalization method applied to the results. Refer to Normalization methods.

One of the following:
const AttackLayer3TopLocationTargetResponseMetaNormalizationPercentage AttackLayer3TopLocationTargetResponseMetaNormalization = "PERCENTAGE"
const AttackLayer3TopLocationTargetResponseMetaNormalizationMin0Max AttackLayer3TopLocationTargetResponseMetaNormalization = "MIN0_MAX"
const AttackLayer3TopLocationTargetResponseMetaNormalizationMinMax AttackLayer3TopLocationTargetResponseMetaNormalization = "MIN_MAX"
const AttackLayer3TopLocationTargetResponseMetaNormalizationRawValues AttackLayer3TopLocationTargetResponseMetaNormalization = "RAW_VALUES"
const AttackLayer3TopLocationTargetResponseMetaNormalizationPercentageChange AttackLayer3TopLocationTargetResponseMetaNormalization = "PERCENTAGE_CHANGE"
const AttackLayer3TopLocationTargetResponseMetaNormalizationRollingAverage AttackLayer3TopLocationTargetResponseMetaNormalization = "ROLLING_AVERAGE"
const AttackLayer3TopLocationTargetResponseMetaNormalizationOverlappedPercentage AttackLayer3TopLocationTargetResponseMetaNormalization = "OVERLAPPED_PERCENTAGE"
const AttackLayer3TopLocationTargetResponseMetaNormalizationRatio AttackLayer3TopLocationTargetResponseMetaNormalization = "RATIO"
Units []AttackLayer3TopLocationTargetResponseMetaUnit

Measurement units for the results.

Name string
Value string
Top0 []AttackLayer3TopLocationTargetResponseTop0
Rank float64
TargetCountryAlpha2 string
TargetCountryName string
Value string

Get top target locations of layer 3 attacks

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"),
  )
  response, err := client.Radar.Attacks.Layer3.Top.Locations.Target(context.TODO(), radar.AttackLayer3TopLocationTargetParams{

  })
  if err != nil {
    panic(err.Error())
  }
  fmt.Printf("%+v\n", response.Meta)
}
{
  "result": {
    "meta": {
      "confidenceInfo": {
        "annotations": [
          {
            "dataSource": "ALL",
            "description": "Cable cut in Tonga",
            "endDate": "2019-12-27T18:11:19.117Z",
            "eventType": "EVENT",
            "isInstantaneous": true,
            "linkedUrl": "https://example.com",
            "startDate": "2019-12-27T18:11:19.117Z",
            "tags": [
              "BOT_CLASS"
            ]
          }
        ],
        "level": 0
      },
      "dateRange": [
        {
          "endTime": "2022-09-17T10:22:57.555Z",
          "startTime": "2022-09-16T10:22:57.555Z"
        }
      ],
      "lastUpdated": "2019-12-27T18:11:19.117Z",
      "normalization": "PERCENTAGE",
      "units": [
        {
          "name": "*",
          "value": "requests"
        }
      ]
    },
    "top_0": [
      {
        "rank": 1,
        "targetCountryAlpha2": "FR",
        "targetCountryName": "France",
        "value": "4.323214"
      }
    ]
  },
  "success": true
}
Returns Examples
{
  "result": {
    "meta": {
      "confidenceInfo": {
        "annotations": [
          {
            "dataSource": "ALL",
            "description": "Cable cut in Tonga",
            "endDate": "2019-12-27T18:11:19.117Z",
            "eventType": "EVENT",
            "isInstantaneous": true,
            "linkedUrl": "https://example.com",
            "startDate": "2019-12-27T18:11:19.117Z",
            "tags": [
              "BOT_CLASS"
            ]
          }
        ],
        "level": 0
      },
      "dateRange": [
        {
          "endTime": "2022-09-17T10:22:57.555Z",
          "startTime": "2022-09-16T10:22:57.555Z"
        }
      ],
      "lastUpdated": "2019-12-27T18:11:19.117Z",
      "normalization": "PERCENTAGE",
      "units": [
        {
          "name": "*",
          "value": "requests"
        }
      ]
    },
    "top_0": [
      {
        "rank": 1,
        "targetCountryAlpha2": "FR",
        "targetCountryName": "France",
        "value": "4.323214"
      }
    ]
  },
  "success": true
}