Skip to content
Start here

Get layer 3 attacks by bitrate time series

Deprecated
client.Radar.Attacks.Layer3.TimeseriesGroups.Bitrate(ctx, query) (*AttackLayer3TimeseriesGroupBitrateResponse, error)
GET/radar/attacks/layer3/timeseries_groups/bitrate

Retrieves the distribution of layer 3 attacks by bitrate over time.

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 AttackLayer3TimeseriesGroupBitrateParams

Aggregation interval of the results (e.g., in 15 minutes or 1 hour intervals). Refer to Aggregation intervals.

const AttackLayer3TimeseriesGroupBitrateParamsAggInterval15m AttackLayer3TimeseriesGroupBitrateParamsAggInterval = "15m"
const AttackLayer3TimeseriesGroupBitrateParamsAggInterval1h AttackLayer3TimeseriesGroupBitrateParamsAggInterval = "1h"
const AttackLayer3TimeseriesGroupBitrateParamsAggInterval1d AttackLayer3TimeseriesGroupBitrateParamsAggInterval = "1d"
const AttackLayer3TimeseriesGroupBitrateParamsAggInterval1w AttackLayer3TimeseriesGroupBitrateParamsAggInterval = "1w"
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.

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

const AttackLayer3TimeseriesGroupBitrateParamsDirectionOrigin AttackLayer3TimeseriesGroupBitrateParamsDirection = "ORIGIN"
const AttackLayer3TimeseriesGroupBitrateParamsDirectionTarget AttackLayer3TimeseriesGroupBitrateParamsDirection = "TARGET"

Format in which results will be returned.

const AttackLayer3TimeseriesGroupBitrateParamsFormatJson AttackLayer3TimeseriesGroupBitrateParamsFormat = "JSON"
const AttackLayer3TimeseriesGroupBitrateParamsFormatCsv AttackLayer3TimeseriesGroupBitrateParamsFormat = "CSV"
IPVersion param.Field[[]AttackLayer3TimeseriesGroupBitrateParamsIPVersion]optional

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

const AttackLayer3TimeseriesGroupBitrateParamsIPVersionIPv4 AttackLayer3TimeseriesGroupBitrateParamsIPVersion = "IPv4"
const AttackLayer3TimeseriesGroupBitrateParamsIPVersionIPv6 AttackLayer3TimeseriesGroupBitrateParamsIPVersion = "IPv6"
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.

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

const AttackLayer3TimeseriesGroupBitrateParamsNormalizationPercentage AttackLayer3TimeseriesGroupBitrateParamsNormalization = "PERCENTAGE"
const AttackLayer3TimeseriesGroupBitrateParamsNormalizationMin0Max AttackLayer3TimeseriesGroupBitrateParamsNormalization = "MIN0_MAX"
Protocol param.Field[[]AttackLayer3TimeseriesGroupBitrateParamsProtocol]optional

Filters the results by layer 3/4 protocol.

const AttackLayer3TimeseriesGroupBitrateParamsProtocolUdp AttackLayer3TimeseriesGroupBitrateParamsProtocol = "UDP"
const AttackLayer3TimeseriesGroupBitrateParamsProtocolTCP AttackLayer3TimeseriesGroupBitrateParamsProtocol = "TCP"
const AttackLayer3TimeseriesGroupBitrateParamsProtocolIcmp AttackLayer3TimeseriesGroupBitrateParamsProtocol = "ICMP"
const AttackLayer3TimeseriesGroupBitrateParamsProtocolGRE AttackLayer3TimeseriesGroupBitrateParamsProtocol = "GRE"
ReturnsExpand Collapse
type AttackLayer3TimeseriesGroupBitrateResponse struct{…}
Meta AttackLayer3TimeseriesGroupBitrateResponseMeta

Metadata for the results.

AggInterval AttackLayer3TimeseriesGroupBitrateResponseMetaAggInterval

Aggregation interval of the results (e.g., in 15 minutes or 1 hour intervals). Refer to Aggregation intervals.

