Skip to content
Start here

Get layer 3 attacks by vector summary

Deprecated
client.Radar.Attacks.Layer3.Summary.Vector(ctx, query) (*AttackLayer3SummaryVectorResponse, error)
GET/radar/attacks/layer3/summary/vector

Retrieves the distribution of layer 3 attacks by vector.

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 AttackLayer3SummaryVectorParams
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.

Direction param.Field[AttackLayer3SummaryVectorParamsDirection]optional

Specifies whether the location filter applies to the source or target location.

const AttackLayer3SummaryVectorParamsDirectionOrigin AttackLayer3SummaryVectorParamsDirection = "ORIGIN"
const AttackLayer3SummaryVectorParamsDirectionTarget AttackLayer3SummaryVectorParamsDirection = "TARGET"
Format param.Field[AttackLayer3SummaryVectorParamsFormat]optional

Format in which results will be returned.

const AttackLayer3SummaryVectorParamsFormatJson AttackLayer3SummaryVectorParamsFormat = "JSON"
const AttackLayer3SummaryVectorParamsFormatCsv AttackLayer3SummaryVectorParamsFormat = "CSV"
IPVersion param.Field[[]AttackLayer3SummaryVectorParamsIPVersion]optional

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

const AttackLayer3SummaryVectorParamsIPVersionIPv4 AttackLayer3SummaryVectorParamsIPVersion = "IPv4"
const AttackLayer3SummaryVectorParamsIPVersionIPv6 AttackLayer3SummaryVectorParamsIPVersion = "IPv6"
LimitPerGroup param.Field[int64]optional

Limits the number of objects per group to the top items within the specified time range. When item count exceeds the limit, extra items appear grouped under an "other" category.

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[[]AttackLayer3SummaryVectorParamsProtocol]optional

Filters the results by layer 3/4 protocol.

const AttackLayer3SummaryVectorParamsProtocolUdp AttackLayer3SummaryVectorParamsProtocol = "UDP"
const AttackLayer3SummaryVectorParamsProtocolTCP AttackLayer3SummaryVectorParamsProtocol = "TCP"
const AttackLayer3SummaryVectorParamsProtocolIcmp AttackLayer3SummaryVectorParamsProtocol = "ICMP"
const AttackLayer3SummaryVectorParamsProtocolGRE AttackLayer3SummaryVectorParamsProtocol = "GRE"
ReturnsExpand Collapse
type AttackLayer3SummaryVectorResponse struct{…}
Meta AttackLayer3SummaryVectorResponseMeta

Metadata for the results.

ConfidenceInfo AttackLayer3SummaryVectorResponseMetaConfidenceInfo
Annotations []AttackLayer3SummaryVectorResponseMetaConfidenceInfoAnnotation
DataSource AttackLayer3SummaryVectorResponseMetaConfidenceInfoAnnotationsDataSource

Data source for annotations.

One of the following:
const AttackLayer3SummaryVectorResponseMetaConfidenceInfoAnnotationsDataSourceAll AttackLayer3SummaryVectorResponseMetaConfidenceInfoAnnotationsDataSource = "ALL"
const AttackLayer3SummaryVectorResponseMetaConfidenceInfoAnnotationsDataSourceAIBots AttackLayer3SummaryVectorResponseMetaConfidenceInfoAnnotationsDataSource = "AI_BOTS"
const AttackLayer3SummaryVectorResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway AttackLayer3SummaryVectorResponseMetaConfidenceInfoAnnotationsDataSource = "AI_GATEWAY"
const AttackLayer3SummaryVectorResponseMetaConfidenceInfoAnnotationsDataSourceBGP AttackLayer3SummaryVectorResponseMetaConfidenceInfoAnnotationsDataSource = "BGP"
const AttackLayer3SummaryVectorResponseMetaConfidenceInfoAnnotationsDataSourceBots AttackLayer3SummaryVectorResponseMetaConfidenceInfoAnnotationsDataSource = "BOTS"
const AttackLayer3SummaryVectorResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly AttackLayer3SummaryVectorResponseMetaConfidenceInfoAnnotationsDataSource = "CONNECTION_ANOMALY"
const AttackLayer3SummaryVectorResponseMetaConfidenceInfoAnnotationsDataSourceCT AttackLayer3SummaryVectorResponseMetaConfidenceInfoAnnotationsDataSource = "CT"
const AttackLayer3SummaryVectorResponseMetaConfidenceInfoAnnotationsDataSourceDNS AttackLayer3SummaryVectorResponseMetaConfidenceInfoAnnotationsDataSource = "DNS"
const AttackLayer3SummaryVectorResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude AttackLayer3SummaryVectorResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_MAGNITUDE"
const AttackLayer3SummaryVectorResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112 AttackLayer3SummaryVectorResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_AS112"
const AttackLayer3SummaryVectorResponseMetaConfidenceInfoAnnotationsDataSourceDos AttackLayer3SummaryVectorResponseMetaConfidenceInfoAnnotationsDataSource = "DOS"
const AttackLayer3SummaryVectorResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting AttackLayer3SummaryVectorResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_ROUTING"
const AttackLayer3SummaryVectorResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity AttackLayer3SummaryVectorResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_SECURITY"
const AttackLayer3SummaryVectorResponseMetaConfidenceInfoAnnotationsDataSourceFw AttackLayer3SummaryVectorResponseMetaConfidenceInfoAnnotationsDataSource = "FW"
const AttackLayer3SummaryVectorResponseMetaConfidenceInfoAnnotationsDataSourceFwPg AttackLayer3SummaryVectorResponseMetaConfidenceInfoAnnotationsDataSource = "FW_PG"
const AttackLayer3SummaryVectorResponseMetaConfidenceInfoAnnotationsDataSourceHTTP AttackLayer3SummaryVectorResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP"
const AttackLayer3SummaryVectorResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl AttackLayer3SummaryVectorResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CONTROL"
const AttackLayer3SummaryVectorResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer AttackLayer3SummaryVectorResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CRAWLER_REFERER"
const AttackLayer3SummaryVectorResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins AttackLayer3SummaryVectorResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_ORIGINS"
const AttackLayer3SummaryVectorResponseMetaConfidenceInfoAnnotationsDataSourceIQI AttackLayer3SummaryVectorResponseMetaConfidenceInfoAnnotationsDataSource = "IQI"
const AttackLayer3SummaryVectorResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials AttackLayer3SummaryVectorResponseMetaConfidenceInfoAnnotationsDataSource = "LEAKED_CREDENTIALS"
const AttackLayer3SummaryVectorResponseMetaConfidenceInfoAnnotationsDataSourceNet AttackLayer3SummaryVectorResponseMetaConfidenceInfoAnnotationsDataSource = "NET"
const AttackLayer3SummaryVectorResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT AttackLayer3SummaryVectorResponseMetaConfidenceInfoAnnotationsDataSource = "ROBOTS_TXT"
const AttackLayer3SummaryVectorResponseMetaConfidenceInfoAnnotationsDataSourceSpeed AttackLayer3SummaryVectorResponseMetaConfidenceInfoAnnotationsDataSource = "SPEED"
const AttackLayer3SummaryVectorResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI AttackLayer3SummaryVectorResponseMetaConfidenceInfoAnnotationsDataSource = "WORKERS_AI"
Description string
EndDate Time
formatdate-time
EventType AttackLayer3SummaryVectorResponseMetaConfidenceInfoAnnotationsEventType