One of the following:
const AttackLayer3TimeseriesGroupBitrateResponseMetaAggIntervalFifteenMinutes AttackLayer3TimeseriesGroupBitrateResponseMetaAggInterval = "FIFTEEN_MINUTES"
const AttackLayer3TimeseriesGroupBitrateResponseMetaAggIntervalOneHour AttackLayer3TimeseriesGroupBitrateResponseMetaAggInterval = "ONE_HOUR"
const AttackLayer3TimeseriesGroupBitrateResponseMetaAggIntervalOneDay AttackLayer3TimeseriesGroupBitrateResponseMetaAggInterval = "ONE_DAY"
const AttackLayer3TimeseriesGroupBitrateResponseMetaAggIntervalOneWeek AttackLayer3TimeseriesGroupBitrateResponseMetaAggInterval = "ONE_WEEK"
const AttackLayer3TimeseriesGroupBitrateResponseMetaAggIntervalOneMonth AttackLayer3TimeseriesGroupBitrateResponseMetaAggInterval = "ONE_MONTH"
ConfidenceInfo AttackLayer3TimeseriesGroupBitrateResponseMetaConfidenceInfo
Annotations []AttackLayer3TimeseriesGroupBitrateResponseMetaConfidenceInfoAnnotation
DataSource AttackLayer3TimeseriesGroupBitrateResponseMetaConfidenceInfoAnnotationsDataSource

Data source for annotations.

One of the following:
const AttackLayer3TimeseriesGroupBitrateResponseMetaConfidenceInfoAnnotationsDataSourceAll AttackLayer3TimeseriesGroupBitrateResponseMetaConfidenceInfoAnnotationsDataSource = "ALL"
const AttackLayer3TimeseriesGroupBitrateResponseMetaConfidenceInfoAnnotationsDataSourceAIBots AttackLayer3TimeseriesGroupBitrateResponseMetaConfidenceInfoAnnotationsDataSource = "AI_BOTS"
const AttackLayer3TimeseriesGroupBitrateResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway AttackLayer3TimeseriesGroupBitrateResponseMetaConfidenceInfoAnnotationsDataSource = "AI_GATEWAY"
const AttackLayer3TimeseriesGroupBitrateResponseMetaConfidenceInfoAnnotationsDataSourceBGP AttackLayer3TimeseriesGroupBitrateResponseMetaConfidenceInfoAnnotationsDataSource = "BGP"
const AttackLayer3TimeseriesGroupBitrateResponseMetaConfidenceInfoAnnotationsDataSourceBots AttackLayer3TimeseriesGroupBitrateResponseMetaConfidenceInfoAnnotationsDataSource = "BOTS"
const AttackLayer3TimeseriesGroupBitrateResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly AttackLayer3TimeseriesGroupBitrateResponseMetaConfidenceInfoAnnotationsDataSource = "CONNECTION_ANOMALY"
const AttackLayer3TimeseriesGroupBitrateResponseMetaConfidenceInfoAnnotationsDataSourceCT AttackLayer3TimeseriesGroupBitrateResponseMetaConfidenceInfoAnnotationsDataSource = "CT"
const AttackLayer3TimeseriesGroupBitrateResponseMetaConfidenceInfoAnnotationsDataSourceDNS AttackLayer3TimeseriesGroupBitrateResponseMetaConfidenceInfoAnnotationsDataSource = "DNS"
const AttackLayer3TimeseriesGroupBitrateResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude AttackLayer3TimeseriesGroupBitrateResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_MAGNITUDE"
const AttackLayer3TimeseriesGroupBitrateResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112 AttackLayer3TimeseriesGroupBitrateResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_AS112"
const AttackLayer3TimeseriesGroupBitrateResponseMetaConfidenceInfoAnnotationsDataSourceDos AttackLayer3TimeseriesGroupBitrateResponseMetaConfidenceInfoAnnotationsDataSource = "DOS"
const AttackLayer3TimeseriesGroupBitrateResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting AttackLayer3TimeseriesGroupBitrateResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_ROUTING"
const AttackLayer3TimeseriesGroupBitrateResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity AttackLayer3TimeseriesGroupBitrateResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_SECURITY"
const AttackLayer3TimeseriesGroupBitrateResponseMetaConfidenceInfoAnnotationsDataSourceFw AttackLayer3TimeseriesGroupBitrateResponseMetaConfidenceInfoAnnotationsDataSource = "FW"
const AttackLayer3TimeseriesGroupBitrateResponseMetaConfidenceInfoAnnotationsDataSourceFwPg AttackLayer3TimeseriesGroupBitrateResponseMetaConfidenceInfoAnnotationsDataSource = "FW_PG"
const AttackLayer3TimeseriesGroupBitrateResponseMetaConfidenceInfoAnnotationsDataSourceHTTP AttackLayer3TimeseriesGroupBitrateResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP"
const AttackLayer3TimeseriesGroupBitrateResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl AttackLayer3TimeseriesGroupBitrateResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CONTROL"
const AttackLayer3TimeseriesGroupBitrateResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer AttackLayer3TimeseriesGroupBitrateResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CRAWLER_REFERER"
const AttackLayer3TimeseriesGroupBitrateResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins AttackLayer3TimeseriesGroupBitrateResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_ORIGINS"
const AttackLayer3TimeseriesGroupBitrateResponseMetaConfidenceInfoAnnotationsDataSourceIQI AttackLayer3TimeseriesGroupBitrateResponseMetaConfidenceInfoAnnotationsDataSource = "IQI"
const AttackLayer3TimeseriesGroupBitrateResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials AttackLayer3TimeseriesGroupBitrateResponseMetaConfidenceInfoAnnotationsDataSource = "LEAKED_CREDENTIALS"
const AttackLayer3TimeseriesGroupBitrateResponseMetaConfidenceInfoAnnotationsDataSourceNet AttackLayer3TimeseriesGroupBitrateResponseMetaConfidenceInfoAnnotationsDataSource = "NET"
const AttackLayer3TimeseriesGroupBitrateResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT AttackLayer3TimeseriesGroupBitrateResponseMetaConfidenceInfoAnnotationsDataSource = "ROBOTS_TXT"
const AttackLayer3TimeseriesGroupBitrateResponseMetaConfidenceInfoAnnotationsDataSourceSpeed AttackLayer3TimeseriesGroupBitrateResponseMetaConfidenceInfoAnnotationsDataSource = "SPEED"
const AttackLayer3TimeseriesGroupBitrateResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI AttackLayer3TimeseriesGroupBitrateResponseMetaConfidenceInfoAnnotationsDataSource = "WORKERS_AI"
Description string
EndDate Time
formatdate-time
EventType AttackLayer3TimeseriesGroupBitrateResponseMetaConfidenceInfoAnnotationsEventType

Event type for annotations.

One of the following:
const AttackLayer3TimeseriesGroupBitrateResponseMetaConfidenceInfoAnnotationsEventTypeEvent AttackLayer3TimeseriesGroupBitrateResponseMetaConfidenceInfoAnnotationsEventType = "EVENT"
const AttackLayer3TimeseriesGroupBitrateResponseMetaConfidenceInfoAnnotationsEventTypeGeneral AttackLayer3TimeseriesGroupBitrateResponseMetaConfidenceInfoAnnotationsEventType = "GENERAL"
const AttackLayer3TimeseriesGroupBitrateResponseMetaConfidenceInfoAnnotationsEventTypeOutage AttackLayer3TimeseriesGroupBitrateResponseMetaConfidenceInfoAnnotationsEventType = "OUTAGE"
const AttackLayer3TimeseriesGroupBitrateResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection AttackLayer3TimeseriesGroupBitrateResponseMetaConfidenceInfoAnnotationsEventType = "PARTIAL_PROJECTION"
const AttackLayer3TimeseriesGroupBitrateResponseMetaConfidenceInfoAnnotationsEventTypePipeline AttackLayer3TimeseriesGroupBitrateResponseMetaConfidenceInfoAnnotationsEventType = "PIPELINE"
const AttackLayer3TimeseriesGroupBitrateResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly AttackLayer3TimeseriesGroupBitrateResponseMetaConfidenceInfoAnnotationsEventType = "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 []AttackLayer3TimeseriesGroupBitrateResponseMetaDateRange
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 AttackLayer3TimeseriesGroupBitrateResponseMetaNormalization

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