Event type for annotations.

One of the following:
const AttackLayer3SummaryVectorResponseMetaConfidenceInfoAnnotationsEventTypeEvent AttackLayer3SummaryVectorResponseMetaConfidenceInfoAnnotationsEventType = "EVENT"
const AttackLayer3SummaryVectorResponseMetaConfidenceInfoAnnotationsEventTypeGeneral AttackLayer3SummaryVectorResponseMetaConfidenceInfoAnnotationsEventType = "GENERAL"
const AttackLayer3SummaryVectorResponseMetaConfidenceInfoAnnotationsEventTypeOutage AttackLayer3SummaryVectorResponseMetaConfidenceInfoAnnotationsEventType = "OUTAGE"
const AttackLayer3SummaryVectorResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection AttackLayer3SummaryVectorResponseMetaConfidenceInfoAnnotationsEventType = "PARTIAL_PROJECTION"
const AttackLayer3SummaryVectorResponseMetaConfidenceInfoAnnotationsEventTypePipeline AttackLayer3SummaryVectorResponseMetaConfidenceInfoAnnotationsEventType = "PIPELINE"
const AttackLayer3SummaryVectorResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly AttackLayer3SummaryVectorResponseMetaConfidenceInfoAnnotationsEventType = "TRAFFIC_ANOMALY"
IsInstantaneous bool

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

LinkedURL string
formaturi
StartDate Time
formatdate-time
Level int64

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

DateRange []AttackLayer3SummaryVectorResponseMetaDateRange
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 AttackLayer3SummaryVectorResponseMetaNormalization

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

One of the following:
const AttackLayer3SummaryVectorResponseMetaNormalizationPercentage AttackLayer3SummaryVectorResponseMetaNormalization = "PERCENTAGE"
const AttackLayer3SummaryVectorResponseMetaNormalizationMin0Max AttackLayer3SummaryVectorResponseMetaNormalization = "MIN0_MAX"
const AttackLayer3SummaryVectorResponseMetaNormalizationMinMax AttackLayer3SummaryVectorResponseMetaNormalization = "MIN_MAX"
const AttackLayer3SummaryVectorResponseMetaNormalizationRawValues AttackLayer3SummaryVectorResponseMetaNormalization = "RAW_VALUES"
const AttackLayer3SummaryVectorResponseMetaNormalizationPercentageChange AttackLayer3SummaryVectorResponseMetaNormalization = "PERCENTAGE_CHANGE"
const AttackLayer3SummaryVectorResponseMetaNormalizationRollingAverage AttackLayer3SummaryVectorResponseMetaNormalization = "ROLLING_AVERAGE"
const AttackLayer3SummaryVectorResponseMetaNormalizationOverlappedPercentage AttackLayer3SummaryVectorResponseMetaNormalization = "OVERLAPPED_PERCENTAGE"
const AttackLayer3SummaryVectorResponseMetaNormalizationRatio AttackLayer3SummaryVectorResponseMetaNormalization = "RATIO"
Units []AttackLayer3SummaryVectorResponseMetaUnit

Measurement units for the results.

Name string
Value string
Summary0 map[string, string]

Get layer 3 attacks by vector summary

package main

import (
  "context"
  "fmt"

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

func main() {
  client := cloudflare.NewClient(
    option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"),
  )
  response, err := client.Radar.Attacks.Layer3.Summary.Vector(context.TODO(), radar.AttackLayer3SummaryVectorParams{

  })
  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"
          }
        ],
        "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"
        }
      ]
    },
    "summary_0": {
      "ACK Flood": "65.662148",
      "SYN Flood": "16.86401"
    }
  },
  "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"
          }
        ],
        "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"
        }
      ]
    },
    "summary_0": {
      "ACK Flood": "65.662148",
      "SYN Flood": "16.86401"
    }
  },
  "success": true
}