One of the following:
const AttackLayer3TimeseriesGroupBitrateResponseMetaNormalizationPercentage AttackLayer3TimeseriesGroupBitrateResponseMetaNormalization = "PERCENTAGE"
const AttackLayer3TimeseriesGroupBitrateResponseMetaNormalizationMin0Max AttackLayer3TimeseriesGroupBitrateResponseMetaNormalization = "MIN0_MAX"
const AttackLayer3TimeseriesGroupBitrateResponseMetaNormalizationMinMax AttackLayer3TimeseriesGroupBitrateResponseMetaNormalization = "MIN_MAX"
const AttackLayer3TimeseriesGroupBitrateResponseMetaNormalizationRawValues AttackLayer3TimeseriesGroupBitrateResponseMetaNormalization = "RAW_VALUES"
const AttackLayer3TimeseriesGroupBitrateResponseMetaNormalizationPercentageChange AttackLayer3TimeseriesGroupBitrateResponseMetaNormalization = "PERCENTAGE_CHANGE"
const AttackLayer3TimeseriesGroupBitrateResponseMetaNormalizationRollingAverage AttackLayer3TimeseriesGroupBitrateResponseMetaNormalization = "ROLLING_AVERAGE"
const AttackLayer3TimeseriesGroupBitrateResponseMetaNormalizationOverlappedPercentage AttackLayer3TimeseriesGroupBitrateResponseMetaNormalization = "OVERLAPPED_PERCENTAGE"
const AttackLayer3TimeseriesGroupBitrateResponseMetaNormalizationRatio AttackLayer3TimeseriesGroupBitrateResponseMetaNormalization = "RATIO"
Units []AttackLayer3TimeseriesGroupBitrateResponseMetaUnit

Measurement units for the results.

Name string
Value string
Serie0 AttackLayer3TimeseriesGroupBitrateResponseSerie0
OneGBPSToTenGBPS []string
TenGBPSToOneHundredGBPS []string
FiveHundredMBPSToOneGBPS []string
Over100GBPS []string
Timestamps []Time
Under500MBPS []string

Get layer 3 attacks by bitrate time series

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.TimeseriesGroups.Bitrate(context.TODO(), radar.AttackLayer3TimeseriesGroupBitrateParams{

  })
  if err != nil {
    panic(err.Error())
  }
  fmt.Printf("%+v\n", response.Meta)
}
{
  "result": {
    "meta": {
      "aggInterval": "FIFTEEN_MINUTES",
      "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"
        }
      ]
    },
    "serie_0": {
      "_1_GBPS_TO_10_GBPS": [
        "10"
      ],
      "_10_GBPS_TO_100_GBPS": [
        "10"
      ],
      "_500_MBPS_TO_1_GBPS": [
        "10"
      ],
      "OVER_100_GBPS": [
        "10"
      ],
      "timestamps": [
        "2019-12-27T18:11:19.117Z"
      ],
      "UNDER_500_MBPS": [
        "10"
      ]
    }
  },
  "success": true
}
Returns Examples
{
  "result": {
    "meta": {
      "aggInterval": "FIFTEEN_MINUTES",
      "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"
        }
      ]
    },
    "serie_0": {
      "_1_GBPS_TO_10_GBPS": [
        "10"
      ],
      "_10_GBPS_TO_100_GBPS": [
        "10"
      ],
      "_500_MBPS_TO_1_GBPS": [
        "10"
      ],
      "OVER_100_GBPS": [
        "10"
      ],
      "timestamps": [
        "2019-12-27T18:11:19.117Z"
      ],
      "UNDER_500_MBPS": [
        "10"
      ]
    }
  },
  "success": true
}