# Attacks # Layer3 ## Get layer 3 attacks summary by dimension `client.Radar.Attacks.Layer3.SummaryV2(ctx, dimension, query) (*AttackLayer3SummaryV2Response, error)` **get** `/radar/attacks/layer3/summary/{dimension}` Retrieves the distribution of layer 3 attacks by the specified dimension. ### Parameters - `dimension AttackLayer3SummaryV2ParamsDimension` Specifies the attribute by which to group the results. - `const AttackLayer3SummaryV2ParamsDimensionProtocol AttackLayer3SummaryV2ParamsDimension = "PROTOCOL"` - `const AttackLayer3SummaryV2ParamsDimensionIPVersion AttackLayer3SummaryV2ParamsDimension = "IP_VERSION"` - `const AttackLayer3SummaryV2ParamsDimensionVector AttackLayer3SummaryV2ParamsDimension = "VECTOR"` - `const AttackLayer3SummaryV2ParamsDimensionDuration AttackLayer3SummaryV2ParamsDimension = "DURATION"` - `const AttackLayer3SummaryV2ParamsDimensionBitrate AttackLayer3SummaryV2ParamsDimension = "BITRATE"` - `const AttackLayer3SummaryV2ParamsDimensionVertical AttackLayer3SummaryV2ParamsDimension = "VERTICAL"` - `const AttackLayer3SummaryV2ParamsDimensionIndustry AttackLayer3SummaryV2ParamsDimension = "INDUSTRY"` - `query AttackLayer3SummaryV2Params` - `Continent param.Field[[]string]` 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]` End of the date range (inclusive). - `DateRange param.Field[[]string]` 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]` Start of the date range. - `Direction param.Field[AttackLayer3SummaryV2ParamsDirection]` Specifies whether the `location` filter applies to the source or target location. - `const AttackLayer3SummaryV2ParamsDirectionOrigin AttackLayer3SummaryV2ParamsDirection = "ORIGIN"` - `const AttackLayer3SummaryV2ParamsDirectionTarget AttackLayer3SummaryV2ParamsDirection = "TARGET"` - `Format param.Field[AttackLayer3SummaryV2ParamsFormat]` Format in which results will be returned. - `const AttackLayer3SummaryV2ParamsFormatJson AttackLayer3SummaryV2ParamsFormat = "JSON"` - `const AttackLayer3SummaryV2ParamsFormatCsv AttackLayer3SummaryV2ParamsFormat = "CSV"` - `IPVersion param.Field[[]AttackLayer3SummaryV2ParamsIPVersion]` Filters results by IP version (Ipv4 vs. IPv6). - `const AttackLayer3SummaryV2ParamsIPVersionIPv4 AttackLayer3SummaryV2ParamsIPVersion = "IPv4"` - `const AttackLayer3SummaryV2ParamsIPVersionIPv6 AttackLayer3SummaryV2ParamsIPVersion = "IPv6"` - `LimitPerGroup param.Field[int64]` 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]` 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]` Array of names used to label the series in the response. - `Protocol param.Field[[]AttackLayer3SummaryV2ParamsProtocol]` Filters the results by layer 3/4 protocol. - `const AttackLayer3SummaryV2ParamsProtocolUdp AttackLayer3SummaryV2ParamsProtocol = "UDP"` - `const AttackLayer3SummaryV2ParamsProtocolTCP AttackLayer3SummaryV2ParamsProtocol = "TCP"` - `const AttackLayer3SummaryV2ParamsProtocolIcmp AttackLayer3SummaryV2ParamsProtocol = "ICMP"` - `const AttackLayer3SummaryV2ParamsProtocolGRE AttackLayer3SummaryV2ParamsProtocol = "GRE"` ### Returns - `type AttackLayer3SummaryV2Response struct{…}` - `Meta AttackLayer3SummaryV2ResponseMeta` Metadata for the results. - `ConfidenceInfo AttackLayer3SummaryV2ResponseMetaConfidenceInfo` - `Annotations []AttackLayer3SummaryV2ResponseMetaConfidenceInfoAnnotation` - `DataSource AttackLayer3SummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource` Data source for annotations. - `const AttackLayer3SummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceAll AttackLayer3SummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "ALL"` - `const AttackLayer3SummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceAIBots AttackLayer3SummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "AI_BOTS"` - `const AttackLayer3SummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway AttackLayer3SummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "AI_GATEWAY"` - `const AttackLayer3SummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceBGP AttackLayer3SummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "BGP"` - `const AttackLayer3SummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceBots AttackLayer3SummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "BOTS"` - `const AttackLayer3SummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly AttackLayer3SummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "CONNECTION_ANOMALY"` - `const AttackLayer3SummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceCT AttackLayer3SummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "CT"` - `const AttackLayer3SummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceDNS AttackLayer3SummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "DNS"` - `const AttackLayer3SummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude AttackLayer3SummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_MAGNITUDE"` - `const AttackLayer3SummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112 AttackLayer3SummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_AS112"` - `const AttackLayer3SummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceDos AttackLayer3SummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "DOS"` - `const AttackLayer3SummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting AttackLayer3SummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_ROUTING"` - `const AttackLayer3SummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity AttackLayer3SummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_SECURITY"` - `const AttackLayer3SummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceFw AttackLayer3SummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "FW"` - `const AttackLayer3SummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceFwPg AttackLayer3SummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "FW_PG"` - `const AttackLayer3SummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceHTTP AttackLayer3SummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP"` - `const AttackLayer3SummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl AttackLayer3SummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CONTROL"` - `const AttackLayer3SummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer AttackLayer3SummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CRAWLER_REFERER"` - `const AttackLayer3SummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins AttackLayer3SummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_ORIGINS"` - `const AttackLayer3SummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceIQI AttackLayer3SummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "IQI"` - `const AttackLayer3SummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials AttackLayer3SummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "LEAKED_CREDENTIALS"` - `const AttackLayer3SummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceNet AttackLayer3SummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "NET"` - `const AttackLayer3SummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT AttackLayer3SummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "ROBOTS_TXT"` - `const AttackLayer3SummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceSpeed AttackLayer3SummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "SPEED"` - `const AttackLayer3SummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI AttackLayer3SummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "WORKERS_AI"` - `Description string` - `EndDate Time` - `EventType AttackLayer3SummaryV2ResponseMetaConfidenceInfoAnnotationsEventType` Event type for annotations. - `const AttackLayer3SummaryV2ResponseMetaConfidenceInfoAnnotationsEventTypeEvent AttackLayer3SummaryV2ResponseMetaConfidenceInfoAnnotationsEventType = "EVENT"` - `const AttackLayer3SummaryV2ResponseMetaConfidenceInfoAnnotationsEventTypeGeneral AttackLayer3SummaryV2ResponseMetaConfidenceInfoAnnotationsEventType = "GENERAL"` - `const AttackLayer3SummaryV2ResponseMetaConfidenceInfoAnnotationsEventTypeOutage AttackLayer3SummaryV2ResponseMetaConfidenceInfoAnnotationsEventType = "OUTAGE"` - `const AttackLayer3SummaryV2ResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection AttackLayer3SummaryV2ResponseMetaConfidenceInfoAnnotationsEventType = "PARTIAL_PROJECTION"` - `const AttackLayer3SummaryV2ResponseMetaConfidenceInfoAnnotationsEventTypePipeline AttackLayer3SummaryV2ResponseMetaConfidenceInfoAnnotationsEventType = "PIPELINE"` - `const AttackLayer3SummaryV2ResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly AttackLayer3SummaryV2ResponseMetaConfidenceInfoAnnotationsEventType = "TRAFFIC_ANOMALY"` - `IsInstantaneous bool` Whether event is a single point in time or a time range. - `LinkedURL string` - `StartDate Time` - `Level int64` Provides an indication of how much confidence Cloudflare has in the data. - `DateRange []AttackLayer3SummaryV2ResponseMetaDateRange` - `EndTime Time` Adjusted end of date range. - `StartTime Time` Adjusted start of date range. - `LastUpdated Time` Timestamp of the last dataset update. - `Normalization AttackLayer3SummaryV2ResponseMetaNormalization` Normalization method applied to the results. Refer to [Normalization methods](https://developers.cloudflare.com/radar/concepts/normalization/). - `const AttackLayer3SummaryV2ResponseMetaNormalizationPercentage AttackLayer3SummaryV2ResponseMetaNormalization = "PERCENTAGE"` - `const AttackLayer3SummaryV2ResponseMetaNormalizationMin0Max AttackLayer3SummaryV2ResponseMetaNormalization = "MIN0_MAX"` - `const AttackLayer3SummaryV2ResponseMetaNormalizationMinMax AttackLayer3SummaryV2ResponseMetaNormalization = "MIN_MAX"` - `const AttackLayer3SummaryV2ResponseMetaNormalizationRawValues AttackLayer3SummaryV2ResponseMetaNormalization = "RAW_VALUES"` - `const AttackLayer3SummaryV2ResponseMetaNormalizationPercentageChange AttackLayer3SummaryV2ResponseMetaNormalization = "PERCENTAGE_CHANGE"` - `const AttackLayer3SummaryV2ResponseMetaNormalizationRollingAverage AttackLayer3SummaryV2ResponseMetaNormalization = "ROLLING_AVERAGE"` - `const AttackLayer3SummaryV2ResponseMetaNormalizationOverlappedPercentage AttackLayer3SummaryV2ResponseMetaNormalization = "OVERLAPPED_PERCENTAGE"` - `const AttackLayer3SummaryV2ResponseMetaNormalizationRatio AttackLayer3SummaryV2ResponseMetaNormalization = "RATIO"` - `Units []AttackLayer3SummaryV2ResponseMetaUnit` Measurement units for the results. - `Name string` - `Value string` - `Summary0 map[string, string]` ### Example ```go 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.SummaryV2( context.TODO(), radar.AttackLayer3SummaryV2ParamsDimensionProtocol, radar.AttackLayer3SummaryV2Params{ }, ) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", response.Meta) } ``` #### Response ```json { "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": { "TCP": "50.168733", "UDP": "25.084366" } }, "success": true } ``` ## Get layer 3 attacks by bytes time series `client.Radar.Attacks.Layer3.Timeseries(ctx, query) (*AttackLayer3TimeseriesResponse, error)` **get** `/radar/attacks/layer3/timeseries` Retrieves layer 3 attacks over time. ### Parameters - `query AttackLayer3TimeseriesParams` - `AggInterval param.Field[AttackLayer3TimeseriesParamsAggInterval]` Aggregation interval of the results (e.g., in 15 minutes or 1 hour intervals). Refer to [Aggregation intervals](https://developers.cloudflare.com/radar/concepts/aggregation-intervals/). - `const AttackLayer3TimeseriesParamsAggInterval15m AttackLayer3TimeseriesParamsAggInterval = "15m"` - `const AttackLayer3TimeseriesParamsAggInterval1h AttackLayer3TimeseriesParamsAggInterval = "1h"` - `const AttackLayer3TimeseriesParamsAggInterval1d AttackLayer3TimeseriesParamsAggInterval = "1d"` - `const AttackLayer3TimeseriesParamsAggInterval1w AttackLayer3TimeseriesParamsAggInterval = "1w"` - `ASN param.Field[[]string]` Filters results by Autonomous System. Specify one or more Autonomous System Numbers (ASNs) as a comma-separated list. Prefix with `-` to exclude ASNs from results. For example, `-174, 3356` excludes results from AS174, but includes results from AS3356. - `Continent param.Field[[]string]` 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]` End of the date range (inclusive). - `DateRange param.Field[[]string]` 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]` Start of the date range. - `Direction param.Field[AttackLayer3TimeseriesParamsDirection]` Specifies whether the `location` filter applies to the source or target location. - `const AttackLayer3TimeseriesParamsDirectionOrigin AttackLayer3TimeseriesParamsDirection = "ORIGIN"` - `const AttackLayer3TimeseriesParamsDirectionTarget AttackLayer3TimeseriesParamsDirection = "TARGET"` - `Format param.Field[AttackLayer3TimeseriesParamsFormat]` Format in which results will be returned. - `const AttackLayer3TimeseriesParamsFormatJson AttackLayer3TimeseriesParamsFormat = "JSON"` - `const AttackLayer3TimeseriesParamsFormatCsv AttackLayer3TimeseriesParamsFormat = "CSV"` - `IPVersion param.Field[[]AttackLayer3TimeseriesParamsIPVersion]` Filters results by IP version (Ipv4 vs. IPv6). - `const AttackLayer3TimeseriesParamsIPVersionIPv4 AttackLayer3TimeseriesParamsIPVersion = "IPv4"` - `const AttackLayer3TimeseriesParamsIPVersionIPv6 AttackLayer3TimeseriesParamsIPVersion = "IPv6"` - `Location param.Field[[]string]` 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. - `Metric param.Field[AttackLayer3TimeseriesParamsMetric]` Measurement units, eg. bytes. - `const AttackLayer3TimeseriesParamsMetricBytes AttackLayer3TimeseriesParamsMetric = "BYTES"` - `const AttackLayer3TimeseriesParamsMetricBytesOld AttackLayer3TimeseriesParamsMetric = "BYTES_OLD"` - `Name param.Field[[]string]` Array of names used to label the series in the response. - `Normalization param.Field[AttackLayer3TimeseriesParamsNormalization]` Normalization method applied to the results. Refer to [Normalization methods](https://developers.cloudflare.com/radar/concepts/normalization/). - `const AttackLayer3TimeseriesParamsNormalizationPercentageChange AttackLayer3TimeseriesParamsNormalization = "PERCENTAGE_CHANGE"` - `const AttackLayer3TimeseriesParamsNormalizationMin0Max AttackLayer3TimeseriesParamsNormalization = "MIN0_MAX"` - `Protocol param.Field[[]AttackLayer3TimeseriesParamsProtocol]` Filters the results by layer 3/4 protocol. - `const AttackLayer3TimeseriesParamsProtocolUdp AttackLayer3TimeseriesParamsProtocol = "UDP"` - `const AttackLayer3TimeseriesParamsProtocolTCP AttackLayer3TimeseriesParamsProtocol = "TCP"` - `const AttackLayer3TimeseriesParamsProtocolIcmp AttackLayer3TimeseriesParamsProtocol = "ICMP"` - `const AttackLayer3TimeseriesParamsProtocolGRE AttackLayer3TimeseriesParamsProtocol = "GRE"` ### Returns - `type AttackLayer3TimeseriesResponse struct{…}` - `Meta AttackLayer3TimeseriesResponseMeta` Metadata for the results. - `AggInterval AttackLayer3TimeseriesResponseMetaAggInterval` Aggregation interval of the results (e.g., in 15 minutes or 1 hour intervals). Refer to [Aggregation intervals](https://developers.cloudflare.com/radar/concepts/aggregation-intervals/). - `const AttackLayer3TimeseriesResponseMetaAggIntervalFifteenMinutes AttackLayer3TimeseriesResponseMetaAggInterval = "FIFTEEN_MINUTES"` - `const AttackLayer3TimeseriesResponseMetaAggIntervalOneHour AttackLayer3TimeseriesResponseMetaAggInterval = "ONE_HOUR"` - `const AttackLayer3TimeseriesResponseMetaAggIntervalOneDay AttackLayer3TimeseriesResponseMetaAggInterval = "ONE_DAY"` - `const AttackLayer3TimeseriesResponseMetaAggIntervalOneWeek AttackLayer3TimeseriesResponseMetaAggInterval = "ONE_WEEK"` - `const AttackLayer3TimeseriesResponseMetaAggIntervalOneMonth AttackLayer3TimeseriesResponseMetaAggInterval = "ONE_MONTH"` - `ConfidenceInfo AttackLayer3TimeseriesResponseMetaConfidenceInfo` - `Annotations []AttackLayer3TimeseriesResponseMetaConfidenceInfoAnnotation` - `DataSource AttackLayer3TimeseriesResponseMetaConfidenceInfoAnnotationsDataSource` Data source for annotations. - `const AttackLayer3TimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceAll AttackLayer3TimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "ALL"` - `const AttackLayer3TimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceAIBots AttackLayer3TimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "AI_BOTS"` - `const AttackLayer3TimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway AttackLayer3TimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "AI_GATEWAY"` - `const AttackLayer3TimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceBGP AttackLayer3TimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "BGP"` - `const AttackLayer3TimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceBots AttackLayer3TimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "BOTS"` - `const AttackLayer3TimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly AttackLayer3TimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "CONNECTION_ANOMALY"` - `const AttackLayer3TimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceCT AttackLayer3TimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "CT"` - `const AttackLayer3TimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceDNS AttackLayer3TimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "DNS"` - `const AttackLayer3TimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude AttackLayer3TimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_MAGNITUDE"` - `const AttackLayer3TimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112 AttackLayer3TimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_AS112"` - `const AttackLayer3TimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceDos AttackLayer3TimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "DOS"` - `const AttackLayer3TimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting AttackLayer3TimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_ROUTING"` - `const AttackLayer3TimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity AttackLayer3TimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_SECURITY"` - `const AttackLayer3TimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceFw AttackLayer3TimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "FW"` - `const AttackLayer3TimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceFwPg AttackLayer3TimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "FW_PG"` - `const AttackLayer3TimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceHTTP AttackLayer3TimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP"` - `const AttackLayer3TimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl AttackLayer3TimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CONTROL"` - `const AttackLayer3TimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer AttackLayer3TimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CRAWLER_REFERER"` - `const AttackLayer3TimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins AttackLayer3TimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_ORIGINS"` - `const AttackLayer3TimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceIQI AttackLayer3TimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "IQI"` - `const AttackLayer3TimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials AttackLayer3TimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "LEAKED_CREDENTIALS"` - `const AttackLayer3TimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceNet AttackLayer3TimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "NET"` - `const AttackLayer3TimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT AttackLayer3TimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "ROBOTS_TXT"` - `const AttackLayer3TimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceSpeed AttackLayer3TimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "SPEED"` - `const AttackLayer3TimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI AttackLayer3TimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "WORKERS_AI"` - `Description string` - `EndDate Time` - `EventType AttackLayer3TimeseriesResponseMetaConfidenceInfoAnnotationsEventType` Event type for annotations. - `const AttackLayer3TimeseriesResponseMetaConfidenceInfoAnnotationsEventTypeEvent AttackLayer3TimeseriesResponseMetaConfidenceInfoAnnotationsEventType = "EVENT"` - `const AttackLayer3TimeseriesResponseMetaConfidenceInfoAnnotationsEventTypeGeneral AttackLayer3TimeseriesResponseMetaConfidenceInfoAnnotationsEventType = "GENERAL"` - `const AttackLayer3TimeseriesResponseMetaConfidenceInfoAnnotationsEventTypeOutage AttackLayer3TimeseriesResponseMetaConfidenceInfoAnnotationsEventType = "OUTAGE"` - `const AttackLayer3TimeseriesResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection AttackLayer3TimeseriesResponseMetaConfidenceInfoAnnotationsEventType = "PARTIAL_PROJECTION"` - `const AttackLayer3TimeseriesResponseMetaConfidenceInfoAnnotationsEventTypePipeline AttackLayer3TimeseriesResponseMetaConfidenceInfoAnnotationsEventType = "PIPELINE"` - `const AttackLayer3TimeseriesResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly AttackLayer3TimeseriesResponseMetaConfidenceInfoAnnotationsEventType = "TRAFFIC_ANOMALY"` - `IsInstantaneous bool` Whether event is a single point in time or a time range. - `LinkedURL string` - `StartDate Time` - `Level int64` Provides an indication of how much confidence Cloudflare has in the data. - `DateRange []AttackLayer3TimeseriesResponseMetaDateRange` - `EndTime Time` Adjusted end of date range. - `StartTime Time` Adjusted start of date range. - `LastUpdated Time` Timestamp of the last dataset update. - `Normalization AttackLayer3TimeseriesResponseMetaNormalization` Normalization method applied to the results. Refer to [Normalization methods](https://developers.cloudflare.com/radar/concepts/normalization/). - `const AttackLayer3TimeseriesResponseMetaNormalizationPercentage AttackLayer3TimeseriesResponseMetaNormalization = "PERCENTAGE"` - `const AttackLayer3TimeseriesResponseMetaNormalizationMin0Max AttackLayer3TimeseriesResponseMetaNormalization = "MIN0_MAX"` - `const AttackLayer3TimeseriesResponseMetaNormalizationMinMax AttackLayer3TimeseriesResponseMetaNormalization = "MIN_MAX"` - `const AttackLayer3TimeseriesResponseMetaNormalizationRawValues AttackLayer3TimeseriesResponseMetaNormalization = "RAW_VALUES"` - `const AttackLayer3TimeseriesResponseMetaNormalizationPercentageChange AttackLayer3TimeseriesResponseMetaNormalization = "PERCENTAGE_CHANGE"` - `const AttackLayer3TimeseriesResponseMetaNormalizationRollingAverage AttackLayer3TimeseriesResponseMetaNormalization = "ROLLING_AVERAGE"` - `const AttackLayer3TimeseriesResponseMetaNormalizationOverlappedPercentage AttackLayer3TimeseriesResponseMetaNormalization = "OVERLAPPED_PERCENTAGE"` - `const AttackLayer3TimeseriesResponseMetaNormalizationRatio AttackLayer3TimeseriesResponseMetaNormalization = "RATIO"` - `Units []AttackLayer3TimeseriesResponseMetaUnit` Measurement units for the results. - `Name string` - `Value string` ### Example ```go 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.Timeseries(context.TODO(), radar.AttackLayer3TimeseriesParams{ }) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", response.Meta) } ``` #### Response ```json { "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" } ] } }, "success": true } ``` ## Get layer 3 attacks time series grouped by dimension `client.Radar.Attacks.Layer3.TimeseriesGroupsV2(ctx, dimension, query) (*AttackLayer3TimeseriesGroupsV2Response, error)` **get** `/radar/attacks/layer3/timeseries_groups/{dimension}` Retrieves the distribution of layer 3 attacks grouped by dimension over time. ### Parameters - `dimension AttackLayer3TimeseriesGroupsV2ParamsDimension` Specifies the attribute by which to group the results. - `const AttackLayer3TimeseriesGroupsV2ParamsDimensionProtocol AttackLayer3TimeseriesGroupsV2ParamsDimension = "PROTOCOL"` - `const AttackLayer3TimeseriesGroupsV2ParamsDimensionIPVersion AttackLayer3TimeseriesGroupsV2ParamsDimension = "IP_VERSION"` - `const AttackLayer3TimeseriesGroupsV2ParamsDimensionVector AttackLayer3TimeseriesGroupsV2ParamsDimension = "VECTOR"` - `const AttackLayer3TimeseriesGroupsV2ParamsDimensionDuration AttackLayer3TimeseriesGroupsV2ParamsDimension = "DURATION"` - `const AttackLayer3TimeseriesGroupsV2ParamsDimensionBitrate AttackLayer3TimeseriesGroupsV2ParamsDimension = "BITRATE"` - `const AttackLayer3TimeseriesGroupsV2ParamsDimensionVertical AttackLayer3TimeseriesGroupsV2ParamsDimension = "VERTICAL"` - `const AttackLayer3TimeseriesGroupsV2ParamsDimensionIndustry AttackLayer3TimeseriesGroupsV2ParamsDimension = "INDUSTRY"` - `query AttackLayer3TimeseriesGroupsV2Params` - `AggInterval param.Field[AttackLayer3TimeseriesGroupsV2ParamsAggInterval]` Aggregation interval of the results (e.g., in 15 minutes or 1 hour intervals). Refer to [Aggregation intervals](https://developers.cloudflare.com/radar/concepts/aggregation-intervals/). - `const AttackLayer3TimeseriesGroupsV2ParamsAggInterval15m AttackLayer3TimeseriesGroupsV2ParamsAggInterval = "15m"` - `const AttackLayer3TimeseriesGroupsV2ParamsAggInterval1h AttackLayer3TimeseriesGroupsV2ParamsAggInterval = "1h"` - `const AttackLayer3TimeseriesGroupsV2ParamsAggInterval1d AttackLayer3TimeseriesGroupsV2ParamsAggInterval = "1d"` - `const AttackLayer3TimeseriesGroupsV2ParamsAggInterval1w AttackLayer3TimeseriesGroupsV2ParamsAggInterval = "1w"` - `Continent param.Field[[]string]` 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]` End of the date range (inclusive). - `DateRange param.Field[[]string]` 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]` Start of the date range. - `Direction param.Field[AttackLayer3TimeseriesGroupsV2ParamsDirection]` Specifies whether the `location` filter applies to the source or target location. - `const AttackLayer3TimeseriesGroupsV2ParamsDirectionOrigin AttackLayer3TimeseriesGroupsV2ParamsDirection = "ORIGIN"` - `const AttackLayer3TimeseriesGroupsV2ParamsDirectionTarget AttackLayer3TimeseriesGroupsV2ParamsDirection = "TARGET"` - `Format param.Field[AttackLayer3TimeseriesGroupsV2ParamsFormat]` Format in which results will be returned. - `const AttackLayer3TimeseriesGroupsV2ParamsFormatJson AttackLayer3TimeseriesGroupsV2ParamsFormat = "JSON"` - `const AttackLayer3TimeseriesGroupsV2ParamsFormatCsv AttackLayer3TimeseriesGroupsV2ParamsFormat = "CSV"` - `IPVersion param.Field[[]AttackLayer3TimeseriesGroupsV2ParamsIPVersion]` Filters results by IP version (Ipv4 vs. IPv6). - `const AttackLayer3TimeseriesGroupsV2ParamsIPVersionIPv4 AttackLayer3TimeseriesGroupsV2ParamsIPVersion = "IPv4"` - `const AttackLayer3TimeseriesGroupsV2ParamsIPVersionIPv6 AttackLayer3TimeseriesGroupsV2ParamsIPVersion = "IPv6"` - `LimitPerGroup param.Field[int64]` 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]` 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]` Array of names used to label the series in the response. - `Normalization param.Field[AttackLayer3TimeseriesGroupsV2ParamsNormalization]` Normalization method applied to the results. Refer to [Normalization methods](https://developers.cloudflare.com/radar/concepts/normalization/). - `const AttackLayer3TimeseriesGroupsV2ParamsNormalizationPercentage AttackLayer3TimeseriesGroupsV2ParamsNormalization = "PERCENTAGE"` - `const AttackLayer3TimeseriesGroupsV2ParamsNormalizationMin0Max AttackLayer3TimeseriesGroupsV2ParamsNormalization = "MIN0_MAX"` - `Protocol param.Field[[]AttackLayer3TimeseriesGroupsV2ParamsProtocol]` Filters the results by layer 3/4 protocol. - `const AttackLayer3TimeseriesGroupsV2ParamsProtocolUdp AttackLayer3TimeseriesGroupsV2ParamsProtocol = "UDP"` - `const AttackLayer3TimeseriesGroupsV2ParamsProtocolTCP AttackLayer3TimeseriesGroupsV2ParamsProtocol = "TCP"` - `const AttackLayer3TimeseriesGroupsV2ParamsProtocolIcmp AttackLayer3TimeseriesGroupsV2ParamsProtocol = "ICMP"` - `const AttackLayer3TimeseriesGroupsV2ParamsProtocolGRE AttackLayer3TimeseriesGroupsV2ParamsProtocol = "GRE"` ### Returns - `type AttackLayer3TimeseriesGroupsV2Response struct{…}` - `Meta AttackLayer3TimeseriesGroupsV2ResponseMeta` Metadata for the results. - `AggInterval AttackLayer3TimeseriesGroupsV2ResponseMetaAggInterval` Aggregation interval of the results (e.g., in 15 minutes or 1 hour intervals). Refer to [Aggregation intervals](https://developers.cloudflare.com/radar/concepts/aggregation-intervals/). - `const AttackLayer3TimeseriesGroupsV2ResponseMetaAggIntervalFifteenMinutes AttackLayer3TimeseriesGroupsV2ResponseMetaAggInterval = "FIFTEEN_MINUTES"` - `const AttackLayer3TimeseriesGroupsV2ResponseMetaAggIntervalOneHour AttackLayer3TimeseriesGroupsV2ResponseMetaAggInterval = "ONE_HOUR"` - `const AttackLayer3TimeseriesGroupsV2ResponseMetaAggIntervalOneDay AttackLayer3TimeseriesGroupsV2ResponseMetaAggInterval = "ONE_DAY"` - `const AttackLayer3TimeseriesGroupsV2ResponseMetaAggIntervalOneWeek AttackLayer3TimeseriesGroupsV2ResponseMetaAggInterval = "ONE_WEEK"` - `const AttackLayer3TimeseriesGroupsV2ResponseMetaAggIntervalOneMonth AttackLayer3TimeseriesGroupsV2ResponseMetaAggInterval = "ONE_MONTH"` - `ConfidenceInfo AttackLayer3TimeseriesGroupsV2ResponseMetaConfidenceInfo` - `Annotations []AttackLayer3TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotation` - `DataSource AttackLayer3TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSource` Data source for annotations. - `const AttackLayer3TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceAll AttackLayer3TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSource = "ALL"` - `const AttackLayer3TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceAIBots AttackLayer3TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSource = "AI_BOTS"` - `const AttackLayer3TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway AttackLayer3TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSource = "AI_GATEWAY"` - `const AttackLayer3TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceBGP AttackLayer3TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSource = "BGP"` - `const AttackLayer3TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceBots AttackLayer3TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSource = "BOTS"` - `const AttackLayer3TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly AttackLayer3TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSource = "CONNECTION_ANOMALY"` - `const AttackLayer3TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceCT AttackLayer3TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSource = "CT"` - `const AttackLayer3TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceDNS AttackLayer3TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSource = "DNS"` - `const AttackLayer3TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude AttackLayer3TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_MAGNITUDE"` - `const AttackLayer3TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112 AttackLayer3TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_AS112"` - `const AttackLayer3TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceDos AttackLayer3TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSource = "DOS"` - `const AttackLayer3TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting AttackLayer3TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_ROUTING"` - `const AttackLayer3TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity AttackLayer3TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_SECURITY"` - `const AttackLayer3TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceFw AttackLayer3TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSource = "FW"` - `const AttackLayer3TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceFwPg AttackLayer3TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSource = "FW_PG"` - `const AttackLayer3TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceHTTP AttackLayer3TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP"` - `const AttackLayer3TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl AttackLayer3TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CONTROL"` - `const AttackLayer3TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer AttackLayer3TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CRAWLER_REFERER"` - `const AttackLayer3TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins AttackLayer3TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_ORIGINS"` - `const AttackLayer3TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceIQI AttackLayer3TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSource = "IQI"` - `const AttackLayer3TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials AttackLayer3TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSource = "LEAKED_CREDENTIALS"` - `const AttackLayer3TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceNet AttackLayer3TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSource = "NET"` - `const AttackLayer3TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT AttackLayer3TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSource = "ROBOTS_TXT"` - `const AttackLayer3TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceSpeed AttackLayer3TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSource = "SPEED"` - `const AttackLayer3TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI AttackLayer3TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSource = "WORKERS_AI"` - `Description string` - `EndDate Time` - `EventType AttackLayer3TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsEventType` Event type for annotations. - `const AttackLayer3TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsEventTypeEvent AttackLayer3TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsEventType = "EVENT"` - `const AttackLayer3TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsEventTypeGeneral AttackLayer3TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsEventType = "GENERAL"` - `const AttackLayer3TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsEventTypeOutage AttackLayer3TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsEventType = "OUTAGE"` - `const AttackLayer3TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection AttackLayer3TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsEventType = "PARTIAL_PROJECTION"` - `const AttackLayer3TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsEventTypePipeline AttackLayer3TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsEventType = "PIPELINE"` - `const AttackLayer3TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly AttackLayer3TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsEventType = "TRAFFIC_ANOMALY"` - `IsInstantaneous bool` Whether event is a single point in time or a time range. - `LinkedURL string` - `StartDate Time` - `Level int64` Provides an indication of how much confidence Cloudflare has in the data. - `DateRange []AttackLayer3TimeseriesGroupsV2ResponseMetaDateRange` - `EndTime Time` Adjusted end of date range. - `StartTime Time` Adjusted start of date range. - `LastUpdated Time` Timestamp of the last dataset update. - `Normalization AttackLayer3TimeseriesGroupsV2ResponseMetaNormalization` Normalization method applied to the results. Refer to [Normalization methods](https://developers.cloudflare.com/radar/concepts/normalization/). - `const AttackLayer3TimeseriesGroupsV2ResponseMetaNormalizationPercentage AttackLayer3TimeseriesGroupsV2ResponseMetaNormalization = "PERCENTAGE"` - `const AttackLayer3TimeseriesGroupsV2ResponseMetaNormalizationMin0Max AttackLayer3TimeseriesGroupsV2ResponseMetaNormalization = "MIN0_MAX"` - `const AttackLayer3TimeseriesGroupsV2ResponseMetaNormalizationMinMax AttackLayer3TimeseriesGroupsV2ResponseMetaNormalization = "MIN_MAX"` - `const AttackLayer3TimeseriesGroupsV2ResponseMetaNormalizationRawValues AttackLayer3TimeseriesGroupsV2ResponseMetaNormalization = "RAW_VALUES"` - `const AttackLayer3TimeseriesGroupsV2ResponseMetaNormalizationPercentageChange AttackLayer3TimeseriesGroupsV2ResponseMetaNormalization = "PERCENTAGE_CHANGE"` - `const AttackLayer3TimeseriesGroupsV2ResponseMetaNormalizationRollingAverage AttackLayer3TimeseriesGroupsV2ResponseMetaNormalization = "ROLLING_AVERAGE"` - `const AttackLayer3TimeseriesGroupsV2ResponseMetaNormalizationOverlappedPercentage AttackLayer3TimeseriesGroupsV2ResponseMetaNormalization = "OVERLAPPED_PERCENTAGE"` - `const AttackLayer3TimeseriesGroupsV2ResponseMetaNormalizationRatio AttackLayer3TimeseriesGroupsV2ResponseMetaNormalization = "RATIO"` - `Units []AttackLayer3TimeseriesGroupsV2ResponseMetaUnit` Measurement units for the results. - `Name string` - `Value string` - `Serie0 AttackLayer3TimeseriesGroupsV2ResponseSerie0` - `Timestamps []Time` ### Example ```go 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.TimeseriesGroupsV2( context.TODO(), radar.AttackLayer3TimeseriesGroupsV2ParamsDimensionProtocol, radar.AttackLayer3TimeseriesGroupsV2Params{ }, ) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", response.Meta) } ``` #### Response ```json { "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": { "timestamps": [ "2023-08-08T10:15:00Z" ] } }, "success": true } ``` # Summary ## Get layer 3 attacks by bitrate summary `client.Radar.Attacks.Layer3.Summary.Bitrate(ctx, query) (*AttackLayer3SummaryBitrateResponse, error)` **get** `/radar/attacks/layer3/summary/bitrate` Retrieves the distribution of layer 3 attacks by bitrate. ### Parameters - `query AttackLayer3SummaryBitrateParams` - `Continent param.Field[[]string]` 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]` End of the date range (inclusive). - `DateRange param.Field[[]string]` 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]` Start of the date range. - `Direction param.Field[AttackLayer3SummaryBitrateParamsDirection]` Specifies whether the `location` filter applies to the source or target location. - `const AttackLayer3SummaryBitrateParamsDirectionOrigin AttackLayer3SummaryBitrateParamsDirection = "ORIGIN"` - `const AttackLayer3SummaryBitrateParamsDirectionTarget AttackLayer3SummaryBitrateParamsDirection = "TARGET"` - `Format param.Field[AttackLayer3SummaryBitrateParamsFormat]` Format in which results will be returned. - `const AttackLayer3SummaryBitrateParamsFormatJson AttackLayer3SummaryBitrateParamsFormat = "JSON"` - `const AttackLayer3SummaryBitrateParamsFormatCsv AttackLayer3SummaryBitrateParamsFormat = "CSV"` - `IPVersion param.Field[[]AttackLayer3SummaryBitrateParamsIPVersion]` Filters results by IP version (Ipv4 vs. IPv6). - `const AttackLayer3SummaryBitrateParamsIPVersionIPv4 AttackLayer3SummaryBitrateParamsIPVersion = "IPv4"` - `const AttackLayer3SummaryBitrateParamsIPVersionIPv6 AttackLayer3SummaryBitrateParamsIPVersion = "IPv6"` - `Location param.Field[[]string]` 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]` Array of names used to label the series in the response. - `Protocol param.Field[[]AttackLayer3SummaryBitrateParamsProtocol]` Filters the results by layer 3/4 protocol. - `const AttackLayer3SummaryBitrateParamsProtocolUdp AttackLayer3SummaryBitrateParamsProtocol = "UDP"` - `const AttackLayer3SummaryBitrateParamsProtocolTCP AttackLayer3SummaryBitrateParamsProtocol = "TCP"` - `const AttackLayer3SummaryBitrateParamsProtocolIcmp AttackLayer3SummaryBitrateParamsProtocol = "ICMP"` - `const AttackLayer3SummaryBitrateParamsProtocolGRE AttackLayer3SummaryBitrateParamsProtocol = "GRE"` ### Returns - `type AttackLayer3SummaryBitrateResponse struct{…}` - `Meta AttackLayer3SummaryBitrateResponseMeta` Metadata for the results. - `ConfidenceInfo AttackLayer3SummaryBitrateResponseMetaConfidenceInfo` - `Annotations []AttackLayer3SummaryBitrateResponseMetaConfidenceInfoAnnotation` - `DataSource AttackLayer3SummaryBitrateResponseMetaConfidenceInfoAnnotationsDataSource` Data source for annotations. - `const AttackLayer3SummaryBitrateResponseMetaConfidenceInfoAnnotationsDataSourceAll AttackLayer3SummaryBitrateResponseMetaConfidenceInfoAnnotationsDataSource = "ALL"` - `const AttackLayer3SummaryBitrateResponseMetaConfidenceInfoAnnotationsDataSourceAIBots AttackLayer3SummaryBitrateResponseMetaConfidenceInfoAnnotationsDataSource = "AI_BOTS"` - `const AttackLayer3SummaryBitrateResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway AttackLayer3SummaryBitrateResponseMetaConfidenceInfoAnnotationsDataSource = "AI_GATEWAY"` - `const AttackLayer3SummaryBitrateResponseMetaConfidenceInfoAnnotationsDataSourceBGP AttackLayer3SummaryBitrateResponseMetaConfidenceInfoAnnotationsDataSource = "BGP"` - `const AttackLayer3SummaryBitrateResponseMetaConfidenceInfoAnnotationsDataSourceBots AttackLayer3SummaryBitrateResponseMetaConfidenceInfoAnnotationsDataSource = "BOTS"` - `const AttackLayer3SummaryBitrateResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly AttackLayer3SummaryBitrateResponseMetaConfidenceInfoAnnotationsDataSource = "CONNECTION_ANOMALY"` - `const AttackLayer3SummaryBitrateResponseMetaConfidenceInfoAnnotationsDataSourceCT AttackLayer3SummaryBitrateResponseMetaConfidenceInfoAnnotationsDataSource = "CT"` - `const AttackLayer3SummaryBitrateResponseMetaConfidenceInfoAnnotationsDataSourceDNS AttackLayer3SummaryBitrateResponseMetaConfidenceInfoAnnotationsDataSource = "DNS"` - `const AttackLayer3SummaryBitrateResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude AttackLayer3SummaryBitrateResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_MAGNITUDE"` - `const AttackLayer3SummaryBitrateResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112 AttackLayer3SummaryBitrateResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_AS112"` - `const AttackLayer3SummaryBitrateResponseMetaConfidenceInfoAnnotationsDataSourceDos AttackLayer3SummaryBitrateResponseMetaConfidenceInfoAnnotationsDataSource = "DOS"` - `const AttackLayer3SummaryBitrateResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting AttackLayer3SummaryBitrateResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_ROUTING"` - `const AttackLayer3SummaryBitrateResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity AttackLayer3SummaryBitrateResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_SECURITY"` - `const AttackLayer3SummaryBitrateResponseMetaConfidenceInfoAnnotationsDataSourceFw AttackLayer3SummaryBitrateResponseMetaConfidenceInfoAnnotationsDataSource = "FW"` - `const AttackLayer3SummaryBitrateResponseMetaConfidenceInfoAnnotationsDataSourceFwPg AttackLayer3SummaryBitrateResponseMetaConfidenceInfoAnnotationsDataSource = "FW_PG"` - `const AttackLayer3SummaryBitrateResponseMetaConfidenceInfoAnnotationsDataSourceHTTP AttackLayer3SummaryBitrateResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP"` - `const AttackLayer3SummaryBitrateResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl AttackLayer3SummaryBitrateResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CONTROL"` - `const AttackLayer3SummaryBitrateResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer AttackLayer3SummaryBitrateResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CRAWLER_REFERER"` - `const AttackLayer3SummaryBitrateResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins AttackLayer3SummaryBitrateResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_ORIGINS"` - `const AttackLayer3SummaryBitrateResponseMetaConfidenceInfoAnnotationsDataSourceIQI AttackLayer3SummaryBitrateResponseMetaConfidenceInfoAnnotationsDataSource = "IQI"` - `const AttackLayer3SummaryBitrateResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials AttackLayer3SummaryBitrateResponseMetaConfidenceInfoAnnotationsDataSource = "LEAKED_CREDENTIALS"` - `const AttackLayer3SummaryBitrateResponseMetaConfidenceInfoAnnotationsDataSourceNet AttackLayer3SummaryBitrateResponseMetaConfidenceInfoAnnotationsDataSource = "NET"` - `const AttackLayer3SummaryBitrateResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT AttackLayer3SummaryBitrateResponseMetaConfidenceInfoAnnotationsDataSource = "ROBOTS_TXT"` - `const AttackLayer3SummaryBitrateResponseMetaConfidenceInfoAnnotationsDataSourceSpeed AttackLayer3SummaryBitrateResponseMetaConfidenceInfoAnnotationsDataSource = "SPEED"` - `const AttackLayer3SummaryBitrateResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI AttackLayer3SummaryBitrateResponseMetaConfidenceInfoAnnotationsDataSource = "WORKERS_AI"` - `Description string` - `EndDate Time` - `EventType AttackLayer3SummaryBitrateResponseMetaConfidenceInfoAnnotationsEventType` Event type for annotations. - `const AttackLayer3SummaryBitrateResponseMetaConfidenceInfoAnnotationsEventTypeEvent AttackLayer3SummaryBitrateResponseMetaConfidenceInfoAnnotationsEventType = "EVENT"` - `const AttackLayer3SummaryBitrateResponseMetaConfidenceInfoAnnotationsEventTypeGeneral AttackLayer3SummaryBitrateResponseMetaConfidenceInfoAnnotationsEventType = "GENERAL"` - `const AttackLayer3SummaryBitrateResponseMetaConfidenceInfoAnnotationsEventTypeOutage AttackLayer3SummaryBitrateResponseMetaConfidenceInfoAnnotationsEventType = "OUTAGE"` - `const AttackLayer3SummaryBitrateResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection AttackLayer3SummaryBitrateResponseMetaConfidenceInfoAnnotationsEventType = "PARTIAL_PROJECTION"` - `const AttackLayer3SummaryBitrateResponseMetaConfidenceInfoAnnotationsEventTypePipeline AttackLayer3SummaryBitrateResponseMetaConfidenceInfoAnnotationsEventType = "PIPELINE"` - `const AttackLayer3SummaryBitrateResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly AttackLayer3SummaryBitrateResponseMetaConfidenceInfoAnnotationsEventType = "TRAFFIC_ANOMALY"` - `IsInstantaneous bool` Whether event is a single point in time or a time range. - `LinkedURL string` - `StartDate Time` - `Level int64` Provides an indication of how much confidence Cloudflare has in the data. - `DateRange []AttackLayer3SummaryBitrateResponseMetaDateRange` - `EndTime Time` Adjusted end of date range. - `StartTime Time` Adjusted start of date range. - `LastUpdated Time` Timestamp of the last dataset update. - `Normalization AttackLayer3SummaryBitrateResponseMetaNormalization` Normalization method applied to the results. Refer to [Normalization methods](https://developers.cloudflare.com/radar/concepts/normalization/). - `const AttackLayer3SummaryBitrateResponseMetaNormalizationPercentage AttackLayer3SummaryBitrateResponseMetaNormalization = "PERCENTAGE"` - `const AttackLayer3SummaryBitrateResponseMetaNormalizationMin0Max AttackLayer3SummaryBitrateResponseMetaNormalization = "MIN0_MAX"` - `const AttackLayer3SummaryBitrateResponseMetaNormalizationMinMax AttackLayer3SummaryBitrateResponseMetaNormalization = "MIN_MAX"` - `const AttackLayer3SummaryBitrateResponseMetaNormalizationRawValues AttackLayer3SummaryBitrateResponseMetaNormalization = "RAW_VALUES"` - `const AttackLayer3SummaryBitrateResponseMetaNormalizationPercentageChange AttackLayer3SummaryBitrateResponseMetaNormalization = "PERCENTAGE_CHANGE"` - `const AttackLayer3SummaryBitrateResponseMetaNormalizationRollingAverage AttackLayer3SummaryBitrateResponseMetaNormalization = "ROLLING_AVERAGE"` - `const AttackLayer3SummaryBitrateResponseMetaNormalizationOverlappedPercentage AttackLayer3SummaryBitrateResponseMetaNormalization = "OVERLAPPED_PERCENTAGE"` - `const AttackLayer3SummaryBitrateResponseMetaNormalizationRatio AttackLayer3SummaryBitrateResponseMetaNormalization = "RATIO"` - `Units []AttackLayer3SummaryBitrateResponseMetaUnit` Measurement units for the results. - `Name string` - `Value string` - `Summary0 AttackLayer3SummaryBitrateResponseSummary0` - `OneGBPSToTenGBPS string` A numeric string. - `TenGBPSToOneHundredGBPS string` A numeric string. - `FiveHundredMBPSToOneGBPS string` A numeric string. - `Over100GBPS string` A numeric string. - `Under500MBPS string` A numeric string. ### Example ```go 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.Bitrate(context.TODO(), radar.AttackLayer3SummaryBitrateParams{ }) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", response.Meta) } ``` #### Response ```json { "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": { "_1_GBPS_TO_10_GBPS": "10", "_10_GBPS_TO_100_GBPS": "10", "_500_MBPS_TO_1_GBPS": "10", "OVER_100_GBPS": "10", "UNDER_500_MBPS": "10" } }, "success": true } ``` ## Get layer 3 attacks by duration summary `client.Radar.Attacks.Layer3.Summary.Duration(ctx, query) (*AttackLayer3SummaryDurationResponse, error)` **get** `/radar/attacks/layer3/summary/duration` Retrieves the distribution of layer 3 attacks by duration. ### Parameters - `query AttackLayer3SummaryDurationParams` - `Continent param.Field[[]string]` 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]` End of the date range (inclusive). - `DateRange param.Field[[]string]` 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]` Start of the date range. - `Direction param.Field[AttackLayer3SummaryDurationParamsDirection]` Specifies whether the `location` filter applies to the source or target location. - `const AttackLayer3SummaryDurationParamsDirectionOrigin AttackLayer3SummaryDurationParamsDirection = "ORIGIN"` - `const AttackLayer3SummaryDurationParamsDirectionTarget AttackLayer3SummaryDurationParamsDirection = "TARGET"` - `Format param.Field[AttackLayer3SummaryDurationParamsFormat]` Format in which results will be returned. - `const AttackLayer3SummaryDurationParamsFormatJson AttackLayer3SummaryDurationParamsFormat = "JSON"` - `const AttackLayer3SummaryDurationParamsFormatCsv AttackLayer3SummaryDurationParamsFormat = "CSV"` - `IPVersion param.Field[[]AttackLayer3SummaryDurationParamsIPVersion]` Filters results by IP version (Ipv4 vs. IPv6). - `const AttackLayer3SummaryDurationParamsIPVersionIPv4 AttackLayer3SummaryDurationParamsIPVersion = "IPv4"` - `const AttackLayer3SummaryDurationParamsIPVersionIPv6 AttackLayer3SummaryDurationParamsIPVersion = "IPv6"` - `Location param.Field[[]string]` 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]` Array of names used to label the series in the response. - `Protocol param.Field[[]AttackLayer3SummaryDurationParamsProtocol]` Filters the results by layer 3/4 protocol. - `const AttackLayer3SummaryDurationParamsProtocolUdp AttackLayer3SummaryDurationParamsProtocol = "UDP"` - `const AttackLayer3SummaryDurationParamsProtocolTCP AttackLayer3SummaryDurationParamsProtocol = "TCP"` - `const AttackLayer3SummaryDurationParamsProtocolIcmp AttackLayer3SummaryDurationParamsProtocol = "ICMP"` - `const AttackLayer3SummaryDurationParamsProtocolGRE AttackLayer3SummaryDurationParamsProtocol = "GRE"` ### Returns - `type AttackLayer3SummaryDurationResponse struct{…}` - `Meta AttackLayer3SummaryDurationResponseMeta` Metadata for the results. - `ConfidenceInfo AttackLayer3SummaryDurationResponseMetaConfidenceInfo` - `Annotations []AttackLayer3SummaryDurationResponseMetaConfidenceInfoAnnotation` - `DataSource AttackLayer3SummaryDurationResponseMetaConfidenceInfoAnnotationsDataSource` Data source for annotations. - `const AttackLayer3SummaryDurationResponseMetaConfidenceInfoAnnotationsDataSourceAll AttackLayer3SummaryDurationResponseMetaConfidenceInfoAnnotationsDataSource = "ALL"` - `const AttackLayer3SummaryDurationResponseMetaConfidenceInfoAnnotationsDataSourceAIBots AttackLayer3SummaryDurationResponseMetaConfidenceInfoAnnotationsDataSource = "AI_BOTS"` - `const AttackLayer3SummaryDurationResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway AttackLayer3SummaryDurationResponseMetaConfidenceInfoAnnotationsDataSource = "AI_GATEWAY"` - `const AttackLayer3SummaryDurationResponseMetaConfidenceInfoAnnotationsDataSourceBGP AttackLayer3SummaryDurationResponseMetaConfidenceInfoAnnotationsDataSource = "BGP"` - `const AttackLayer3SummaryDurationResponseMetaConfidenceInfoAnnotationsDataSourceBots AttackLayer3SummaryDurationResponseMetaConfidenceInfoAnnotationsDataSource = "BOTS"` - `const AttackLayer3SummaryDurationResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly AttackLayer3SummaryDurationResponseMetaConfidenceInfoAnnotationsDataSource = "CONNECTION_ANOMALY"` - `const AttackLayer3SummaryDurationResponseMetaConfidenceInfoAnnotationsDataSourceCT AttackLayer3SummaryDurationResponseMetaConfidenceInfoAnnotationsDataSource = "CT"` - `const AttackLayer3SummaryDurationResponseMetaConfidenceInfoAnnotationsDataSourceDNS AttackLayer3SummaryDurationResponseMetaConfidenceInfoAnnotationsDataSource = "DNS"` - `const AttackLayer3SummaryDurationResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude AttackLayer3SummaryDurationResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_MAGNITUDE"` - `const AttackLayer3SummaryDurationResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112 AttackLayer3SummaryDurationResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_AS112"` - `const AttackLayer3SummaryDurationResponseMetaConfidenceInfoAnnotationsDataSourceDos AttackLayer3SummaryDurationResponseMetaConfidenceInfoAnnotationsDataSource = "DOS"` - `const AttackLayer3SummaryDurationResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting AttackLayer3SummaryDurationResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_ROUTING"` - `const AttackLayer3SummaryDurationResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity AttackLayer3SummaryDurationResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_SECURITY"` - `const AttackLayer3SummaryDurationResponseMetaConfidenceInfoAnnotationsDataSourceFw AttackLayer3SummaryDurationResponseMetaConfidenceInfoAnnotationsDataSource = "FW"` - `const AttackLayer3SummaryDurationResponseMetaConfidenceInfoAnnotationsDataSourceFwPg AttackLayer3SummaryDurationResponseMetaConfidenceInfoAnnotationsDataSource = "FW_PG"` - `const AttackLayer3SummaryDurationResponseMetaConfidenceInfoAnnotationsDataSourceHTTP AttackLayer3SummaryDurationResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP"` - `const AttackLayer3SummaryDurationResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl AttackLayer3SummaryDurationResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CONTROL"` - `const AttackLayer3SummaryDurationResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer AttackLayer3SummaryDurationResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CRAWLER_REFERER"` - `const AttackLayer3SummaryDurationResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins AttackLayer3SummaryDurationResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_ORIGINS"` - `const AttackLayer3SummaryDurationResponseMetaConfidenceInfoAnnotationsDataSourceIQI AttackLayer3SummaryDurationResponseMetaConfidenceInfoAnnotationsDataSource = "IQI"` - `const AttackLayer3SummaryDurationResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials AttackLayer3SummaryDurationResponseMetaConfidenceInfoAnnotationsDataSource = "LEAKED_CREDENTIALS"` - `const AttackLayer3SummaryDurationResponseMetaConfidenceInfoAnnotationsDataSourceNet AttackLayer3SummaryDurationResponseMetaConfidenceInfoAnnotationsDataSource = "NET"` - `const AttackLayer3SummaryDurationResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT AttackLayer3SummaryDurationResponseMetaConfidenceInfoAnnotationsDataSource = "ROBOTS_TXT"` - `const AttackLayer3SummaryDurationResponseMetaConfidenceInfoAnnotationsDataSourceSpeed AttackLayer3SummaryDurationResponseMetaConfidenceInfoAnnotationsDataSource = "SPEED"` - `const AttackLayer3SummaryDurationResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI AttackLayer3SummaryDurationResponseMetaConfidenceInfoAnnotationsDataSource = "WORKERS_AI"` - `Description string` - `EndDate Time` - `EventType AttackLayer3SummaryDurationResponseMetaConfidenceInfoAnnotationsEventType` Event type for annotations. - `const AttackLayer3SummaryDurationResponseMetaConfidenceInfoAnnotationsEventTypeEvent AttackLayer3SummaryDurationResponseMetaConfidenceInfoAnnotationsEventType = "EVENT"` - `const AttackLayer3SummaryDurationResponseMetaConfidenceInfoAnnotationsEventTypeGeneral AttackLayer3SummaryDurationResponseMetaConfidenceInfoAnnotationsEventType = "GENERAL"` - `const AttackLayer3SummaryDurationResponseMetaConfidenceInfoAnnotationsEventTypeOutage AttackLayer3SummaryDurationResponseMetaConfidenceInfoAnnotationsEventType = "OUTAGE"` - `const AttackLayer3SummaryDurationResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection AttackLayer3SummaryDurationResponseMetaConfidenceInfoAnnotationsEventType = "PARTIAL_PROJECTION"` - `const AttackLayer3SummaryDurationResponseMetaConfidenceInfoAnnotationsEventTypePipeline AttackLayer3SummaryDurationResponseMetaConfidenceInfoAnnotationsEventType = "PIPELINE"` - `const AttackLayer3SummaryDurationResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly AttackLayer3SummaryDurationResponseMetaConfidenceInfoAnnotationsEventType = "TRAFFIC_ANOMALY"` - `IsInstantaneous bool` Whether event is a single point in time or a time range. - `LinkedURL string` - `StartDate Time` - `Level int64` Provides an indication of how much confidence Cloudflare has in the data. - `DateRange []AttackLayer3SummaryDurationResponseMetaDateRange` - `EndTime Time` Adjusted end of date range. - `StartTime Time` Adjusted start of date range. - `LastUpdated Time` Timestamp of the last dataset update. - `Normalization AttackLayer3SummaryDurationResponseMetaNormalization` Normalization method applied to the results. Refer to [Normalization methods](https://developers.cloudflare.com/radar/concepts/normalization/). - `const AttackLayer3SummaryDurationResponseMetaNormalizationPercentage AttackLayer3SummaryDurationResponseMetaNormalization = "PERCENTAGE"` - `const AttackLayer3SummaryDurationResponseMetaNormalizationMin0Max AttackLayer3SummaryDurationResponseMetaNormalization = "MIN0_MAX"` - `const AttackLayer3SummaryDurationResponseMetaNormalizationMinMax AttackLayer3SummaryDurationResponseMetaNormalization = "MIN_MAX"` - `const AttackLayer3SummaryDurationResponseMetaNormalizationRawValues AttackLayer3SummaryDurationResponseMetaNormalization = "RAW_VALUES"` - `const AttackLayer3SummaryDurationResponseMetaNormalizationPercentageChange AttackLayer3SummaryDurationResponseMetaNormalization = "PERCENTAGE_CHANGE"` - `const AttackLayer3SummaryDurationResponseMetaNormalizationRollingAverage AttackLayer3SummaryDurationResponseMetaNormalization = "ROLLING_AVERAGE"` - `const AttackLayer3SummaryDurationResponseMetaNormalizationOverlappedPercentage AttackLayer3SummaryDurationResponseMetaNormalization = "OVERLAPPED_PERCENTAGE"` - `const AttackLayer3SummaryDurationResponseMetaNormalizationRatio AttackLayer3SummaryDurationResponseMetaNormalization = "RATIO"` - `Units []AttackLayer3SummaryDurationResponseMetaUnit` Measurement units for the results. - `Name string` - `Value string` - `Summary0 AttackLayer3SummaryDurationResponseSummary0` - `OneHourToThreeHours string` A numeric string. - `TenMinsToTwentyMins string` A numeric string. - `TwentyMinsToFortyMins string` A numeric string. - `FortyMinsToOneHour string` A numeric string. - `Over3Hours string` A numeric string. - `Under10Mins string` A numeric string. ### Example ```go 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.Duration(context.TODO(), radar.AttackLayer3SummaryDurationParams{ }) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", response.Meta) } ``` #### Response ```json { "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": { "_1_HOUR_TO_3_HOURS": "10", "_10_MINS_TO_20_MINS": "10", "_20_MINS_TO_40_MINS": "10", "_40_MINS_TO_1_HOUR": "10", "OVER_3_HOURS": "10", "UNDER_10_MINS": "10" } }, "success": true } ``` ## Get layer 3 attacks by IP version summary `client.Radar.Attacks.Layer3.Summary.IPVersion(ctx, query) (*AttackLayer3SummaryIPVersionResponse, error)` **get** `/radar/attacks/layer3/summary/ip_version` Retrieves the distribution of layer 3 attacks by IP version. ### Parameters - `query AttackLayer3SummaryIPVersionParams` - `Continent param.Field[[]string]` 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]` End of the date range (inclusive). - `DateRange param.Field[[]string]` 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]` Start of the date range. - `Direction param.Field[AttackLayer3SummaryIPVersionParamsDirection]` Specifies whether the `location` filter applies to the source or target location. - `const AttackLayer3SummaryIPVersionParamsDirectionOrigin AttackLayer3SummaryIPVersionParamsDirection = "ORIGIN"` - `const AttackLayer3SummaryIPVersionParamsDirectionTarget AttackLayer3SummaryIPVersionParamsDirection = "TARGET"` - `Format param.Field[AttackLayer3SummaryIPVersionParamsFormat]` Format in which results will be returned. - `const AttackLayer3SummaryIPVersionParamsFormatJson AttackLayer3SummaryIPVersionParamsFormat = "JSON"` - `const AttackLayer3SummaryIPVersionParamsFormatCsv AttackLayer3SummaryIPVersionParamsFormat = "CSV"` - `Location param.Field[[]string]` 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]` Array of names used to label the series in the response. - `Protocol param.Field[[]AttackLayer3SummaryIPVersionParamsProtocol]` Filters the results by layer 3/4 protocol. - `const AttackLayer3SummaryIPVersionParamsProtocolUdp AttackLayer3SummaryIPVersionParamsProtocol = "UDP"` - `const AttackLayer3SummaryIPVersionParamsProtocolTCP AttackLayer3SummaryIPVersionParamsProtocol = "TCP"` - `const AttackLayer3SummaryIPVersionParamsProtocolIcmp AttackLayer3SummaryIPVersionParamsProtocol = "ICMP"` - `const AttackLayer3SummaryIPVersionParamsProtocolGRE AttackLayer3SummaryIPVersionParamsProtocol = "GRE"` ### Returns - `type AttackLayer3SummaryIPVersionResponse struct{…}` - `Meta AttackLayer3SummaryIPVersionResponseMeta` Metadata for the results. - `ConfidenceInfo AttackLayer3SummaryIPVersionResponseMetaConfidenceInfo` - `Annotations []AttackLayer3SummaryIPVersionResponseMetaConfidenceInfoAnnotation` - `DataSource AttackLayer3SummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSource` Data source for annotations. - `const AttackLayer3SummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceAll AttackLayer3SummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "ALL"` - `const AttackLayer3SummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceAIBots AttackLayer3SummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "AI_BOTS"` - `const AttackLayer3SummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway AttackLayer3SummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "AI_GATEWAY"` - `const AttackLayer3SummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceBGP AttackLayer3SummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "BGP"` - `const AttackLayer3SummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceBots AttackLayer3SummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "BOTS"` - `const AttackLayer3SummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly AttackLayer3SummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "CONNECTION_ANOMALY"` - `const AttackLayer3SummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceCT AttackLayer3SummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "CT"` - `const AttackLayer3SummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceDNS AttackLayer3SummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "DNS"` - `const AttackLayer3SummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude AttackLayer3SummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_MAGNITUDE"` - `const AttackLayer3SummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112 AttackLayer3SummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_AS112"` - `const AttackLayer3SummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceDos AttackLayer3SummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "DOS"` - `const AttackLayer3SummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting AttackLayer3SummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_ROUTING"` - `const AttackLayer3SummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity AttackLayer3SummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_SECURITY"` - `const AttackLayer3SummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceFw AttackLayer3SummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "FW"` - `const AttackLayer3SummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceFwPg AttackLayer3SummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "FW_PG"` - `const AttackLayer3SummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceHTTP AttackLayer3SummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP"` - `const AttackLayer3SummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl AttackLayer3SummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CONTROL"` - `const AttackLayer3SummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer AttackLayer3SummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CRAWLER_REFERER"` - `const AttackLayer3SummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins AttackLayer3SummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_ORIGINS"` - `const AttackLayer3SummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceIQI AttackLayer3SummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "IQI"` - `const AttackLayer3SummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials AttackLayer3SummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "LEAKED_CREDENTIALS"` - `const AttackLayer3SummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceNet AttackLayer3SummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "NET"` - `const AttackLayer3SummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT AttackLayer3SummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "ROBOTS_TXT"` - `const AttackLayer3SummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceSpeed AttackLayer3SummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "SPEED"` - `const AttackLayer3SummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI AttackLayer3SummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "WORKERS_AI"` - `Description string` - `EndDate Time` - `EventType AttackLayer3SummaryIPVersionResponseMetaConfidenceInfoAnnotationsEventType` Event type for annotations. - `const AttackLayer3SummaryIPVersionResponseMetaConfidenceInfoAnnotationsEventTypeEvent AttackLayer3SummaryIPVersionResponseMetaConfidenceInfoAnnotationsEventType = "EVENT"` - `const AttackLayer3SummaryIPVersionResponseMetaConfidenceInfoAnnotationsEventTypeGeneral AttackLayer3SummaryIPVersionResponseMetaConfidenceInfoAnnotationsEventType = "GENERAL"` - `const AttackLayer3SummaryIPVersionResponseMetaConfidenceInfoAnnotationsEventTypeOutage AttackLayer3SummaryIPVersionResponseMetaConfidenceInfoAnnotationsEventType = "OUTAGE"` - `const AttackLayer3SummaryIPVersionResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection AttackLayer3SummaryIPVersionResponseMetaConfidenceInfoAnnotationsEventType = "PARTIAL_PROJECTION"` - `const AttackLayer3SummaryIPVersionResponseMetaConfidenceInfoAnnotationsEventTypePipeline AttackLayer3SummaryIPVersionResponseMetaConfidenceInfoAnnotationsEventType = "PIPELINE"` - `const AttackLayer3SummaryIPVersionResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly AttackLayer3SummaryIPVersionResponseMetaConfidenceInfoAnnotationsEventType = "TRAFFIC_ANOMALY"` - `IsInstantaneous bool` Whether event is a single point in time or a time range. - `LinkedURL string` - `StartDate Time` - `Level int64` Provides an indication of how much confidence Cloudflare has in the data. - `DateRange []AttackLayer3SummaryIPVersionResponseMetaDateRange` - `EndTime Time` Adjusted end of date range. - `StartTime Time` Adjusted start of date range. - `LastUpdated Time` Timestamp of the last dataset update. - `Normalization AttackLayer3SummaryIPVersionResponseMetaNormalization` Normalization method applied to the results. Refer to [Normalization methods](https://developers.cloudflare.com/radar/concepts/normalization/). - `const AttackLayer3SummaryIPVersionResponseMetaNormalizationPercentage AttackLayer3SummaryIPVersionResponseMetaNormalization = "PERCENTAGE"` - `const AttackLayer3SummaryIPVersionResponseMetaNormalizationMin0Max AttackLayer3SummaryIPVersionResponseMetaNormalization = "MIN0_MAX"` - `const AttackLayer3SummaryIPVersionResponseMetaNormalizationMinMax AttackLayer3SummaryIPVersionResponseMetaNormalization = "MIN_MAX"` - `const AttackLayer3SummaryIPVersionResponseMetaNormalizationRawValues AttackLayer3SummaryIPVersionResponseMetaNormalization = "RAW_VALUES"` - `const AttackLayer3SummaryIPVersionResponseMetaNormalizationPercentageChange AttackLayer3SummaryIPVersionResponseMetaNormalization = "PERCENTAGE_CHANGE"` - `const AttackLayer3SummaryIPVersionResponseMetaNormalizationRollingAverage AttackLayer3SummaryIPVersionResponseMetaNormalization = "ROLLING_AVERAGE"` - `const AttackLayer3SummaryIPVersionResponseMetaNormalizationOverlappedPercentage AttackLayer3SummaryIPVersionResponseMetaNormalization = "OVERLAPPED_PERCENTAGE"` - `const AttackLayer3SummaryIPVersionResponseMetaNormalizationRatio AttackLayer3SummaryIPVersionResponseMetaNormalization = "RATIO"` - `Units []AttackLayer3SummaryIPVersionResponseMetaUnit` Measurement units for the results. - `Name string` - `Value string` - `Summary0 AttackLayer3SummaryIPVersionResponseSummary0` - `IPv4 string` A numeric string. - `IPv6 string` A numeric string. ### Example ```go 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.IPVersion(context.TODO(), radar.AttackLayer3SummaryIPVersionParams{ }) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", response.Meta) } ``` #### Response ```json { "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": { "IPv4": "10", "IPv6": "10" } }, "success": true } ``` ## Get layer 3 attacks by protocol summary `client.Radar.Attacks.Layer3.Summary.Protocol(ctx, query) (*AttackLayer3SummaryProtocolResponse, error)` **get** `/radar/attacks/layer3/summary/protocol` Retrieves the distribution of layer 3 attacks by protocol. ### Parameters - `query AttackLayer3SummaryProtocolParams` - `Continent param.Field[[]string]` 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]` End of the date range (inclusive). - `DateRange param.Field[[]string]` 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]` Start of the date range. - `Direction param.Field[AttackLayer3SummaryProtocolParamsDirection]` Specifies whether the `location` filter applies to the source or target location. - `const AttackLayer3SummaryProtocolParamsDirectionOrigin AttackLayer3SummaryProtocolParamsDirection = "ORIGIN"` - `const AttackLayer3SummaryProtocolParamsDirectionTarget AttackLayer3SummaryProtocolParamsDirection = "TARGET"` - `Format param.Field[AttackLayer3SummaryProtocolParamsFormat]` Format in which results will be returned. - `const AttackLayer3SummaryProtocolParamsFormatJson AttackLayer3SummaryProtocolParamsFormat = "JSON"` - `const AttackLayer3SummaryProtocolParamsFormatCsv AttackLayer3SummaryProtocolParamsFormat = "CSV"` - `IPVersion param.Field[[]AttackLayer3SummaryProtocolParamsIPVersion]` Filters results by IP version (Ipv4 vs. IPv6). - `const AttackLayer3SummaryProtocolParamsIPVersionIPv4 AttackLayer3SummaryProtocolParamsIPVersion = "IPv4"` - `const AttackLayer3SummaryProtocolParamsIPVersionIPv6 AttackLayer3SummaryProtocolParamsIPVersion = "IPv6"` - `Location param.Field[[]string]` 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]` Array of names used to label the series in the response. ### Returns - `type AttackLayer3SummaryProtocolResponse struct{…}` - `Meta AttackLayer3SummaryProtocolResponseMeta` Metadata for the results. - `ConfidenceInfo AttackLayer3SummaryProtocolResponseMetaConfidenceInfo` - `Annotations []AttackLayer3SummaryProtocolResponseMetaConfidenceInfoAnnotation` - `DataSource AttackLayer3SummaryProtocolResponseMetaConfidenceInfoAnnotationsDataSource` Data source for annotations. - `const AttackLayer3SummaryProtocolResponseMetaConfidenceInfoAnnotationsDataSourceAll AttackLayer3SummaryProtocolResponseMetaConfidenceInfoAnnotationsDataSource = "ALL"` - `const AttackLayer3SummaryProtocolResponseMetaConfidenceInfoAnnotationsDataSourceAIBots AttackLayer3SummaryProtocolResponseMetaConfidenceInfoAnnotationsDataSource = "AI_BOTS"` - `const AttackLayer3SummaryProtocolResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway AttackLayer3SummaryProtocolResponseMetaConfidenceInfoAnnotationsDataSource = "AI_GATEWAY"` - `const AttackLayer3SummaryProtocolResponseMetaConfidenceInfoAnnotationsDataSourceBGP AttackLayer3SummaryProtocolResponseMetaConfidenceInfoAnnotationsDataSource = "BGP"` - `const AttackLayer3SummaryProtocolResponseMetaConfidenceInfoAnnotationsDataSourceBots AttackLayer3SummaryProtocolResponseMetaConfidenceInfoAnnotationsDataSource = "BOTS"` - `const AttackLayer3SummaryProtocolResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly AttackLayer3SummaryProtocolResponseMetaConfidenceInfoAnnotationsDataSource = "CONNECTION_ANOMALY"` - `const AttackLayer3SummaryProtocolResponseMetaConfidenceInfoAnnotationsDataSourceCT AttackLayer3SummaryProtocolResponseMetaConfidenceInfoAnnotationsDataSource = "CT"` - `const AttackLayer3SummaryProtocolResponseMetaConfidenceInfoAnnotationsDataSourceDNS AttackLayer3SummaryProtocolResponseMetaConfidenceInfoAnnotationsDataSource = "DNS"` - `const AttackLayer3SummaryProtocolResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude AttackLayer3SummaryProtocolResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_MAGNITUDE"` - `const AttackLayer3SummaryProtocolResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112 AttackLayer3SummaryProtocolResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_AS112"` - `const AttackLayer3SummaryProtocolResponseMetaConfidenceInfoAnnotationsDataSourceDos AttackLayer3SummaryProtocolResponseMetaConfidenceInfoAnnotationsDataSource = "DOS"` - `const AttackLayer3SummaryProtocolResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting AttackLayer3SummaryProtocolResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_ROUTING"` - `const AttackLayer3SummaryProtocolResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity AttackLayer3SummaryProtocolResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_SECURITY"` - `const AttackLayer3SummaryProtocolResponseMetaConfidenceInfoAnnotationsDataSourceFw AttackLayer3SummaryProtocolResponseMetaConfidenceInfoAnnotationsDataSource = "FW"` - `const AttackLayer3SummaryProtocolResponseMetaConfidenceInfoAnnotationsDataSourceFwPg AttackLayer3SummaryProtocolResponseMetaConfidenceInfoAnnotationsDataSource = "FW_PG"` - `const AttackLayer3SummaryProtocolResponseMetaConfidenceInfoAnnotationsDataSourceHTTP AttackLayer3SummaryProtocolResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP"` - `const AttackLayer3SummaryProtocolResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl AttackLayer3SummaryProtocolResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CONTROL"` - `const AttackLayer3SummaryProtocolResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer AttackLayer3SummaryProtocolResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CRAWLER_REFERER"` - `const AttackLayer3SummaryProtocolResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins AttackLayer3SummaryProtocolResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_ORIGINS"` - `const AttackLayer3SummaryProtocolResponseMetaConfidenceInfoAnnotationsDataSourceIQI AttackLayer3SummaryProtocolResponseMetaConfidenceInfoAnnotationsDataSource = "IQI"` - `const AttackLayer3SummaryProtocolResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials AttackLayer3SummaryProtocolResponseMetaConfidenceInfoAnnotationsDataSource = "LEAKED_CREDENTIALS"` - `const AttackLayer3SummaryProtocolResponseMetaConfidenceInfoAnnotationsDataSourceNet AttackLayer3SummaryProtocolResponseMetaConfidenceInfoAnnotationsDataSource = "NET"` - `const AttackLayer3SummaryProtocolResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT AttackLayer3SummaryProtocolResponseMetaConfidenceInfoAnnotationsDataSource = "ROBOTS_TXT"` - `const AttackLayer3SummaryProtocolResponseMetaConfidenceInfoAnnotationsDataSourceSpeed AttackLayer3SummaryProtocolResponseMetaConfidenceInfoAnnotationsDataSource = "SPEED"` - `const AttackLayer3SummaryProtocolResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI AttackLayer3SummaryProtocolResponseMetaConfidenceInfoAnnotationsDataSource = "WORKERS_AI"` - `Description string` - `EndDate Time` - `EventType AttackLayer3SummaryProtocolResponseMetaConfidenceInfoAnnotationsEventType` Event type for annotations. - `const AttackLayer3SummaryProtocolResponseMetaConfidenceInfoAnnotationsEventTypeEvent AttackLayer3SummaryProtocolResponseMetaConfidenceInfoAnnotationsEventType = "EVENT"` - `const AttackLayer3SummaryProtocolResponseMetaConfidenceInfoAnnotationsEventTypeGeneral AttackLayer3SummaryProtocolResponseMetaConfidenceInfoAnnotationsEventType = "GENERAL"` - `const AttackLayer3SummaryProtocolResponseMetaConfidenceInfoAnnotationsEventTypeOutage AttackLayer3SummaryProtocolResponseMetaConfidenceInfoAnnotationsEventType = "OUTAGE"` - `const AttackLayer3SummaryProtocolResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection AttackLayer3SummaryProtocolResponseMetaConfidenceInfoAnnotationsEventType = "PARTIAL_PROJECTION"` - `const AttackLayer3SummaryProtocolResponseMetaConfidenceInfoAnnotationsEventTypePipeline AttackLayer3SummaryProtocolResponseMetaConfidenceInfoAnnotationsEventType = "PIPELINE"` - `const AttackLayer3SummaryProtocolResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly AttackLayer3SummaryProtocolResponseMetaConfidenceInfoAnnotationsEventType = "TRAFFIC_ANOMALY"` - `IsInstantaneous bool` Whether event is a single point in time or a time range. - `LinkedURL string` - `StartDate Time` - `Level int64` Provides an indication of how much confidence Cloudflare has in the data. - `DateRange []AttackLayer3SummaryProtocolResponseMetaDateRange` - `EndTime Time` Adjusted end of date range. - `StartTime Time` Adjusted start of date range. - `LastUpdated Time` Timestamp of the last dataset update. - `Normalization AttackLayer3SummaryProtocolResponseMetaNormalization` Normalization method applied to the results. Refer to [Normalization methods](https://developers.cloudflare.com/radar/concepts/normalization/). - `const AttackLayer3SummaryProtocolResponseMetaNormalizationPercentage AttackLayer3SummaryProtocolResponseMetaNormalization = "PERCENTAGE"` - `const AttackLayer3SummaryProtocolResponseMetaNormalizationMin0Max AttackLayer3SummaryProtocolResponseMetaNormalization = "MIN0_MAX"` - `const AttackLayer3SummaryProtocolResponseMetaNormalizationMinMax AttackLayer3SummaryProtocolResponseMetaNormalization = "MIN_MAX"` - `const AttackLayer3SummaryProtocolResponseMetaNormalizationRawValues AttackLayer3SummaryProtocolResponseMetaNormalization = "RAW_VALUES"` - `const AttackLayer3SummaryProtocolResponseMetaNormalizationPercentageChange AttackLayer3SummaryProtocolResponseMetaNormalization = "PERCENTAGE_CHANGE"` - `const AttackLayer3SummaryProtocolResponseMetaNormalizationRollingAverage AttackLayer3SummaryProtocolResponseMetaNormalization = "ROLLING_AVERAGE"` - `const AttackLayer3SummaryProtocolResponseMetaNormalizationOverlappedPercentage AttackLayer3SummaryProtocolResponseMetaNormalization = "OVERLAPPED_PERCENTAGE"` - `const AttackLayer3SummaryProtocolResponseMetaNormalizationRatio AttackLayer3SummaryProtocolResponseMetaNormalization = "RATIO"` - `Units []AttackLayer3SummaryProtocolResponseMetaUnit` Measurement units for the results. - `Name string` - `Value string` - `Summary0 AttackLayer3SummaryProtocolResponseSummary0` - `GRE string` A numeric string. - `Icmp string` A numeric string. - `TCP string` A numeric string. - `Udp string` A numeric string. ### Example ```go 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.Protocol(context.TODO(), radar.AttackLayer3SummaryProtocolParams{ }) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", response.Meta) } ``` #### Response ```json { "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": { "GRE": "10", "ICMP": "10", "TCP": "10", "UDP": "10" } }, "success": true } ``` ## Get layer 3 attacks by vector summary `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. ### Parameters - `query AttackLayer3SummaryVectorParams` - `Continent param.Field[[]string]` 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]` End of the date range (inclusive). - `DateRange param.Field[[]string]` 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]` Start of the date range. - `Direction param.Field[AttackLayer3SummaryVectorParamsDirection]` Specifies whether the `location` filter applies to the source or target location. - `const AttackLayer3SummaryVectorParamsDirectionOrigin AttackLayer3SummaryVectorParamsDirection = "ORIGIN"` - `const AttackLayer3SummaryVectorParamsDirectionTarget AttackLayer3SummaryVectorParamsDirection = "TARGET"` - `Format param.Field[AttackLayer3SummaryVectorParamsFormat]` Format in which results will be returned. - `const AttackLayer3SummaryVectorParamsFormatJson AttackLayer3SummaryVectorParamsFormat = "JSON"` - `const AttackLayer3SummaryVectorParamsFormatCsv AttackLayer3SummaryVectorParamsFormat = "CSV"` - `IPVersion param.Field[[]AttackLayer3SummaryVectorParamsIPVersion]` Filters results by IP version (Ipv4 vs. IPv6). - `const AttackLayer3SummaryVectorParamsIPVersionIPv4 AttackLayer3SummaryVectorParamsIPVersion = "IPv4"` - `const AttackLayer3SummaryVectorParamsIPVersionIPv6 AttackLayer3SummaryVectorParamsIPVersion = "IPv6"` - `LimitPerGroup param.Field[int64]` 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]` 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]` Array of names used to label the series in the response. - `Protocol param.Field[[]AttackLayer3SummaryVectorParamsProtocol]` Filters the results by layer 3/4 protocol. - `const AttackLayer3SummaryVectorParamsProtocolUdp AttackLayer3SummaryVectorParamsProtocol = "UDP"` - `const AttackLayer3SummaryVectorParamsProtocolTCP AttackLayer3SummaryVectorParamsProtocol = "TCP"` - `const AttackLayer3SummaryVectorParamsProtocolIcmp AttackLayer3SummaryVectorParamsProtocol = "ICMP"` - `const AttackLayer3SummaryVectorParamsProtocolGRE AttackLayer3SummaryVectorParamsProtocol = "GRE"` ### Returns - `type AttackLayer3SummaryVectorResponse struct{…}` - `Meta AttackLayer3SummaryVectorResponseMeta` Metadata for the results. - `ConfidenceInfo AttackLayer3SummaryVectorResponseMetaConfidenceInfo` - `Annotations []AttackLayer3SummaryVectorResponseMetaConfidenceInfoAnnotation` - `DataSource AttackLayer3SummaryVectorResponseMetaConfidenceInfoAnnotationsDataSource` Data source for annotations. - `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` - `EventType AttackLayer3SummaryVectorResponseMetaConfidenceInfoAnnotationsEventType` Event type for annotations. - `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` - `StartDate Time` - `Level int64` Provides an indication of how much confidence Cloudflare has in the data. - `DateRange []AttackLayer3SummaryVectorResponseMetaDateRange` - `EndTime Time` Adjusted end of date range. - `StartTime Time` Adjusted start of date range. - `LastUpdated Time` Timestamp of the last dataset update. - `Normalization AttackLayer3SummaryVectorResponseMetaNormalization` Normalization method applied to the results. Refer to [Normalization methods](https://developers.cloudflare.com/radar/concepts/normalization/). - `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]` ### Example ```go 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) } ``` #### Response ```json { "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 } ``` ## Get layer 3 attacks by targeted industry summary `client.Radar.Attacks.Layer3.Summary.Industry(ctx, query) (*AttackLayer3SummaryIndustryResponse, error)` **get** `/radar/attacks/layer3/summary/industry` Retrieves the distribution of layer 3 attacks by targeted industry. ### Parameters - `query AttackLayer3SummaryIndustryParams` - `Continent param.Field[[]string]` 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]` End of the date range (inclusive). - `DateRange param.Field[[]string]` 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]` Start of the date range. - `Direction param.Field[AttackLayer3SummaryIndustryParamsDirection]` Specifies whether the `location` filter applies to the source or target location. - `const AttackLayer3SummaryIndustryParamsDirectionOrigin AttackLayer3SummaryIndustryParamsDirection = "ORIGIN"` - `const AttackLayer3SummaryIndustryParamsDirectionTarget AttackLayer3SummaryIndustryParamsDirection = "TARGET"` - `Format param.Field[AttackLayer3SummaryIndustryParamsFormat]` Format in which results will be returned. - `const AttackLayer3SummaryIndustryParamsFormatJson AttackLayer3SummaryIndustryParamsFormat = "JSON"` - `const AttackLayer3SummaryIndustryParamsFormatCsv AttackLayer3SummaryIndustryParamsFormat = "CSV"` - `IPVersion param.Field[[]AttackLayer3SummaryIndustryParamsIPVersion]` Filters results by IP version (Ipv4 vs. IPv6). - `const AttackLayer3SummaryIndustryParamsIPVersionIPv4 AttackLayer3SummaryIndustryParamsIPVersion = "IPv4"` - `const AttackLayer3SummaryIndustryParamsIPVersionIPv6 AttackLayer3SummaryIndustryParamsIPVersion = "IPv6"` - `LimitPerGroup param.Field[int64]` 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]` 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]` Array of names used to label the series in the response. - `Protocol param.Field[[]AttackLayer3SummaryIndustryParamsProtocol]` Filters the results by layer 3/4 protocol. - `const AttackLayer3SummaryIndustryParamsProtocolUdp AttackLayer3SummaryIndustryParamsProtocol = "UDP"` - `const AttackLayer3SummaryIndustryParamsProtocolTCP AttackLayer3SummaryIndustryParamsProtocol = "TCP"` - `const AttackLayer3SummaryIndustryParamsProtocolIcmp AttackLayer3SummaryIndustryParamsProtocol = "ICMP"` - `const AttackLayer3SummaryIndustryParamsProtocolGRE AttackLayer3SummaryIndustryParamsProtocol = "GRE"` ### Returns - `type AttackLayer3SummaryIndustryResponse struct{…}` - `Meta AttackLayer3SummaryIndustryResponseMeta` Metadata for the results. - `ConfidenceInfo AttackLayer3SummaryIndustryResponseMetaConfidenceInfo` - `Annotations []AttackLayer3SummaryIndustryResponseMetaConfidenceInfoAnnotation` - `DataSource AttackLayer3SummaryIndustryResponseMetaConfidenceInfoAnnotationsDataSource` Data source for annotations. - `const AttackLayer3SummaryIndustryResponseMetaConfidenceInfoAnnotationsDataSourceAll AttackLayer3SummaryIndustryResponseMetaConfidenceInfoAnnotationsDataSource = "ALL"` - `const AttackLayer3SummaryIndustryResponseMetaConfidenceInfoAnnotationsDataSourceAIBots AttackLayer3SummaryIndustryResponseMetaConfidenceInfoAnnotationsDataSource = "AI_BOTS"` - `const AttackLayer3SummaryIndustryResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway AttackLayer3SummaryIndustryResponseMetaConfidenceInfoAnnotationsDataSource = "AI_GATEWAY"` - `const AttackLayer3SummaryIndustryResponseMetaConfidenceInfoAnnotationsDataSourceBGP AttackLayer3SummaryIndustryResponseMetaConfidenceInfoAnnotationsDataSource = "BGP"` - `const AttackLayer3SummaryIndustryResponseMetaConfidenceInfoAnnotationsDataSourceBots AttackLayer3SummaryIndustryResponseMetaConfidenceInfoAnnotationsDataSource = "BOTS"` - `const AttackLayer3SummaryIndustryResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly AttackLayer3SummaryIndustryResponseMetaConfidenceInfoAnnotationsDataSource = "CONNECTION_ANOMALY"` - `const AttackLayer3SummaryIndustryResponseMetaConfidenceInfoAnnotationsDataSourceCT AttackLayer3SummaryIndustryResponseMetaConfidenceInfoAnnotationsDataSource = "CT"` - `const AttackLayer3SummaryIndustryResponseMetaConfidenceInfoAnnotationsDataSourceDNS AttackLayer3SummaryIndustryResponseMetaConfidenceInfoAnnotationsDataSource = "DNS"` - `const AttackLayer3SummaryIndustryResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude AttackLayer3SummaryIndustryResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_MAGNITUDE"` - `const AttackLayer3SummaryIndustryResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112 AttackLayer3SummaryIndustryResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_AS112"` - `const AttackLayer3SummaryIndustryResponseMetaConfidenceInfoAnnotationsDataSourceDos AttackLayer3SummaryIndustryResponseMetaConfidenceInfoAnnotationsDataSource = "DOS"` - `const AttackLayer3SummaryIndustryResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting AttackLayer3SummaryIndustryResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_ROUTING"` - `const AttackLayer3SummaryIndustryResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity AttackLayer3SummaryIndustryResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_SECURITY"` - `const AttackLayer3SummaryIndustryResponseMetaConfidenceInfoAnnotationsDataSourceFw AttackLayer3SummaryIndustryResponseMetaConfidenceInfoAnnotationsDataSource = "FW"` - `const AttackLayer3SummaryIndustryResponseMetaConfidenceInfoAnnotationsDataSourceFwPg AttackLayer3SummaryIndustryResponseMetaConfidenceInfoAnnotationsDataSource = "FW_PG"` - `const AttackLayer3SummaryIndustryResponseMetaConfidenceInfoAnnotationsDataSourceHTTP AttackLayer3SummaryIndustryResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP"` - `const AttackLayer3SummaryIndustryResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl AttackLayer3SummaryIndustryResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CONTROL"` - `const AttackLayer3SummaryIndustryResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer AttackLayer3SummaryIndustryResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CRAWLER_REFERER"` - `const AttackLayer3SummaryIndustryResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins AttackLayer3SummaryIndustryResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_ORIGINS"` - `const AttackLayer3SummaryIndustryResponseMetaConfidenceInfoAnnotationsDataSourceIQI AttackLayer3SummaryIndustryResponseMetaConfidenceInfoAnnotationsDataSource = "IQI"` - `const AttackLayer3SummaryIndustryResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials AttackLayer3SummaryIndustryResponseMetaConfidenceInfoAnnotationsDataSource = "LEAKED_CREDENTIALS"` - `const AttackLayer3SummaryIndustryResponseMetaConfidenceInfoAnnotationsDataSourceNet AttackLayer3SummaryIndustryResponseMetaConfidenceInfoAnnotationsDataSource = "NET"` - `const AttackLayer3SummaryIndustryResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT AttackLayer3SummaryIndustryResponseMetaConfidenceInfoAnnotationsDataSource = "ROBOTS_TXT"` - `const AttackLayer3SummaryIndustryResponseMetaConfidenceInfoAnnotationsDataSourceSpeed AttackLayer3SummaryIndustryResponseMetaConfidenceInfoAnnotationsDataSource = "SPEED"` - `const AttackLayer3SummaryIndustryResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI AttackLayer3SummaryIndustryResponseMetaConfidenceInfoAnnotationsDataSource = "WORKERS_AI"` - `Description string` - `EndDate Time` - `EventType AttackLayer3SummaryIndustryResponseMetaConfidenceInfoAnnotationsEventType` Event type for annotations. - `const AttackLayer3SummaryIndustryResponseMetaConfidenceInfoAnnotationsEventTypeEvent AttackLayer3SummaryIndustryResponseMetaConfidenceInfoAnnotationsEventType = "EVENT"` - `const AttackLayer3SummaryIndustryResponseMetaConfidenceInfoAnnotationsEventTypeGeneral AttackLayer3SummaryIndustryResponseMetaConfidenceInfoAnnotationsEventType = "GENERAL"` - `const AttackLayer3SummaryIndustryResponseMetaConfidenceInfoAnnotationsEventTypeOutage AttackLayer3SummaryIndustryResponseMetaConfidenceInfoAnnotationsEventType = "OUTAGE"` - `const AttackLayer3SummaryIndustryResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection AttackLayer3SummaryIndustryResponseMetaConfidenceInfoAnnotationsEventType = "PARTIAL_PROJECTION"` - `const AttackLayer3SummaryIndustryResponseMetaConfidenceInfoAnnotationsEventTypePipeline AttackLayer3SummaryIndustryResponseMetaConfidenceInfoAnnotationsEventType = "PIPELINE"` - `const AttackLayer3SummaryIndustryResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly AttackLayer3SummaryIndustryResponseMetaConfidenceInfoAnnotationsEventType = "TRAFFIC_ANOMALY"` - `IsInstantaneous bool` Whether event is a single point in time or a time range. - `LinkedURL string` - `StartDate Time` - `Level int64` Provides an indication of how much confidence Cloudflare has in the data. - `DateRange []AttackLayer3SummaryIndustryResponseMetaDateRange` - `EndTime Time` Adjusted end of date range. - `StartTime Time` Adjusted start of date range. - `LastUpdated Time` Timestamp of the last dataset update. - `Normalization AttackLayer3SummaryIndustryResponseMetaNormalization` Normalization method applied to the results. Refer to [Normalization methods](https://developers.cloudflare.com/radar/concepts/normalization/). - `const AttackLayer3SummaryIndustryResponseMetaNormalizationPercentage AttackLayer3SummaryIndustryResponseMetaNormalization = "PERCENTAGE"` - `const AttackLayer3SummaryIndustryResponseMetaNormalizationMin0Max AttackLayer3SummaryIndustryResponseMetaNormalization = "MIN0_MAX"` - `const AttackLayer3SummaryIndustryResponseMetaNormalizationMinMax AttackLayer3SummaryIndustryResponseMetaNormalization = "MIN_MAX"` - `const AttackLayer3SummaryIndustryResponseMetaNormalizationRawValues AttackLayer3SummaryIndustryResponseMetaNormalization = "RAW_VALUES"` - `const AttackLayer3SummaryIndustryResponseMetaNormalizationPercentageChange AttackLayer3SummaryIndustryResponseMetaNormalization = "PERCENTAGE_CHANGE"` - `const AttackLayer3SummaryIndustryResponseMetaNormalizationRollingAverage AttackLayer3SummaryIndustryResponseMetaNormalization = "ROLLING_AVERAGE"` - `const AttackLayer3SummaryIndustryResponseMetaNormalizationOverlappedPercentage AttackLayer3SummaryIndustryResponseMetaNormalization = "OVERLAPPED_PERCENTAGE"` - `const AttackLayer3SummaryIndustryResponseMetaNormalizationRatio AttackLayer3SummaryIndustryResponseMetaNormalization = "RATIO"` - `Units []AttackLayer3SummaryIndustryResponseMetaUnit` Measurement units for the results. - `Name string` - `Value string` - `Summary0 map[string, string]` ### Example ```go 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.Industry(context.TODO(), radar.AttackLayer3SummaryIndustryParams{ }) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", response.Meta) } ``` #### Response ```json { "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": { "Computer Software": "65" } }, "success": true } ``` ## Get layer 3 attacks by targeted vertical summary `client.Radar.Attacks.Layer3.Summary.Vertical(ctx, query) (*AttackLayer3SummaryVerticalResponse, error)` **get** `/radar/attacks/layer3/summary/vertical` Retrieves the distribution of layer 3 attacks by targeted vertical. ### Parameters - `query AttackLayer3SummaryVerticalParams` - `Continent param.Field[[]string]` 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]` End of the date range (inclusive). - `DateRange param.Field[[]string]` 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]` Start of the date range. - `Direction param.Field[AttackLayer3SummaryVerticalParamsDirection]` Specifies whether the `location` filter applies to the source or target location. - `const AttackLayer3SummaryVerticalParamsDirectionOrigin AttackLayer3SummaryVerticalParamsDirection = "ORIGIN"` - `const AttackLayer3SummaryVerticalParamsDirectionTarget AttackLayer3SummaryVerticalParamsDirection = "TARGET"` - `Format param.Field[AttackLayer3SummaryVerticalParamsFormat]` Format in which results will be returned. - `const AttackLayer3SummaryVerticalParamsFormatJson AttackLayer3SummaryVerticalParamsFormat = "JSON"` - `const AttackLayer3SummaryVerticalParamsFormatCsv AttackLayer3SummaryVerticalParamsFormat = "CSV"` - `IPVersion param.Field[[]AttackLayer3SummaryVerticalParamsIPVersion]` Filters results by IP version (Ipv4 vs. IPv6). - `const AttackLayer3SummaryVerticalParamsIPVersionIPv4 AttackLayer3SummaryVerticalParamsIPVersion = "IPv4"` - `const AttackLayer3SummaryVerticalParamsIPVersionIPv6 AttackLayer3SummaryVerticalParamsIPVersion = "IPv6"` - `LimitPerGroup param.Field[int64]` 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]` 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]` Array of names used to label the series in the response. - `Protocol param.Field[[]AttackLayer3SummaryVerticalParamsProtocol]` Filters the results by layer 3/4 protocol. - `const AttackLayer3SummaryVerticalParamsProtocolUdp AttackLayer3SummaryVerticalParamsProtocol = "UDP"` - `const AttackLayer3SummaryVerticalParamsProtocolTCP AttackLayer3SummaryVerticalParamsProtocol = "TCP"` - `const AttackLayer3SummaryVerticalParamsProtocolIcmp AttackLayer3SummaryVerticalParamsProtocol = "ICMP"` - `const AttackLayer3SummaryVerticalParamsProtocolGRE AttackLayer3SummaryVerticalParamsProtocol = "GRE"` ### Returns - `type AttackLayer3SummaryVerticalResponse struct{…}` - `Meta AttackLayer3SummaryVerticalResponseMeta` Metadata for the results. - `ConfidenceInfo AttackLayer3SummaryVerticalResponseMetaConfidenceInfo` - `Annotations []AttackLayer3SummaryVerticalResponseMetaConfidenceInfoAnnotation` - `DataSource AttackLayer3SummaryVerticalResponseMetaConfidenceInfoAnnotationsDataSource` Data source for annotations. - `const AttackLayer3SummaryVerticalResponseMetaConfidenceInfoAnnotationsDataSourceAll AttackLayer3SummaryVerticalResponseMetaConfidenceInfoAnnotationsDataSource = "ALL"` - `const AttackLayer3SummaryVerticalResponseMetaConfidenceInfoAnnotationsDataSourceAIBots AttackLayer3SummaryVerticalResponseMetaConfidenceInfoAnnotationsDataSource = "AI_BOTS"` - `const AttackLayer3SummaryVerticalResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway AttackLayer3SummaryVerticalResponseMetaConfidenceInfoAnnotationsDataSource = "AI_GATEWAY"` - `const AttackLayer3SummaryVerticalResponseMetaConfidenceInfoAnnotationsDataSourceBGP AttackLayer3SummaryVerticalResponseMetaConfidenceInfoAnnotationsDataSource = "BGP"` - `const AttackLayer3SummaryVerticalResponseMetaConfidenceInfoAnnotationsDataSourceBots AttackLayer3SummaryVerticalResponseMetaConfidenceInfoAnnotationsDataSource = "BOTS"` - `const AttackLayer3SummaryVerticalResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly AttackLayer3SummaryVerticalResponseMetaConfidenceInfoAnnotationsDataSource = "CONNECTION_ANOMALY"` - `const AttackLayer3SummaryVerticalResponseMetaConfidenceInfoAnnotationsDataSourceCT AttackLayer3SummaryVerticalResponseMetaConfidenceInfoAnnotationsDataSource = "CT"` - `const AttackLayer3SummaryVerticalResponseMetaConfidenceInfoAnnotationsDataSourceDNS AttackLayer3SummaryVerticalResponseMetaConfidenceInfoAnnotationsDataSource = "DNS"` - `const AttackLayer3SummaryVerticalResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude AttackLayer3SummaryVerticalResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_MAGNITUDE"` - `const AttackLayer3SummaryVerticalResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112 AttackLayer3SummaryVerticalResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_AS112"` - `const AttackLayer3SummaryVerticalResponseMetaConfidenceInfoAnnotationsDataSourceDos AttackLayer3SummaryVerticalResponseMetaConfidenceInfoAnnotationsDataSource = "DOS"` - `const AttackLayer3SummaryVerticalResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting AttackLayer3SummaryVerticalResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_ROUTING"` - `const AttackLayer3SummaryVerticalResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity AttackLayer3SummaryVerticalResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_SECURITY"` - `const AttackLayer3SummaryVerticalResponseMetaConfidenceInfoAnnotationsDataSourceFw AttackLayer3SummaryVerticalResponseMetaConfidenceInfoAnnotationsDataSource = "FW"` - `const AttackLayer3SummaryVerticalResponseMetaConfidenceInfoAnnotationsDataSourceFwPg AttackLayer3SummaryVerticalResponseMetaConfidenceInfoAnnotationsDataSource = "FW_PG"` - `const AttackLayer3SummaryVerticalResponseMetaConfidenceInfoAnnotationsDataSourceHTTP AttackLayer3SummaryVerticalResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP"` - `const AttackLayer3SummaryVerticalResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl AttackLayer3SummaryVerticalResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CONTROL"` - `const AttackLayer3SummaryVerticalResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer AttackLayer3SummaryVerticalResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CRAWLER_REFERER"` - `const AttackLayer3SummaryVerticalResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins AttackLayer3SummaryVerticalResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_ORIGINS"` - `const AttackLayer3SummaryVerticalResponseMetaConfidenceInfoAnnotationsDataSourceIQI AttackLayer3SummaryVerticalResponseMetaConfidenceInfoAnnotationsDataSource = "IQI"` - `const AttackLayer3SummaryVerticalResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials AttackLayer3SummaryVerticalResponseMetaConfidenceInfoAnnotationsDataSource = "LEAKED_CREDENTIALS"` - `const AttackLayer3SummaryVerticalResponseMetaConfidenceInfoAnnotationsDataSourceNet AttackLayer3SummaryVerticalResponseMetaConfidenceInfoAnnotationsDataSource = "NET"` - `const AttackLayer3SummaryVerticalResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT AttackLayer3SummaryVerticalResponseMetaConfidenceInfoAnnotationsDataSource = "ROBOTS_TXT"` - `const AttackLayer3SummaryVerticalResponseMetaConfidenceInfoAnnotationsDataSourceSpeed AttackLayer3SummaryVerticalResponseMetaConfidenceInfoAnnotationsDataSource = "SPEED"` - `const AttackLayer3SummaryVerticalResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI AttackLayer3SummaryVerticalResponseMetaConfidenceInfoAnnotationsDataSource = "WORKERS_AI"` - `Description string` - `EndDate Time` - `EventType AttackLayer3SummaryVerticalResponseMetaConfidenceInfoAnnotationsEventType` Event type for annotations. - `const AttackLayer3SummaryVerticalResponseMetaConfidenceInfoAnnotationsEventTypeEvent AttackLayer3SummaryVerticalResponseMetaConfidenceInfoAnnotationsEventType = "EVENT"` - `const AttackLayer3SummaryVerticalResponseMetaConfidenceInfoAnnotationsEventTypeGeneral AttackLayer3SummaryVerticalResponseMetaConfidenceInfoAnnotationsEventType = "GENERAL"` - `const AttackLayer3SummaryVerticalResponseMetaConfidenceInfoAnnotationsEventTypeOutage AttackLayer3SummaryVerticalResponseMetaConfidenceInfoAnnotationsEventType = "OUTAGE"` - `const AttackLayer3SummaryVerticalResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection AttackLayer3SummaryVerticalResponseMetaConfidenceInfoAnnotationsEventType = "PARTIAL_PROJECTION"` - `const AttackLayer3SummaryVerticalResponseMetaConfidenceInfoAnnotationsEventTypePipeline AttackLayer3SummaryVerticalResponseMetaConfidenceInfoAnnotationsEventType = "PIPELINE"` - `const AttackLayer3SummaryVerticalResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly AttackLayer3SummaryVerticalResponseMetaConfidenceInfoAnnotationsEventType = "TRAFFIC_ANOMALY"` - `IsInstantaneous bool` Whether event is a single point in time or a time range. - `LinkedURL string` - `StartDate Time` - `Level int64` Provides an indication of how much confidence Cloudflare has in the data. - `DateRange []AttackLayer3SummaryVerticalResponseMetaDateRange` - `EndTime Time` Adjusted end of date range. - `StartTime Time` Adjusted start of date range. - `LastUpdated Time` Timestamp of the last dataset update. - `Normalization AttackLayer3SummaryVerticalResponseMetaNormalization` Normalization method applied to the results. Refer to [Normalization methods](https://developers.cloudflare.com/radar/concepts/normalization/). - `const AttackLayer3SummaryVerticalResponseMetaNormalizationPercentage AttackLayer3SummaryVerticalResponseMetaNormalization = "PERCENTAGE"` - `const AttackLayer3SummaryVerticalResponseMetaNormalizationMin0Max AttackLayer3SummaryVerticalResponseMetaNormalization = "MIN0_MAX"` - `const AttackLayer3SummaryVerticalResponseMetaNormalizationMinMax AttackLayer3SummaryVerticalResponseMetaNormalization = "MIN_MAX"` - `const AttackLayer3SummaryVerticalResponseMetaNormalizationRawValues AttackLayer3SummaryVerticalResponseMetaNormalization = "RAW_VALUES"` - `const AttackLayer3SummaryVerticalResponseMetaNormalizationPercentageChange AttackLayer3SummaryVerticalResponseMetaNormalization = "PERCENTAGE_CHANGE"` - `const AttackLayer3SummaryVerticalResponseMetaNormalizationRollingAverage AttackLayer3SummaryVerticalResponseMetaNormalization = "ROLLING_AVERAGE"` - `const AttackLayer3SummaryVerticalResponseMetaNormalizationOverlappedPercentage AttackLayer3SummaryVerticalResponseMetaNormalization = "OVERLAPPED_PERCENTAGE"` - `const AttackLayer3SummaryVerticalResponseMetaNormalizationRatio AttackLayer3SummaryVerticalResponseMetaNormalization = "RATIO"` - `Units []AttackLayer3SummaryVerticalResponseMetaUnit` Measurement units for the results. - `Name string` - `Value string` - `Summary0 map[string, string]` ### Example ```go 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.Vertical(context.TODO(), radar.AttackLayer3SummaryVerticalParams{ }) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", response.Meta) } ``` #### Response ```json { "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": { "Internet and Telecom": "5.519081" } }, "success": true } ``` # Timeseries Groups ## Get layer 3 attacks by target industries time series `client.Radar.Attacks.Layer3.TimeseriesGroups.Industry(ctx, query) (*AttackLayer3TimeseriesGroupIndustryResponse, error)` **get** `/radar/attacks/layer3/timeseries_groups/industry` Retrieves the distribution of layer 3 attacks by targeted industry over time. ### Parameters - `query AttackLayer3TimeseriesGroupIndustryParams` - `AggInterval param.Field[AttackLayer3TimeseriesGroupIndustryParamsAggInterval]` Aggregation interval of the results (e.g., in 15 minutes or 1 hour intervals). Refer to [Aggregation intervals](https://developers.cloudflare.com/radar/concepts/aggregation-intervals/). - `const AttackLayer3TimeseriesGroupIndustryParamsAggInterval15m AttackLayer3TimeseriesGroupIndustryParamsAggInterval = "15m"` - `const AttackLayer3TimeseriesGroupIndustryParamsAggInterval1h AttackLayer3TimeseriesGroupIndustryParamsAggInterval = "1h"` - `const AttackLayer3TimeseriesGroupIndustryParamsAggInterval1d AttackLayer3TimeseriesGroupIndustryParamsAggInterval = "1d"` - `const AttackLayer3TimeseriesGroupIndustryParamsAggInterval1w AttackLayer3TimeseriesGroupIndustryParamsAggInterval = "1w"` - `Continent param.Field[[]string]` 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]` End of the date range (inclusive). - `DateRange param.Field[[]string]` 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]` Start of the date range. - `Direction param.Field[AttackLayer3TimeseriesGroupIndustryParamsDirection]` Specifies whether the `location` filter applies to the source or target location. - `const AttackLayer3TimeseriesGroupIndustryParamsDirectionOrigin AttackLayer3TimeseriesGroupIndustryParamsDirection = "ORIGIN"` - `const AttackLayer3TimeseriesGroupIndustryParamsDirectionTarget AttackLayer3TimeseriesGroupIndustryParamsDirection = "TARGET"` - `Format param.Field[AttackLayer3TimeseriesGroupIndustryParamsFormat]` Format in which results will be returned. - `const AttackLayer3TimeseriesGroupIndustryParamsFormatJson AttackLayer3TimeseriesGroupIndustryParamsFormat = "JSON"` - `const AttackLayer3TimeseriesGroupIndustryParamsFormatCsv AttackLayer3TimeseriesGroupIndustryParamsFormat = "CSV"` - `IPVersion param.Field[[]AttackLayer3TimeseriesGroupIndustryParamsIPVersion]` Filters results by IP version (Ipv4 vs. IPv6). - `const AttackLayer3TimeseriesGroupIndustryParamsIPVersionIPv4 AttackLayer3TimeseriesGroupIndustryParamsIPVersion = "IPv4"` - `const AttackLayer3TimeseriesGroupIndustryParamsIPVersionIPv6 AttackLayer3TimeseriesGroupIndustryParamsIPVersion = "IPv6"` - `LimitPerGroup param.Field[int64]` 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]` 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]` Array of names used to label the series in the response. - `Normalization param.Field[AttackLayer3TimeseriesGroupIndustryParamsNormalization]` Normalization method applied to the results. Refer to [Normalization methods](https://developers.cloudflare.com/radar/concepts/normalization/). - `const AttackLayer3TimeseriesGroupIndustryParamsNormalizationPercentage AttackLayer3TimeseriesGroupIndustryParamsNormalization = "PERCENTAGE"` - `const AttackLayer3TimeseriesGroupIndustryParamsNormalizationMin0Max AttackLayer3TimeseriesGroupIndustryParamsNormalization = "MIN0_MAX"` - `Protocol param.Field[[]AttackLayer3TimeseriesGroupIndustryParamsProtocol]` Filters the results by layer 3/4 protocol. - `const AttackLayer3TimeseriesGroupIndustryParamsProtocolUdp AttackLayer3TimeseriesGroupIndustryParamsProtocol = "UDP"` - `const AttackLayer3TimeseriesGroupIndustryParamsProtocolTCP AttackLayer3TimeseriesGroupIndustryParamsProtocol = "TCP"` - `const AttackLayer3TimeseriesGroupIndustryParamsProtocolIcmp AttackLayer3TimeseriesGroupIndustryParamsProtocol = "ICMP"` - `const AttackLayer3TimeseriesGroupIndustryParamsProtocolGRE AttackLayer3TimeseriesGroupIndustryParamsProtocol = "GRE"` ### Returns - `type AttackLayer3TimeseriesGroupIndustryResponse struct{…}` - `Meta AttackLayer3TimeseriesGroupIndustryResponseMeta` Metadata for the results. - `AggInterval AttackLayer3TimeseriesGroupIndustryResponseMetaAggInterval` Aggregation interval of the results (e.g., in 15 minutes or 1 hour intervals). Refer to [Aggregation intervals](https://developers.cloudflare.com/radar/concepts/aggregation-intervals/). - `const AttackLayer3TimeseriesGroupIndustryResponseMetaAggIntervalFifteenMinutes AttackLayer3TimeseriesGroupIndustryResponseMetaAggInterval = "FIFTEEN_MINUTES"` - `const AttackLayer3TimeseriesGroupIndustryResponseMetaAggIntervalOneHour AttackLayer3TimeseriesGroupIndustryResponseMetaAggInterval = "ONE_HOUR"` - `const AttackLayer3TimeseriesGroupIndustryResponseMetaAggIntervalOneDay AttackLayer3TimeseriesGroupIndustryResponseMetaAggInterval = "ONE_DAY"` - `const AttackLayer3TimeseriesGroupIndustryResponseMetaAggIntervalOneWeek AttackLayer3TimeseriesGroupIndustryResponseMetaAggInterval = "ONE_WEEK"` - `const AttackLayer3TimeseriesGroupIndustryResponseMetaAggIntervalOneMonth AttackLayer3TimeseriesGroupIndustryResponseMetaAggInterval = "ONE_MONTH"` - `ConfidenceInfo AttackLayer3TimeseriesGroupIndustryResponseMetaConfidenceInfo` - `Annotations []AttackLayer3TimeseriesGroupIndustryResponseMetaConfidenceInfoAnnotation` - `DataSource AttackLayer3TimeseriesGroupIndustryResponseMetaConfidenceInfoAnnotationsDataSource` Data source for annotations. - `const AttackLayer3TimeseriesGroupIndustryResponseMetaConfidenceInfoAnnotationsDataSourceAll AttackLayer3TimeseriesGroupIndustryResponseMetaConfidenceInfoAnnotationsDataSource = "ALL"` - `const AttackLayer3TimeseriesGroupIndustryResponseMetaConfidenceInfoAnnotationsDataSourceAIBots AttackLayer3TimeseriesGroupIndustryResponseMetaConfidenceInfoAnnotationsDataSource = "AI_BOTS"` - `const AttackLayer3TimeseriesGroupIndustryResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway AttackLayer3TimeseriesGroupIndustryResponseMetaConfidenceInfoAnnotationsDataSource = "AI_GATEWAY"` - `const AttackLayer3TimeseriesGroupIndustryResponseMetaConfidenceInfoAnnotationsDataSourceBGP AttackLayer3TimeseriesGroupIndustryResponseMetaConfidenceInfoAnnotationsDataSource = "BGP"` - `const AttackLayer3TimeseriesGroupIndustryResponseMetaConfidenceInfoAnnotationsDataSourceBots AttackLayer3TimeseriesGroupIndustryResponseMetaConfidenceInfoAnnotationsDataSource = "BOTS"` - `const AttackLayer3TimeseriesGroupIndustryResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly AttackLayer3TimeseriesGroupIndustryResponseMetaConfidenceInfoAnnotationsDataSource = "CONNECTION_ANOMALY"` - `const AttackLayer3TimeseriesGroupIndustryResponseMetaConfidenceInfoAnnotationsDataSourceCT AttackLayer3TimeseriesGroupIndustryResponseMetaConfidenceInfoAnnotationsDataSource = "CT"` - `const AttackLayer3TimeseriesGroupIndustryResponseMetaConfidenceInfoAnnotationsDataSourceDNS AttackLayer3TimeseriesGroupIndustryResponseMetaConfidenceInfoAnnotationsDataSource = "DNS"` - `const AttackLayer3TimeseriesGroupIndustryResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude AttackLayer3TimeseriesGroupIndustryResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_MAGNITUDE"` - `const AttackLayer3TimeseriesGroupIndustryResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112 AttackLayer3TimeseriesGroupIndustryResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_AS112"` - `const AttackLayer3TimeseriesGroupIndustryResponseMetaConfidenceInfoAnnotationsDataSourceDos AttackLayer3TimeseriesGroupIndustryResponseMetaConfidenceInfoAnnotationsDataSource = "DOS"` - `const AttackLayer3TimeseriesGroupIndustryResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting AttackLayer3TimeseriesGroupIndustryResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_ROUTING"` - `const AttackLayer3TimeseriesGroupIndustryResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity AttackLayer3TimeseriesGroupIndustryResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_SECURITY"` - `const AttackLayer3TimeseriesGroupIndustryResponseMetaConfidenceInfoAnnotationsDataSourceFw AttackLayer3TimeseriesGroupIndustryResponseMetaConfidenceInfoAnnotationsDataSource = "FW"` - `const AttackLayer3TimeseriesGroupIndustryResponseMetaConfidenceInfoAnnotationsDataSourceFwPg AttackLayer3TimeseriesGroupIndustryResponseMetaConfidenceInfoAnnotationsDataSource = "FW_PG"` - `const AttackLayer3TimeseriesGroupIndustryResponseMetaConfidenceInfoAnnotationsDataSourceHTTP AttackLayer3TimeseriesGroupIndustryResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP"` - `const AttackLayer3TimeseriesGroupIndustryResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl AttackLayer3TimeseriesGroupIndustryResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CONTROL"` - `const AttackLayer3TimeseriesGroupIndustryResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer AttackLayer3TimeseriesGroupIndustryResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CRAWLER_REFERER"` - `const AttackLayer3TimeseriesGroupIndustryResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins AttackLayer3TimeseriesGroupIndustryResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_ORIGINS"` - `const AttackLayer3TimeseriesGroupIndustryResponseMetaConfidenceInfoAnnotationsDataSourceIQI AttackLayer3TimeseriesGroupIndustryResponseMetaConfidenceInfoAnnotationsDataSource = "IQI"` - `const AttackLayer3TimeseriesGroupIndustryResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials AttackLayer3TimeseriesGroupIndustryResponseMetaConfidenceInfoAnnotationsDataSource = "LEAKED_CREDENTIALS"` - `const AttackLayer3TimeseriesGroupIndustryResponseMetaConfidenceInfoAnnotationsDataSourceNet AttackLayer3TimeseriesGroupIndustryResponseMetaConfidenceInfoAnnotationsDataSource = "NET"` - `const AttackLayer3TimeseriesGroupIndustryResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT AttackLayer3TimeseriesGroupIndustryResponseMetaConfidenceInfoAnnotationsDataSource = "ROBOTS_TXT"` - `const AttackLayer3TimeseriesGroupIndustryResponseMetaConfidenceInfoAnnotationsDataSourceSpeed AttackLayer3TimeseriesGroupIndustryResponseMetaConfidenceInfoAnnotationsDataSource = "SPEED"` - `const AttackLayer3TimeseriesGroupIndustryResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI AttackLayer3TimeseriesGroupIndustryResponseMetaConfidenceInfoAnnotationsDataSource = "WORKERS_AI"` - `Description string` - `EndDate Time` - `EventType AttackLayer3TimeseriesGroupIndustryResponseMetaConfidenceInfoAnnotationsEventType` Event type for annotations. - `const AttackLayer3TimeseriesGroupIndustryResponseMetaConfidenceInfoAnnotationsEventTypeEvent AttackLayer3TimeseriesGroupIndustryResponseMetaConfidenceInfoAnnotationsEventType = "EVENT"` - `const AttackLayer3TimeseriesGroupIndustryResponseMetaConfidenceInfoAnnotationsEventTypeGeneral AttackLayer3TimeseriesGroupIndustryResponseMetaConfidenceInfoAnnotationsEventType = "GENERAL"` - `const AttackLayer3TimeseriesGroupIndustryResponseMetaConfidenceInfoAnnotationsEventTypeOutage AttackLayer3TimeseriesGroupIndustryResponseMetaConfidenceInfoAnnotationsEventType = "OUTAGE"` - `const AttackLayer3TimeseriesGroupIndustryResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection AttackLayer3TimeseriesGroupIndustryResponseMetaConfidenceInfoAnnotationsEventType = "PARTIAL_PROJECTION"` - `const AttackLayer3TimeseriesGroupIndustryResponseMetaConfidenceInfoAnnotationsEventTypePipeline AttackLayer3TimeseriesGroupIndustryResponseMetaConfidenceInfoAnnotationsEventType = "PIPELINE"` - `const AttackLayer3TimeseriesGroupIndustryResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly AttackLayer3TimeseriesGroupIndustryResponseMetaConfidenceInfoAnnotationsEventType = "TRAFFIC_ANOMALY"` - `IsInstantaneous bool` Whether event is a single point in time or a time range. - `LinkedURL string` - `StartDate Time` - `Level int64` Provides an indication of how much confidence Cloudflare has in the data. - `DateRange []AttackLayer3TimeseriesGroupIndustryResponseMetaDateRange` - `EndTime Time` Adjusted end of date range. - `StartTime Time` Adjusted start of date range. - `LastUpdated Time` Timestamp of the last dataset update. - `Normalization AttackLayer3TimeseriesGroupIndustryResponseMetaNormalization` Normalization method applied to the results. Refer to [Normalization methods](https://developers.cloudflare.com/radar/concepts/normalization/). - `const AttackLayer3TimeseriesGroupIndustryResponseMetaNormalizationPercentage AttackLayer3TimeseriesGroupIndustryResponseMetaNormalization = "PERCENTAGE"` - `const AttackLayer3TimeseriesGroupIndustryResponseMetaNormalizationMin0Max AttackLayer3TimeseriesGroupIndustryResponseMetaNormalization = "MIN0_MAX"` - `const AttackLayer3TimeseriesGroupIndustryResponseMetaNormalizationMinMax AttackLayer3TimeseriesGroupIndustryResponseMetaNormalization = "MIN_MAX"` - `const AttackLayer3TimeseriesGroupIndustryResponseMetaNormalizationRawValues AttackLayer3TimeseriesGroupIndustryResponseMetaNormalization = "RAW_VALUES"` - `const AttackLayer3TimeseriesGroupIndustryResponseMetaNormalizationPercentageChange AttackLayer3TimeseriesGroupIndustryResponseMetaNormalization = "PERCENTAGE_CHANGE"` - `const AttackLayer3TimeseriesGroupIndustryResponseMetaNormalizationRollingAverage AttackLayer3TimeseriesGroupIndustryResponseMetaNormalization = "ROLLING_AVERAGE"` - `const AttackLayer3TimeseriesGroupIndustryResponseMetaNormalizationOverlappedPercentage AttackLayer3TimeseriesGroupIndustryResponseMetaNormalization = "OVERLAPPED_PERCENTAGE"` - `const AttackLayer3TimeseriesGroupIndustryResponseMetaNormalizationRatio AttackLayer3TimeseriesGroupIndustryResponseMetaNormalization = "RATIO"` - `Units []AttackLayer3TimeseriesGroupIndustryResponseMetaUnit` Measurement units for the results. - `Name string` - `Value string` - `Serie0 AttackLayer3TimeseriesGroupIndustryResponseSerie0` - `Timestamps []Time` ### Example ```go 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.Industry(context.TODO(), radar.AttackLayer3TimeseriesGroupIndustryParams{ }) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", response.Meta) } ``` #### Response ```json { "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": { "timestamps": [ "2023-08-08T10:15:00Z" ] } }, "success": true } ``` ## Get layer 3 attacks by IP version time series `client.Radar.Attacks.Layer3.TimeseriesGroups.IPVersion(ctx, query) (*AttackLayer3TimeseriesGroupIPVersionResponse, error)` **get** `/radar/attacks/layer3/timeseries_groups/ip_version` Retrieves the distribution of layer 3 attacks by IP version over time. ### Parameters - `query AttackLayer3TimeseriesGroupIPVersionParams` - `AggInterval param.Field[AttackLayer3TimeseriesGroupIPVersionParamsAggInterval]` Aggregation interval of the results (e.g., in 15 minutes or 1 hour intervals). Refer to [Aggregation intervals](https://developers.cloudflare.com/radar/concepts/aggregation-intervals/). - `const AttackLayer3TimeseriesGroupIPVersionParamsAggInterval15m AttackLayer3TimeseriesGroupIPVersionParamsAggInterval = "15m"` - `const AttackLayer3TimeseriesGroupIPVersionParamsAggInterval1h AttackLayer3TimeseriesGroupIPVersionParamsAggInterval = "1h"` - `const AttackLayer3TimeseriesGroupIPVersionParamsAggInterval1d AttackLayer3TimeseriesGroupIPVersionParamsAggInterval = "1d"` - `const AttackLayer3TimeseriesGroupIPVersionParamsAggInterval1w AttackLayer3TimeseriesGroupIPVersionParamsAggInterval = "1w"` - `Continent param.Field[[]string]` 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]` End of the date range (inclusive). - `DateRange param.Field[[]string]` 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]` Start of the date range. - `Direction param.Field[AttackLayer3TimeseriesGroupIPVersionParamsDirection]` Specifies whether the `location` filter applies to the source or target location. - `const AttackLayer3TimeseriesGroupIPVersionParamsDirectionOrigin AttackLayer3TimeseriesGroupIPVersionParamsDirection = "ORIGIN"` - `const AttackLayer3TimeseriesGroupIPVersionParamsDirectionTarget AttackLayer3TimeseriesGroupIPVersionParamsDirection = "TARGET"` - `Format param.Field[AttackLayer3TimeseriesGroupIPVersionParamsFormat]` Format in which results will be returned. - `const AttackLayer3TimeseriesGroupIPVersionParamsFormatJson AttackLayer3TimeseriesGroupIPVersionParamsFormat = "JSON"` - `const AttackLayer3TimeseriesGroupIPVersionParamsFormatCsv AttackLayer3TimeseriesGroupIPVersionParamsFormat = "CSV"` - `Location param.Field[[]string]` 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]` Array of names used to label the series in the response. - `Normalization param.Field[AttackLayer3TimeseriesGroupIPVersionParamsNormalization]` Normalization method applied to the results. Refer to [Normalization methods](https://developers.cloudflare.com/radar/concepts/normalization/). - `const AttackLayer3TimeseriesGroupIPVersionParamsNormalizationPercentage AttackLayer3TimeseriesGroupIPVersionParamsNormalization = "PERCENTAGE"` - `const AttackLayer3TimeseriesGroupIPVersionParamsNormalizationMin0Max AttackLayer3TimeseriesGroupIPVersionParamsNormalization = "MIN0_MAX"` - `Protocol param.Field[[]AttackLayer3TimeseriesGroupIPVersionParamsProtocol]` Filters the results by layer 3/4 protocol. - `const AttackLayer3TimeseriesGroupIPVersionParamsProtocolUdp AttackLayer3TimeseriesGroupIPVersionParamsProtocol = "UDP"` - `const AttackLayer3TimeseriesGroupIPVersionParamsProtocolTCP AttackLayer3TimeseriesGroupIPVersionParamsProtocol = "TCP"` - `const AttackLayer3TimeseriesGroupIPVersionParamsProtocolIcmp AttackLayer3TimeseriesGroupIPVersionParamsProtocol = "ICMP"` - `const AttackLayer3TimeseriesGroupIPVersionParamsProtocolGRE AttackLayer3TimeseriesGroupIPVersionParamsProtocol = "GRE"` ### Returns - `type AttackLayer3TimeseriesGroupIPVersionResponse struct{…}` - `Meta AttackLayer3TimeseriesGroupIPVersionResponseMeta` Metadata for the results. - `AggInterval AttackLayer3TimeseriesGroupIPVersionResponseMetaAggInterval` Aggregation interval of the results (e.g., in 15 minutes or 1 hour intervals). Refer to [Aggregation intervals](https://developers.cloudflare.com/radar/concepts/aggregation-intervals/). - `const AttackLayer3TimeseriesGroupIPVersionResponseMetaAggIntervalFifteenMinutes AttackLayer3TimeseriesGroupIPVersionResponseMetaAggInterval = "FIFTEEN_MINUTES"` - `const AttackLayer3TimeseriesGroupIPVersionResponseMetaAggIntervalOneHour AttackLayer3TimeseriesGroupIPVersionResponseMetaAggInterval = "ONE_HOUR"` - `const AttackLayer3TimeseriesGroupIPVersionResponseMetaAggIntervalOneDay AttackLayer3TimeseriesGroupIPVersionResponseMetaAggInterval = "ONE_DAY"` - `const AttackLayer3TimeseriesGroupIPVersionResponseMetaAggIntervalOneWeek AttackLayer3TimeseriesGroupIPVersionResponseMetaAggInterval = "ONE_WEEK"` - `const AttackLayer3TimeseriesGroupIPVersionResponseMetaAggIntervalOneMonth AttackLayer3TimeseriesGroupIPVersionResponseMetaAggInterval = "ONE_MONTH"` - `ConfidenceInfo AttackLayer3TimeseriesGroupIPVersionResponseMetaConfidenceInfo` - `Annotations []AttackLayer3TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotation` - `DataSource AttackLayer3TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSource` Data source for annotations. - `const AttackLayer3TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceAll AttackLayer3TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "ALL"` - `const AttackLayer3TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceAIBots AttackLayer3TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "AI_BOTS"` - `const AttackLayer3TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway AttackLayer3TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "AI_GATEWAY"` - `const AttackLayer3TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceBGP AttackLayer3TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "BGP"` - `const AttackLayer3TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceBots AttackLayer3TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "BOTS"` - `const AttackLayer3TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly AttackLayer3TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "CONNECTION_ANOMALY"` - `const AttackLayer3TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceCT AttackLayer3TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "CT"` - `const AttackLayer3TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceDNS AttackLayer3TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "DNS"` - `const AttackLayer3TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude AttackLayer3TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_MAGNITUDE"` - `const AttackLayer3TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112 AttackLayer3TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_AS112"` - `const AttackLayer3TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceDos AttackLayer3TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "DOS"` - `const AttackLayer3TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting AttackLayer3TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_ROUTING"` - `const AttackLayer3TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity AttackLayer3TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_SECURITY"` - `const AttackLayer3TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceFw AttackLayer3TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "FW"` - `const AttackLayer3TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceFwPg AttackLayer3TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "FW_PG"` - `const AttackLayer3TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceHTTP AttackLayer3TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP"` - `const AttackLayer3TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl AttackLayer3TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CONTROL"` - `const AttackLayer3TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer AttackLayer3TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CRAWLER_REFERER"` - `const AttackLayer3TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins AttackLayer3TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_ORIGINS"` - `const AttackLayer3TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceIQI AttackLayer3TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "IQI"` - `const AttackLayer3TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials AttackLayer3TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "LEAKED_CREDENTIALS"` - `const AttackLayer3TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceNet AttackLayer3TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "NET"` - `const AttackLayer3TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT AttackLayer3TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "ROBOTS_TXT"` - `const AttackLayer3TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceSpeed AttackLayer3TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "SPEED"` - `const AttackLayer3TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI AttackLayer3TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "WORKERS_AI"` - `Description string` - `EndDate Time` - `EventType AttackLayer3TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsEventType` Event type for annotations. - `const AttackLayer3TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsEventTypeEvent AttackLayer3TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsEventType = "EVENT"` - `const AttackLayer3TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsEventTypeGeneral AttackLayer3TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsEventType = "GENERAL"` - `const AttackLayer3TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsEventTypeOutage AttackLayer3TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsEventType = "OUTAGE"` - `const AttackLayer3TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection AttackLayer3TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsEventType = "PARTIAL_PROJECTION"` - `const AttackLayer3TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsEventTypePipeline AttackLayer3TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsEventType = "PIPELINE"` - `const AttackLayer3TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly AttackLayer3TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsEventType = "TRAFFIC_ANOMALY"` - `IsInstantaneous bool` Whether event is a single point in time or a time range. - `LinkedURL string` - `StartDate Time` - `Level int64` Provides an indication of how much confidence Cloudflare has in the data. - `DateRange []AttackLayer3TimeseriesGroupIPVersionResponseMetaDateRange` - `EndTime Time` Adjusted end of date range. - `StartTime Time` Adjusted start of date range. - `LastUpdated Time` Timestamp of the last dataset update. - `Normalization AttackLayer3TimeseriesGroupIPVersionResponseMetaNormalization` Normalization method applied to the results. Refer to [Normalization methods](https://developers.cloudflare.com/radar/concepts/normalization/). - `const AttackLayer3TimeseriesGroupIPVersionResponseMetaNormalizationPercentage AttackLayer3TimeseriesGroupIPVersionResponseMetaNormalization = "PERCENTAGE"` - `const AttackLayer3TimeseriesGroupIPVersionResponseMetaNormalizationMin0Max AttackLayer3TimeseriesGroupIPVersionResponseMetaNormalization = "MIN0_MAX"` - `const AttackLayer3TimeseriesGroupIPVersionResponseMetaNormalizationMinMax AttackLayer3TimeseriesGroupIPVersionResponseMetaNormalization = "MIN_MAX"` - `const AttackLayer3TimeseriesGroupIPVersionResponseMetaNormalizationRawValues AttackLayer3TimeseriesGroupIPVersionResponseMetaNormalization = "RAW_VALUES"` - `const AttackLayer3TimeseriesGroupIPVersionResponseMetaNormalizationPercentageChange AttackLayer3TimeseriesGroupIPVersionResponseMetaNormalization = "PERCENTAGE_CHANGE"` - `const AttackLayer3TimeseriesGroupIPVersionResponseMetaNormalizationRollingAverage AttackLayer3TimeseriesGroupIPVersionResponseMetaNormalization = "ROLLING_AVERAGE"` - `const AttackLayer3TimeseriesGroupIPVersionResponseMetaNormalizationOverlappedPercentage AttackLayer3TimeseriesGroupIPVersionResponseMetaNormalization = "OVERLAPPED_PERCENTAGE"` - `const AttackLayer3TimeseriesGroupIPVersionResponseMetaNormalizationRatio AttackLayer3TimeseriesGroupIPVersionResponseMetaNormalization = "RATIO"` - `Units []AttackLayer3TimeseriesGroupIPVersionResponseMetaUnit` Measurement units for the results. - `Name string` - `Value string` - `Serie0 AttackLayer3TimeseriesGroupIPVersionResponseSerie0` - `IPv4 []string` - `IPv6 []string` - `Timestamps []Time` ### Example ```go 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.IPVersion(context.TODO(), radar.AttackLayer3TimeseriesGroupIPVersionParams{ }) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", response.Meta) } ``` #### Response ```json { "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": { "IPv4": [ "10" ], "IPv6": [ "10" ], "timestamps": [ "2019-12-27T18:11:19.117Z" ] } }, "success": true } ``` ## Get layer 3 attacks by protocol time series `client.Radar.Attacks.Layer3.TimeseriesGroups.Protocol(ctx, query) (*AttackLayer3TimeseriesGroupProtocolResponse, error)` **get** `/radar/attacks/layer3/timeseries_groups/protocol` Retrieves the distribution of layer 3 attacks by protocol over time. ### Parameters - `query AttackLayer3TimeseriesGroupProtocolParams` - `AggInterval param.Field[AttackLayer3TimeseriesGroupProtocolParamsAggInterval]` Aggregation interval of the results (e.g., in 15 minutes or 1 hour intervals). Refer to [Aggregation intervals](https://developers.cloudflare.com/radar/concepts/aggregation-intervals/). - `const AttackLayer3TimeseriesGroupProtocolParamsAggInterval15m AttackLayer3TimeseriesGroupProtocolParamsAggInterval = "15m"` - `const AttackLayer3TimeseriesGroupProtocolParamsAggInterval1h AttackLayer3TimeseriesGroupProtocolParamsAggInterval = "1h"` - `const AttackLayer3TimeseriesGroupProtocolParamsAggInterval1d AttackLayer3TimeseriesGroupProtocolParamsAggInterval = "1d"` - `const AttackLayer3TimeseriesGroupProtocolParamsAggInterval1w AttackLayer3TimeseriesGroupProtocolParamsAggInterval = "1w"` - `Continent param.Field[[]string]` 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]` End of the date range (inclusive). - `DateRange param.Field[[]string]` 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]` Start of the date range. - `Direction param.Field[AttackLayer3TimeseriesGroupProtocolParamsDirection]` Specifies whether the `location` filter applies to the source or target location. - `const AttackLayer3TimeseriesGroupProtocolParamsDirectionOrigin AttackLayer3TimeseriesGroupProtocolParamsDirection = "ORIGIN"` - `const AttackLayer3TimeseriesGroupProtocolParamsDirectionTarget AttackLayer3TimeseriesGroupProtocolParamsDirection = "TARGET"` - `Format param.Field[AttackLayer3TimeseriesGroupProtocolParamsFormat]` Format in which results will be returned. - `const AttackLayer3TimeseriesGroupProtocolParamsFormatJson AttackLayer3TimeseriesGroupProtocolParamsFormat = "JSON"` - `const AttackLayer3TimeseriesGroupProtocolParamsFormatCsv AttackLayer3TimeseriesGroupProtocolParamsFormat = "CSV"` - `IPVersion param.Field[[]AttackLayer3TimeseriesGroupProtocolParamsIPVersion]` Filters results by IP version (Ipv4 vs. IPv6). - `const AttackLayer3TimeseriesGroupProtocolParamsIPVersionIPv4 AttackLayer3TimeseriesGroupProtocolParamsIPVersion = "IPv4"` - `const AttackLayer3TimeseriesGroupProtocolParamsIPVersionIPv6 AttackLayer3TimeseriesGroupProtocolParamsIPVersion = "IPv6"` - `Location param.Field[[]string]` 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]` Array of names used to label the series in the response. - `Normalization param.Field[AttackLayer3TimeseriesGroupProtocolParamsNormalization]` Normalization method applied to the results. Refer to [Normalization methods](https://developers.cloudflare.com/radar/concepts/normalization/). - `const AttackLayer3TimeseriesGroupProtocolParamsNormalizationPercentage AttackLayer3TimeseriesGroupProtocolParamsNormalization = "PERCENTAGE"` - `const AttackLayer3TimeseriesGroupProtocolParamsNormalizationMin0Max AttackLayer3TimeseriesGroupProtocolParamsNormalization = "MIN0_MAX"` ### Returns - `type AttackLayer3TimeseriesGroupProtocolResponse struct{…}` - `Meta AttackLayer3TimeseriesGroupProtocolResponseMeta` Metadata for the results. - `AggInterval AttackLayer3TimeseriesGroupProtocolResponseMetaAggInterval` Aggregation interval of the results (e.g., in 15 minutes or 1 hour intervals). Refer to [Aggregation intervals](https://developers.cloudflare.com/radar/concepts/aggregation-intervals/). - `const AttackLayer3TimeseriesGroupProtocolResponseMetaAggIntervalFifteenMinutes AttackLayer3TimeseriesGroupProtocolResponseMetaAggInterval = "FIFTEEN_MINUTES"` - `const AttackLayer3TimeseriesGroupProtocolResponseMetaAggIntervalOneHour AttackLayer3TimeseriesGroupProtocolResponseMetaAggInterval = "ONE_HOUR"` - `const AttackLayer3TimeseriesGroupProtocolResponseMetaAggIntervalOneDay AttackLayer3TimeseriesGroupProtocolResponseMetaAggInterval = "ONE_DAY"` - `const AttackLayer3TimeseriesGroupProtocolResponseMetaAggIntervalOneWeek AttackLayer3TimeseriesGroupProtocolResponseMetaAggInterval = "ONE_WEEK"` - `const AttackLayer3TimeseriesGroupProtocolResponseMetaAggIntervalOneMonth AttackLayer3TimeseriesGroupProtocolResponseMetaAggInterval = "ONE_MONTH"` - `ConfidenceInfo AttackLayer3TimeseriesGroupProtocolResponseMetaConfidenceInfo` - `Annotations []AttackLayer3TimeseriesGroupProtocolResponseMetaConfidenceInfoAnnotation` - `DataSource AttackLayer3TimeseriesGroupProtocolResponseMetaConfidenceInfoAnnotationsDataSource` Data source for annotations. - `const AttackLayer3TimeseriesGroupProtocolResponseMetaConfidenceInfoAnnotationsDataSourceAll AttackLayer3TimeseriesGroupProtocolResponseMetaConfidenceInfoAnnotationsDataSource = "ALL"` - `const AttackLayer3TimeseriesGroupProtocolResponseMetaConfidenceInfoAnnotationsDataSourceAIBots AttackLayer3TimeseriesGroupProtocolResponseMetaConfidenceInfoAnnotationsDataSource = "AI_BOTS"` - `const AttackLayer3TimeseriesGroupProtocolResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway AttackLayer3TimeseriesGroupProtocolResponseMetaConfidenceInfoAnnotationsDataSource = "AI_GATEWAY"` - `const AttackLayer3TimeseriesGroupProtocolResponseMetaConfidenceInfoAnnotationsDataSourceBGP AttackLayer3TimeseriesGroupProtocolResponseMetaConfidenceInfoAnnotationsDataSource = "BGP"` - `const AttackLayer3TimeseriesGroupProtocolResponseMetaConfidenceInfoAnnotationsDataSourceBots AttackLayer3TimeseriesGroupProtocolResponseMetaConfidenceInfoAnnotationsDataSource = "BOTS"` - `const AttackLayer3TimeseriesGroupProtocolResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly AttackLayer3TimeseriesGroupProtocolResponseMetaConfidenceInfoAnnotationsDataSource = "CONNECTION_ANOMALY"` - `const AttackLayer3TimeseriesGroupProtocolResponseMetaConfidenceInfoAnnotationsDataSourceCT AttackLayer3TimeseriesGroupProtocolResponseMetaConfidenceInfoAnnotationsDataSource = "CT"` - `const AttackLayer3TimeseriesGroupProtocolResponseMetaConfidenceInfoAnnotationsDataSourceDNS AttackLayer3TimeseriesGroupProtocolResponseMetaConfidenceInfoAnnotationsDataSource = "DNS"` - `const AttackLayer3TimeseriesGroupProtocolResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude AttackLayer3TimeseriesGroupProtocolResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_MAGNITUDE"` - `const AttackLayer3TimeseriesGroupProtocolResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112 AttackLayer3TimeseriesGroupProtocolResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_AS112"` - `const AttackLayer3TimeseriesGroupProtocolResponseMetaConfidenceInfoAnnotationsDataSourceDos AttackLayer3TimeseriesGroupProtocolResponseMetaConfidenceInfoAnnotationsDataSource = "DOS"` - `const AttackLayer3TimeseriesGroupProtocolResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting AttackLayer3TimeseriesGroupProtocolResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_ROUTING"` - `const AttackLayer3TimeseriesGroupProtocolResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity AttackLayer3TimeseriesGroupProtocolResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_SECURITY"` - `const AttackLayer3TimeseriesGroupProtocolResponseMetaConfidenceInfoAnnotationsDataSourceFw AttackLayer3TimeseriesGroupProtocolResponseMetaConfidenceInfoAnnotationsDataSource = "FW"` - `const AttackLayer3TimeseriesGroupProtocolResponseMetaConfidenceInfoAnnotationsDataSourceFwPg AttackLayer3TimeseriesGroupProtocolResponseMetaConfidenceInfoAnnotationsDataSource = "FW_PG"` - `const AttackLayer3TimeseriesGroupProtocolResponseMetaConfidenceInfoAnnotationsDataSourceHTTP AttackLayer3TimeseriesGroupProtocolResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP"` - `const AttackLayer3TimeseriesGroupProtocolResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl AttackLayer3TimeseriesGroupProtocolResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CONTROL"` - `const AttackLayer3TimeseriesGroupProtocolResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer AttackLayer3TimeseriesGroupProtocolResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CRAWLER_REFERER"` - `const AttackLayer3TimeseriesGroupProtocolResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins AttackLayer3TimeseriesGroupProtocolResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_ORIGINS"` - `const AttackLayer3TimeseriesGroupProtocolResponseMetaConfidenceInfoAnnotationsDataSourceIQI AttackLayer3TimeseriesGroupProtocolResponseMetaConfidenceInfoAnnotationsDataSource = "IQI"` - `const AttackLayer3TimeseriesGroupProtocolResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials AttackLayer3TimeseriesGroupProtocolResponseMetaConfidenceInfoAnnotationsDataSource = "LEAKED_CREDENTIALS"` - `const AttackLayer3TimeseriesGroupProtocolResponseMetaConfidenceInfoAnnotationsDataSourceNet AttackLayer3TimeseriesGroupProtocolResponseMetaConfidenceInfoAnnotationsDataSource = "NET"` - `const AttackLayer3TimeseriesGroupProtocolResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT AttackLayer3TimeseriesGroupProtocolResponseMetaConfidenceInfoAnnotationsDataSource = "ROBOTS_TXT"` - `const AttackLayer3TimeseriesGroupProtocolResponseMetaConfidenceInfoAnnotationsDataSourceSpeed AttackLayer3TimeseriesGroupProtocolResponseMetaConfidenceInfoAnnotationsDataSource = "SPEED"` - `const AttackLayer3TimeseriesGroupProtocolResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI AttackLayer3TimeseriesGroupProtocolResponseMetaConfidenceInfoAnnotationsDataSource = "WORKERS_AI"` - `Description string` - `EndDate Time` - `EventType AttackLayer3TimeseriesGroupProtocolResponseMetaConfidenceInfoAnnotationsEventType` Event type for annotations. - `const AttackLayer3TimeseriesGroupProtocolResponseMetaConfidenceInfoAnnotationsEventTypeEvent AttackLayer3TimeseriesGroupProtocolResponseMetaConfidenceInfoAnnotationsEventType = "EVENT"` - `const AttackLayer3TimeseriesGroupProtocolResponseMetaConfidenceInfoAnnotationsEventTypeGeneral AttackLayer3TimeseriesGroupProtocolResponseMetaConfidenceInfoAnnotationsEventType = "GENERAL"` - `const AttackLayer3TimeseriesGroupProtocolResponseMetaConfidenceInfoAnnotationsEventTypeOutage AttackLayer3TimeseriesGroupProtocolResponseMetaConfidenceInfoAnnotationsEventType = "OUTAGE"` - `const AttackLayer3TimeseriesGroupProtocolResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection AttackLayer3TimeseriesGroupProtocolResponseMetaConfidenceInfoAnnotationsEventType = "PARTIAL_PROJECTION"` - `const AttackLayer3TimeseriesGroupProtocolResponseMetaConfidenceInfoAnnotationsEventTypePipeline AttackLayer3TimeseriesGroupProtocolResponseMetaConfidenceInfoAnnotationsEventType = "PIPELINE"` - `const AttackLayer3TimeseriesGroupProtocolResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly AttackLayer3TimeseriesGroupProtocolResponseMetaConfidenceInfoAnnotationsEventType = "TRAFFIC_ANOMALY"` - `IsInstantaneous bool` Whether event is a single point in time or a time range. - `LinkedURL string` - `StartDate Time` - `Level int64` Provides an indication of how much confidence Cloudflare has in the data. - `DateRange []AttackLayer3TimeseriesGroupProtocolResponseMetaDateRange` - `EndTime Time` Adjusted end of date range. - `StartTime Time` Adjusted start of date range. - `LastUpdated Time` Timestamp of the last dataset update. - `Normalization AttackLayer3TimeseriesGroupProtocolResponseMetaNormalization` Normalization method applied to the results. Refer to [Normalization methods](https://developers.cloudflare.com/radar/concepts/normalization/). - `const AttackLayer3TimeseriesGroupProtocolResponseMetaNormalizationPercentage AttackLayer3TimeseriesGroupProtocolResponseMetaNormalization = "PERCENTAGE"` - `const AttackLayer3TimeseriesGroupProtocolResponseMetaNormalizationMin0Max AttackLayer3TimeseriesGroupProtocolResponseMetaNormalization = "MIN0_MAX"` - `const AttackLayer3TimeseriesGroupProtocolResponseMetaNormalizationMinMax AttackLayer3TimeseriesGroupProtocolResponseMetaNormalization = "MIN_MAX"` - `const AttackLayer3TimeseriesGroupProtocolResponseMetaNormalizationRawValues AttackLayer3TimeseriesGroupProtocolResponseMetaNormalization = "RAW_VALUES"` - `const AttackLayer3TimeseriesGroupProtocolResponseMetaNormalizationPercentageChange AttackLayer3TimeseriesGroupProtocolResponseMetaNormalization = "PERCENTAGE_CHANGE"` - `const AttackLayer3TimeseriesGroupProtocolResponseMetaNormalizationRollingAverage AttackLayer3TimeseriesGroupProtocolResponseMetaNormalization = "ROLLING_AVERAGE"` - `const AttackLayer3TimeseriesGroupProtocolResponseMetaNormalizationOverlappedPercentage AttackLayer3TimeseriesGroupProtocolResponseMetaNormalization = "OVERLAPPED_PERCENTAGE"` - `const AttackLayer3TimeseriesGroupProtocolResponseMetaNormalizationRatio AttackLayer3TimeseriesGroupProtocolResponseMetaNormalization = "RATIO"` - `Units []AttackLayer3TimeseriesGroupProtocolResponseMetaUnit` Measurement units for the results. - `Name string` - `Value string` - `Serie0 AttackLayer3TimeseriesGroupProtocolResponseSerie0` - `GRE []string` - `Icmp []string` - `TCP []string` - `Timestamps []Time` - `Udp []string` ### Example ```go 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.Protocol(context.TODO(), radar.AttackLayer3TimeseriesGroupProtocolParams{ }) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", response.Meta) } ``` #### Response ```json { "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": { "GRE": [ "10" ], "ICMP": [ "10" ], "TCP": [ "10" ], "timestamps": [ "2019-12-27T18:11:19.117Z" ], "UDP": [ "10" ] } }, "success": true } ``` ## Get layer 3 attacks by vector time series `client.Radar.Attacks.Layer3.TimeseriesGroups.Vector(ctx, query) (*AttackLayer3TimeseriesGroupVectorResponse, error)` **get** `/radar/attacks/layer3/timeseries_groups/vector` Retrieves the distribution of layer 3 attacks by vector over time. ### Parameters - `query AttackLayer3TimeseriesGroupVectorParams` - `AggInterval param.Field[AttackLayer3TimeseriesGroupVectorParamsAggInterval]` Aggregation interval of the results (e.g., in 15 minutes or 1 hour intervals). Refer to [Aggregation intervals](https://developers.cloudflare.com/radar/concepts/aggregation-intervals/). - `const AttackLayer3TimeseriesGroupVectorParamsAggInterval15m AttackLayer3TimeseriesGroupVectorParamsAggInterval = "15m"` - `const AttackLayer3TimeseriesGroupVectorParamsAggInterval1h AttackLayer3TimeseriesGroupVectorParamsAggInterval = "1h"` - `const AttackLayer3TimeseriesGroupVectorParamsAggInterval1d AttackLayer3TimeseriesGroupVectorParamsAggInterval = "1d"` - `const AttackLayer3TimeseriesGroupVectorParamsAggInterval1w AttackLayer3TimeseriesGroupVectorParamsAggInterval = "1w"` - `Continent param.Field[[]string]` 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]` End of the date range (inclusive). - `DateRange param.Field[[]string]` 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]` Start of the date range. - `Direction param.Field[AttackLayer3TimeseriesGroupVectorParamsDirection]` Specifies whether the `location` filter applies to the source or target location. - `const AttackLayer3TimeseriesGroupVectorParamsDirectionOrigin AttackLayer3TimeseriesGroupVectorParamsDirection = "ORIGIN"` - `const AttackLayer3TimeseriesGroupVectorParamsDirectionTarget AttackLayer3TimeseriesGroupVectorParamsDirection = "TARGET"` - `Format param.Field[AttackLayer3TimeseriesGroupVectorParamsFormat]` Format in which results will be returned. - `const AttackLayer3TimeseriesGroupVectorParamsFormatJson AttackLayer3TimeseriesGroupVectorParamsFormat = "JSON"` - `const AttackLayer3TimeseriesGroupVectorParamsFormatCsv AttackLayer3TimeseriesGroupVectorParamsFormat = "CSV"` - `IPVersion param.Field[[]AttackLayer3TimeseriesGroupVectorParamsIPVersion]` Filters results by IP version (Ipv4 vs. IPv6). - `const AttackLayer3TimeseriesGroupVectorParamsIPVersionIPv4 AttackLayer3TimeseriesGroupVectorParamsIPVersion = "IPv4"` - `const AttackLayer3TimeseriesGroupVectorParamsIPVersionIPv6 AttackLayer3TimeseriesGroupVectorParamsIPVersion = "IPv6"` - `LimitPerGroup param.Field[int64]` 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]` 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]` Array of names used to label the series in the response. - `Normalization param.Field[AttackLayer3TimeseriesGroupVectorParamsNormalization]` Normalization method applied to the results. Refer to [Normalization methods](https://developers.cloudflare.com/radar/concepts/normalization/). - `const AttackLayer3TimeseriesGroupVectorParamsNormalizationPercentage AttackLayer3TimeseriesGroupVectorParamsNormalization = "PERCENTAGE"` - `const AttackLayer3TimeseriesGroupVectorParamsNormalizationMin0Max AttackLayer3TimeseriesGroupVectorParamsNormalization = "MIN0_MAX"` - `Protocol param.Field[[]AttackLayer3TimeseriesGroupVectorParamsProtocol]` Filters the results by layer 3/4 protocol. - `const AttackLayer3TimeseriesGroupVectorParamsProtocolUdp AttackLayer3TimeseriesGroupVectorParamsProtocol = "UDP"` - `const AttackLayer3TimeseriesGroupVectorParamsProtocolTCP AttackLayer3TimeseriesGroupVectorParamsProtocol = "TCP"` - `const AttackLayer3TimeseriesGroupVectorParamsProtocolIcmp AttackLayer3TimeseriesGroupVectorParamsProtocol = "ICMP"` - `const AttackLayer3TimeseriesGroupVectorParamsProtocolGRE AttackLayer3TimeseriesGroupVectorParamsProtocol = "GRE"` ### Returns - `type AttackLayer3TimeseriesGroupVectorResponse struct{…}` - `Meta AttackLayer3TimeseriesGroupVectorResponseMeta` Metadata for the results. - `AggInterval AttackLayer3TimeseriesGroupVectorResponseMetaAggInterval` Aggregation interval of the results (e.g., in 15 minutes or 1 hour intervals). Refer to [Aggregation intervals](https://developers.cloudflare.com/radar/concepts/aggregation-intervals/). - `const AttackLayer3TimeseriesGroupVectorResponseMetaAggIntervalFifteenMinutes AttackLayer3TimeseriesGroupVectorResponseMetaAggInterval = "FIFTEEN_MINUTES"` - `const AttackLayer3TimeseriesGroupVectorResponseMetaAggIntervalOneHour AttackLayer3TimeseriesGroupVectorResponseMetaAggInterval = "ONE_HOUR"` - `const AttackLayer3TimeseriesGroupVectorResponseMetaAggIntervalOneDay AttackLayer3TimeseriesGroupVectorResponseMetaAggInterval = "ONE_DAY"` - `const AttackLayer3TimeseriesGroupVectorResponseMetaAggIntervalOneWeek AttackLayer3TimeseriesGroupVectorResponseMetaAggInterval = "ONE_WEEK"` - `const AttackLayer3TimeseriesGroupVectorResponseMetaAggIntervalOneMonth AttackLayer3TimeseriesGroupVectorResponseMetaAggInterval = "ONE_MONTH"` - `ConfidenceInfo AttackLayer3TimeseriesGroupVectorResponseMetaConfidenceInfo` - `Annotations []AttackLayer3TimeseriesGroupVectorResponseMetaConfidenceInfoAnnotation` - `DataSource AttackLayer3TimeseriesGroupVectorResponseMetaConfidenceInfoAnnotationsDataSource` Data source for annotations. - `const AttackLayer3TimeseriesGroupVectorResponseMetaConfidenceInfoAnnotationsDataSourceAll AttackLayer3TimeseriesGroupVectorResponseMetaConfidenceInfoAnnotationsDataSource = "ALL"` - `const AttackLayer3TimeseriesGroupVectorResponseMetaConfidenceInfoAnnotationsDataSourceAIBots AttackLayer3TimeseriesGroupVectorResponseMetaConfidenceInfoAnnotationsDataSource = "AI_BOTS"` - `const AttackLayer3TimeseriesGroupVectorResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway AttackLayer3TimeseriesGroupVectorResponseMetaConfidenceInfoAnnotationsDataSource = "AI_GATEWAY"` - `const AttackLayer3TimeseriesGroupVectorResponseMetaConfidenceInfoAnnotationsDataSourceBGP AttackLayer3TimeseriesGroupVectorResponseMetaConfidenceInfoAnnotationsDataSource = "BGP"` - `const AttackLayer3TimeseriesGroupVectorResponseMetaConfidenceInfoAnnotationsDataSourceBots AttackLayer3TimeseriesGroupVectorResponseMetaConfidenceInfoAnnotationsDataSource = "BOTS"` - `const AttackLayer3TimeseriesGroupVectorResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly AttackLayer3TimeseriesGroupVectorResponseMetaConfidenceInfoAnnotationsDataSource = "CONNECTION_ANOMALY"` - `const AttackLayer3TimeseriesGroupVectorResponseMetaConfidenceInfoAnnotationsDataSourceCT AttackLayer3TimeseriesGroupVectorResponseMetaConfidenceInfoAnnotationsDataSource = "CT"` - `const AttackLayer3TimeseriesGroupVectorResponseMetaConfidenceInfoAnnotationsDataSourceDNS AttackLayer3TimeseriesGroupVectorResponseMetaConfidenceInfoAnnotationsDataSource = "DNS"` - `const AttackLayer3TimeseriesGroupVectorResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude AttackLayer3TimeseriesGroupVectorResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_MAGNITUDE"` - `const AttackLayer3TimeseriesGroupVectorResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112 AttackLayer3TimeseriesGroupVectorResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_AS112"` - `const AttackLayer3TimeseriesGroupVectorResponseMetaConfidenceInfoAnnotationsDataSourceDos AttackLayer3TimeseriesGroupVectorResponseMetaConfidenceInfoAnnotationsDataSource = "DOS"` - `const AttackLayer3TimeseriesGroupVectorResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting AttackLayer3TimeseriesGroupVectorResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_ROUTING"` - `const AttackLayer3TimeseriesGroupVectorResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity AttackLayer3TimeseriesGroupVectorResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_SECURITY"` - `const AttackLayer3TimeseriesGroupVectorResponseMetaConfidenceInfoAnnotationsDataSourceFw AttackLayer3TimeseriesGroupVectorResponseMetaConfidenceInfoAnnotationsDataSource = "FW"` - `const AttackLayer3TimeseriesGroupVectorResponseMetaConfidenceInfoAnnotationsDataSourceFwPg AttackLayer3TimeseriesGroupVectorResponseMetaConfidenceInfoAnnotationsDataSource = "FW_PG"` - `const AttackLayer3TimeseriesGroupVectorResponseMetaConfidenceInfoAnnotationsDataSourceHTTP AttackLayer3TimeseriesGroupVectorResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP"` - `const AttackLayer3TimeseriesGroupVectorResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl AttackLayer3TimeseriesGroupVectorResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CONTROL"` - `const AttackLayer3TimeseriesGroupVectorResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer AttackLayer3TimeseriesGroupVectorResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CRAWLER_REFERER"` - `const AttackLayer3TimeseriesGroupVectorResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins AttackLayer3TimeseriesGroupVectorResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_ORIGINS"` - `const AttackLayer3TimeseriesGroupVectorResponseMetaConfidenceInfoAnnotationsDataSourceIQI AttackLayer3TimeseriesGroupVectorResponseMetaConfidenceInfoAnnotationsDataSource = "IQI"` - `const AttackLayer3TimeseriesGroupVectorResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials AttackLayer3TimeseriesGroupVectorResponseMetaConfidenceInfoAnnotationsDataSource = "LEAKED_CREDENTIALS"` - `const AttackLayer3TimeseriesGroupVectorResponseMetaConfidenceInfoAnnotationsDataSourceNet AttackLayer3TimeseriesGroupVectorResponseMetaConfidenceInfoAnnotationsDataSource = "NET"` - `const AttackLayer3TimeseriesGroupVectorResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT AttackLayer3TimeseriesGroupVectorResponseMetaConfidenceInfoAnnotationsDataSource = "ROBOTS_TXT"` - `const AttackLayer3TimeseriesGroupVectorResponseMetaConfidenceInfoAnnotationsDataSourceSpeed AttackLayer3TimeseriesGroupVectorResponseMetaConfidenceInfoAnnotationsDataSource = "SPEED"` - `const AttackLayer3TimeseriesGroupVectorResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI AttackLayer3TimeseriesGroupVectorResponseMetaConfidenceInfoAnnotationsDataSource = "WORKERS_AI"` - `Description string` - `EndDate Time` - `EventType AttackLayer3TimeseriesGroupVectorResponseMetaConfidenceInfoAnnotationsEventType` Event type for annotations. - `const AttackLayer3TimeseriesGroupVectorResponseMetaConfidenceInfoAnnotationsEventTypeEvent AttackLayer3TimeseriesGroupVectorResponseMetaConfidenceInfoAnnotationsEventType = "EVENT"` - `const AttackLayer3TimeseriesGroupVectorResponseMetaConfidenceInfoAnnotationsEventTypeGeneral AttackLayer3TimeseriesGroupVectorResponseMetaConfidenceInfoAnnotationsEventType = "GENERAL"` - `const AttackLayer3TimeseriesGroupVectorResponseMetaConfidenceInfoAnnotationsEventTypeOutage AttackLayer3TimeseriesGroupVectorResponseMetaConfidenceInfoAnnotationsEventType = "OUTAGE"` - `const AttackLayer3TimeseriesGroupVectorResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection AttackLayer3TimeseriesGroupVectorResponseMetaConfidenceInfoAnnotationsEventType = "PARTIAL_PROJECTION"` - `const AttackLayer3TimeseriesGroupVectorResponseMetaConfidenceInfoAnnotationsEventTypePipeline AttackLayer3TimeseriesGroupVectorResponseMetaConfidenceInfoAnnotationsEventType = "PIPELINE"` - `const AttackLayer3TimeseriesGroupVectorResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly AttackLayer3TimeseriesGroupVectorResponseMetaConfidenceInfoAnnotationsEventType = "TRAFFIC_ANOMALY"` - `IsInstantaneous bool` Whether event is a single point in time or a time range. - `LinkedURL string` - `StartDate Time` - `Level int64` Provides an indication of how much confidence Cloudflare has in the data. - `DateRange []AttackLayer3TimeseriesGroupVectorResponseMetaDateRange` - `EndTime Time` Adjusted end of date range. - `StartTime Time` Adjusted start of date range. - `LastUpdated Time` Timestamp of the last dataset update. - `Normalization AttackLayer3TimeseriesGroupVectorResponseMetaNormalization` Normalization method applied to the results. Refer to [Normalization methods](https://developers.cloudflare.com/radar/concepts/normalization/). - `const AttackLayer3TimeseriesGroupVectorResponseMetaNormalizationPercentage AttackLayer3TimeseriesGroupVectorResponseMetaNormalization = "PERCENTAGE"` - `const AttackLayer3TimeseriesGroupVectorResponseMetaNormalizationMin0Max AttackLayer3TimeseriesGroupVectorResponseMetaNormalization = "MIN0_MAX"` - `const AttackLayer3TimeseriesGroupVectorResponseMetaNormalizationMinMax AttackLayer3TimeseriesGroupVectorResponseMetaNormalization = "MIN_MAX"` - `const AttackLayer3TimeseriesGroupVectorResponseMetaNormalizationRawValues AttackLayer3TimeseriesGroupVectorResponseMetaNormalization = "RAW_VALUES"` - `const AttackLayer3TimeseriesGroupVectorResponseMetaNormalizationPercentageChange AttackLayer3TimeseriesGroupVectorResponseMetaNormalization = "PERCENTAGE_CHANGE"` - `const AttackLayer3TimeseriesGroupVectorResponseMetaNormalizationRollingAverage AttackLayer3TimeseriesGroupVectorResponseMetaNormalization = "ROLLING_AVERAGE"` - `const AttackLayer3TimeseriesGroupVectorResponseMetaNormalizationOverlappedPercentage AttackLayer3TimeseriesGroupVectorResponseMetaNormalization = "OVERLAPPED_PERCENTAGE"` - `const AttackLayer3TimeseriesGroupVectorResponseMetaNormalizationRatio AttackLayer3TimeseriesGroupVectorResponseMetaNormalization = "RATIO"` - `Units []AttackLayer3TimeseriesGroupVectorResponseMetaUnit` Measurement units for the results. - `Name string` - `Value string` - `Serie0 AttackLayer3TimeseriesGroupVectorResponseSerie0` - `Timestamps []Time` ### Example ```go 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.Vector(context.TODO(), radar.AttackLayer3TimeseriesGroupVectorParams{ }) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", response.Meta) } ``` #### Response ```json { "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": { "timestamps": [ "2023-08-08T10:15:00Z" ] } }, "success": true } ``` ## Get layer 3 attacks by vertical time series `client.Radar.Attacks.Layer3.TimeseriesGroups.Vertical(ctx, query) (*AttackLayer3TimeseriesGroupVerticalResponse, error)` **get** `/radar/attacks/layer3/timeseries_groups/vertical` Retrieves the distribution of layer 3 attacks by targeted vertical over time. ### Parameters - `query AttackLayer3TimeseriesGroupVerticalParams` - `AggInterval param.Field[AttackLayer3TimeseriesGroupVerticalParamsAggInterval]` Aggregation interval of the results (e.g., in 15 minutes or 1 hour intervals). Refer to [Aggregation intervals](https://developers.cloudflare.com/radar/concepts/aggregation-intervals/). - `const AttackLayer3TimeseriesGroupVerticalParamsAggInterval15m AttackLayer3TimeseriesGroupVerticalParamsAggInterval = "15m"` - `const AttackLayer3TimeseriesGroupVerticalParamsAggInterval1h AttackLayer3TimeseriesGroupVerticalParamsAggInterval = "1h"` - `const AttackLayer3TimeseriesGroupVerticalParamsAggInterval1d AttackLayer3TimeseriesGroupVerticalParamsAggInterval = "1d"` - `const AttackLayer3TimeseriesGroupVerticalParamsAggInterval1w AttackLayer3TimeseriesGroupVerticalParamsAggInterval = "1w"` - `Continent param.Field[[]string]` 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]` End of the date range (inclusive). - `DateRange param.Field[[]string]` 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]` Start of the date range. - `Direction param.Field[AttackLayer3TimeseriesGroupVerticalParamsDirection]` Specifies whether the `location` filter applies to the source or target location. - `const AttackLayer3TimeseriesGroupVerticalParamsDirectionOrigin AttackLayer3TimeseriesGroupVerticalParamsDirection = "ORIGIN"` - `const AttackLayer3TimeseriesGroupVerticalParamsDirectionTarget AttackLayer3TimeseriesGroupVerticalParamsDirection = "TARGET"` - `Format param.Field[AttackLayer3TimeseriesGroupVerticalParamsFormat]` Format in which results will be returned. - `const AttackLayer3TimeseriesGroupVerticalParamsFormatJson AttackLayer3TimeseriesGroupVerticalParamsFormat = "JSON"` - `const AttackLayer3TimeseriesGroupVerticalParamsFormatCsv AttackLayer3TimeseriesGroupVerticalParamsFormat = "CSV"` - `IPVersion param.Field[[]AttackLayer3TimeseriesGroupVerticalParamsIPVersion]` Filters results by IP version (Ipv4 vs. IPv6). - `const AttackLayer3TimeseriesGroupVerticalParamsIPVersionIPv4 AttackLayer3TimeseriesGroupVerticalParamsIPVersion = "IPv4"` - `const AttackLayer3TimeseriesGroupVerticalParamsIPVersionIPv6 AttackLayer3TimeseriesGroupVerticalParamsIPVersion = "IPv6"` - `LimitPerGroup param.Field[int64]` 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]` 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]` Array of names used to label the series in the response. - `Normalization param.Field[AttackLayer3TimeseriesGroupVerticalParamsNormalization]` Normalization method applied to the results. Refer to [Normalization methods](https://developers.cloudflare.com/radar/concepts/normalization/). - `const AttackLayer3TimeseriesGroupVerticalParamsNormalizationPercentage AttackLayer3TimeseriesGroupVerticalParamsNormalization = "PERCENTAGE"` - `const AttackLayer3TimeseriesGroupVerticalParamsNormalizationMin0Max AttackLayer3TimeseriesGroupVerticalParamsNormalization = "MIN0_MAX"` - `Protocol param.Field[[]AttackLayer3TimeseriesGroupVerticalParamsProtocol]` Filters the results by layer 3/4 protocol. - `const AttackLayer3TimeseriesGroupVerticalParamsProtocolUdp AttackLayer3TimeseriesGroupVerticalParamsProtocol = "UDP"` - `const AttackLayer3TimeseriesGroupVerticalParamsProtocolTCP AttackLayer3TimeseriesGroupVerticalParamsProtocol = "TCP"` - `const AttackLayer3TimeseriesGroupVerticalParamsProtocolIcmp AttackLayer3TimeseriesGroupVerticalParamsProtocol = "ICMP"` - `const AttackLayer3TimeseriesGroupVerticalParamsProtocolGRE AttackLayer3TimeseriesGroupVerticalParamsProtocol = "GRE"` ### Returns - `type AttackLayer3TimeseriesGroupVerticalResponse struct{…}` - `Meta AttackLayer3TimeseriesGroupVerticalResponseMeta` Metadata for the results. - `AggInterval AttackLayer3TimeseriesGroupVerticalResponseMetaAggInterval` Aggregation interval of the results (e.g., in 15 minutes or 1 hour intervals). Refer to [Aggregation intervals](https://developers.cloudflare.com/radar/concepts/aggregation-intervals/). - `const AttackLayer3TimeseriesGroupVerticalResponseMetaAggIntervalFifteenMinutes AttackLayer3TimeseriesGroupVerticalResponseMetaAggInterval = "FIFTEEN_MINUTES"` - `const AttackLayer3TimeseriesGroupVerticalResponseMetaAggIntervalOneHour AttackLayer3TimeseriesGroupVerticalResponseMetaAggInterval = "ONE_HOUR"` - `const AttackLayer3TimeseriesGroupVerticalResponseMetaAggIntervalOneDay AttackLayer3TimeseriesGroupVerticalResponseMetaAggInterval = "ONE_DAY"` - `const AttackLayer3TimeseriesGroupVerticalResponseMetaAggIntervalOneWeek AttackLayer3TimeseriesGroupVerticalResponseMetaAggInterval = "ONE_WEEK"` - `const AttackLayer3TimeseriesGroupVerticalResponseMetaAggIntervalOneMonth AttackLayer3TimeseriesGroupVerticalResponseMetaAggInterval = "ONE_MONTH"` - `ConfidenceInfo AttackLayer3TimeseriesGroupVerticalResponseMetaConfidenceInfo` - `Annotations []AttackLayer3TimeseriesGroupVerticalResponseMetaConfidenceInfoAnnotation` - `DataSource AttackLayer3TimeseriesGroupVerticalResponseMetaConfidenceInfoAnnotationsDataSource` Data source for annotations. - `const AttackLayer3TimeseriesGroupVerticalResponseMetaConfidenceInfoAnnotationsDataSourceAll AttackLayer3TimeseriesGroupVerticalResponseMetaConfidenceInfoAnnotationsDataSource = "ALL"` - `const AttackLayer3TimeseriesGroupVerticalResponseMetaConfidenceInfoAnnotationsDataSourceAIBots AttackLayer3TimeseriesGroupVerticalResponseMetaConfidenceInfoAnnotationsDataSource = "AI_BOTS"` - `const AttackLayer3TimeseriesGroupVerticalResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway AttackLayer3TimeseriesGroupVerticalResponseMetaConfidenceInfoAnnotationsDataSource = "AI_GATEWAY"` - `const AttackLayer3TimeseriesGroupVerticalResponseMetaConfidenceInfoAnnotationsDataSourceBGP AttackLayer3TimeseriesGroupVerticalResponseMetaConfidenceInfoAnnotationsDataSource = "BGP"` - `const AttackLayer3TimeseriesGroupVerticalResponseMetaConfidenceInfoAnnotationsDataSourceBots AttackLayer3TimeseriesGroupVerticalResponseMetaConfidenceInfoAnnotationsDataSource = "BOTS"` - `const AttackLayer3TimeseriesGroupVerticalResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly AttackLayer3TimeseriesGroupVerticalResponseMetaConfidenceInfoAnnotationsDataSource = "CONNECTION_ANOMALY"` - `const AttackLayer3TimeseriesGroupVerticalResponseMetaConfidenceInfoAnnotationsDataSourceCT AttackLayer3TimeseriesGroupVerticalResponseMetaConfidenceInfoAnnotationsDataSource = "CT"` - `const AttackLayer3TimeseriesGroupVerticalResponseMetaConfidenceInfoAnnotationsDataSourceDNS AttackLayer3TimeseriesGroupVerticalResponseMetaConfidenceInfoAnnotationsDataSource = "DNS"` - `const AttackLayer3TimeseriesGroupVerticalResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude AttackLayer3TimeseriesGroupVerticalResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_MAGNITUDE"` - `const AttackLayer3TimeseriesGroupVerticalResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112 AttackLayer3TimeseriesGroupVerticalResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_AS112"` - `const AttackLayer3TimeseriesGroupVerticalResponseMetaConfidenceInfoAnnotationsDataSourceDos AttackLayer3TimeseriesGroupVerticalResponseMetaConfidenceInfoAnnotationsDataSource = "DOS"` - `const AttackLayer3TimeseriesGroupVerticalResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting AttackLayer3TimeseriesGroupVerticalResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_ROUTING"` - `const AttackLayer3TimeseriesGroupVerticalResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity AttackLayer3TimeseriesGroupVerticalResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_SECURITY"` - `const AttackLayer3TimeseriesGroupVerticalResponseMetaConfidenceInfoAnnotationsDataSourceFw AttackLayer3TimeseriesGroupVerticalResponseMetaConfidenceInfoAnnotationsDataSource = "FW"` - `const AttackLayer3TimeseriesGroupVerticalResponseMetaConfidenceInfoAnnotationsDataSourceFwPg AttackLayer3TimeseriesGroupVerticalResponseMetaConfidenceInfoAnnotationsDataSource = "FW_PG"` - `const AttackLayer3TimeseriesGroupVerticalResponseMetaConfidenceInfoAnnotationsDataSourceHTTP AttackLayer3TimeseriesGroupVerticalResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP"` - `const AttackLayer3TimeseriesGroupVerticalResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl AttackLayer3TimeseriesGroupVerticalResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CONTROL"` - `const AttackLayer3TimeseriesGroupVerticalResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer AttackLayer3TimeseriesGroupVerticalResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CRAWLER_REFERER"` - `const AttackLayer3TimeseriesGroupVerticalResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins AttackLayer3TimeseriesGroupVerticalResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_ORIGINS"` - `const AttackLayer3TimeseriesGroupVerticalResponseMetaConfidenceInfoAnnotationsDataSourceIQI AttackLayer3TimeseriesGroupVerticalResponseMetaConfidenceInfoAnnotationsDataSource = "IQI"` - `const AttackLayer3TimeseriesGroupVerticalResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials AttackLayer3TimeseriesGroupVerticalResponseMetaConfidenceInfoAnnotationsDataSource = "LEAKED_CREDENTIALS"` - `const AttackLayer3TimeseriesGroupVerticalResponseMetaConfidenceInfoAnnotationsDataSourceNet AttackLayer3TimeseriesGroupVerticalResponseMetaConfidenceInfoAnnotationsDataSource = "NET"` - `const AttackLayer3TimeseriesGroupVerticalResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT AttackLayer3TimeseriesGroupVerticalResponseMetaConfidenceInfoAnnotationsDataSource = "ROBOTS_TXT"` - `const AttackLayer3TimeseriesGroupVerticalResponseMetaConfidenceInfoAnnotationsDataSourceSpeed AttackLayer3TimeseriesGroupVerticalResponseMetaConfidenceInfoAnnotationsDataSource = "SPEED"` - `const AttackLayer3TimeseriesGroupVerticalResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI AttackLayer3TimeseriesGroupVerticalResponseMetaConfidenceInfoAnnotationsDataSource = "WORKERS_AI"` - `Description string` - `EndDate Time` - `EventType AttackLayer3TimeseriesGroupVerticalResponseMetaConfidenceInfoAnnotationsEventType` Event type for annotations. - `const AttackLayer3TimeseriesGroupVerticalResponseMetaConfidenceInfoAnnotationsEventTypeEvent AttackLayer3TimeseriesGroupVerticalResponseMetaConfidenceInfoAnnotationsEventType = "EVENT"` - `const AttackLayer3TimeseriesGroupVerticalResponseMetaConfidenceInfoAnnotationsEventTypeGeneral AttackLayer3TimeseriesGroupVerticalResponseMetaConfidenceInfoAnnotationsEventType = "GENERAL"` - `const AttackLayer3TimeseriesGroupVerticalResponseMetaConfidenceInfoAnnotationsEventTypeOutage AttackLayer3TimeseriesGroupVerticalResponseMetaConfidenceInfoAnnotationsEventType = "OUTAGE"` - `const AttackLayer3TimeseriesGroupVerticalResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection AttackLayer3TimeseriesGroupVerticalResponseMetaConfidenceInfoAnnotationsEventType = "PARTIAL_PROJECTION"` - `const AttackLayer3TimeseriesGroupVerticalResponseMetaConfidenceInfoAnnotationsEventTypePipeline AttackLayer3TimeseriesGroupVerticalResponseMetaConfidenceInfoAnnotationsEventType = "PIPELINE"` - `const AttackLayer3TimeseriesGroupVerticalResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly AttackLayer3TimeseriesGroupVerticalResponseMetaConfidenceInfoAnnotationsEventType = "TRAFFIC_ANOMALY"` - `IsInstantaneous bool` Whether event is a single point in time or a time range. - `LinkedURL string` - `StartDate Time` - `Level int64` Provides an indication of how much confidence Cloudflare has in the data. - `DateRange []AttackLayer3TimeseriesGroupVerticalResponseMetaDateRange` - `EndTime Time` Adjusted end of date range. - `StartTime Time` Adjusted start of date range. - `LastUpdated Time` Timestamp of the last dataset update. - `Normalization AttackLayer3TimeseriesGroupVerticalResponseMetaNormalization` Normalization method applied to the results. Refer to [Normalization methods](https://developers.cloudflare.com/radar/concepts/normalization/). - `const AttackLayer3TimeseriesGroupVerticalResponseMetaNormalizationPercentage AttackLayer3TimeseriesGroupVerticalResponseMetaNormalization = "PERCENTAGE"` - `const AttackLayer3TimeseriesGroupVerticalResponseMetaNormalizationMin0Max AttackLayer3TimeseriesGroupVerticalResponseMetaNormalization = "MIN0_MAX"` - `const AttackLayer3TimeseriesGroupVerticalResponseMetaNormalizationMinMax AttackLayer3TimeseriesGroupVerticalResponseMetaNormalization = "MIN_MAX"` - `const AttackLayer3TimeseriesGroupVerticalResponseMetaNormalizationRawValues AttackLayer3TimeseriesGroupVerticalResponseMetaNormalization = "RAW_VALUES"` - `const AttackLayer3TimeseriesGroupVerticalResponseMetaNormalizationPercentageChange AttackLayer3TimeseriesGroupVerticalResponseMetaNormalization = "PERCENTAGE_CHANGE"` - `const AttackLayer3TimeseriesGroupVerticalResponseMetaNormalizationRollingAverage AttackLayer3TimeseriesGroupVerticalResponseMetaNormalization = "ROLLING_AVERAGE"` - `const AttackLayer3TimeseriesGroupVerticalResponseMetaNormalizationOverlappedPercentage AttackLayer3TimeseriesGroupVerticalResponseMetaNormalization = "OVERLAPPED_PERCENTAGE"` - `const AttackLayer3TimeseriesGroupVerticalResponseMetaNormalizationRatio AttackLayer3TimeseriesGroupVerticalResponseMetaNormalization = "RATIO"` - `Units []AttackLayer3TimeseriesGroupVerticalResponseMetaUnit` Measurement units for the results. - `Name string` - `Value string` - `Serie0 AttackLayer3TimeseriesGroupVerticalResponseSerie0` - `Timestamps []Time` ### Example ```go 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.Vertical(context.TODO(), radar.AttackLayer3TimeseriesGroupVerticalParams{ }) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", response.Meta) } ``` #### Response ```json { "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": { "timestamps": [ "2023-08-08T10:15:00Z" ] } }, "success": true } ``` ## Get layer 3 attacks by bitrate time series `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. ### Parameters - `query AttackLayer3TimeseriesGroupBitrateParams` - `AggInterval param.Field[AttackLayer3TimeseriesGroupBitrateParamsAggInterval]` Aggregation interval of the results (e.g., in 15 minutes or 1 hour intervals). Refer to [Aggregation intervals](https://developers.cloudflare.com/radar/concepts/aggregation-intervals/). - `const AttackLayer3TimeseriesGroupBitrateParamsAggInterval15m AttackLayer3TimeseriesGroupBitrateParamsAggInterval = "15m"` - `const AttackLayer3TimeseriesGroupBitrateParamsAggInterval1h AttackLayer3TimeseriesGroupBitrateParamsAggInterval = "1h"` - `const AttackLayer3TimeseriesGroupBitrateParamsAggInterval1d AttackLayer3TimeseriesGroupBitrateParamsAggInterval = "1d"` - `const AttackLayer3TimeseriesGroupBitrateParamsAggInterval1w AttackLayer3TimeseriesGroupBitrateParamsAggInterval = "1w"` - `Continent param.Field[[]string]` 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]` End of the date range (inclusive). - `DateRange param.Field[[]string]` 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]` Start of the date range. - `Direction param.Field[AttackLayer3TimeseriesGroupBitrateParamsDirection]` Specifies whether the `location` filter applies to the source or target location. - `const AttackLayer3TimeseriesGroupBitrateParamsDirectionOrigin AttackLayer3TimeseriesGroupBitrateParamsDirection = "ORIGIN"` - `const AttackLayer3TimeseriesGroupBitrateParamsDirectionTarget AttackLayer3TimeseriesGroupBitrateParamsDirection = "TARGET"` - `Format param.Field[AttackLayer3TimeseriesGroupBitrateParamsFormat]` Format in which results will be returned. - `const AttackLayer3TimeseriesGroupBitrateParamsFormatJson AttackLayer3TimeseriesGroupBitrateParamsFormat = "JSON"` - `const AttackLayer3TimeseriesGroupBitrateParamsFormatCsv AttackLayer3TimeseriesGroupBitrateParamsFormat = "CSV"` - `IPVersion param.Field[[]AttackLayer3TimeseriesGroupBitrateParamsIPVersion]` Filters results by IP version (Ipv4 vs. IPv6). - `const AttackLayer3TimeseriesGroupBitrateParamsIPVersionIPv4 AttackLayer3TimeseriesGroupBitrateParamsIPVersion = "IPv4"` - `const AttackLayer3TimeseriesGroupBitrateParamsIPVersionIPv6 AttackLayer3TimeseriesGroupBitrateParamsIPVersion = "IPv6"` - `Location param.Field[[]string]` 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]` Array of names used to label the series in the response. - `Normalization param.Field[AttackLayer3TimeseriesGroupBitrateParamsNormalization]` Normalization method applied to the results. Refer to [Normalization methods](https://developers.cloudflare.com/radar/concepts/normalization/). - `const AttackLayer3TimeseriesGroupBitrateParamsNormalizationPercentage AttackLayer3TimeseriesGroupBitrateParamsNormalization = "PERCENTAGE"` - `const AttackLayer3TimeseriesGroupBitrateParamsNormalizationMin0Max AttackLayer3TimeseriesGroupBitrateParamsNormalization = "MIN0_MAX"` - `Protocol param.Field[[]AttackLayer3TimeseriesGroupBitrateParamsProtocol]` Filters the results by layer 3/4 protocol. - `const AttackLayer3TimeseriesGroupBitrateParamsProtocolUdp AttackLayer3TimeseriesGroupBitrateParamsProtocol = "UDP"` - `const AttackLayer3TimeseriesGroupBitrateParamsProtocolTCP AttackLayer3TimeseriesGroupBitrateParamsProtocol = "TCP"` - `const AttackLayer3TimeseriesGroupBitrateParamsProtocolIcmp AttackLayer3TimeseriesGroupBitrateParamsProtocol = "ICMP"` - `const AttackLayer3TimeseriesGroupBitrateParamsProtocolGRE AttackLayer3TimeseriesGroupBitrateParamsProtocol = "GRE"` ### Returns - `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](https://developers.cloudflare.com/radar/concepts/aggregation-intervals/). - `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. - `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` - `EventType AttackLayer3TimeseriesGroupBitrateResponseMetaConfidenceInfoAnnotationsEventType` Event type for annotations. - `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` - `StartDate Time` - `Level int64` Provides an indication of how much confidence Cloudflare has in the data. - `DateRange []AttackLayer3TimeseriesGroupBitrateResponseMetaDateRange` - `EndTime Time` Adjusted end of date range. - `StartTime Time` Adjusted start of date range. - `LastUpdated Time` Timestamp of the last dataset update. - `Normalization AttackLayer3TimeseriesGroupBitrateResponseMetaNormalization` Normalization method applied to the results. Refer to [Normalization methods](https://developers.cloudflare.com/radar/concepts/normalization/). - `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` ### Example ```go 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) } ``` #### Response ```json { "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 } ``` ## Get layer 3 attacks by duration time series `client.Radar.Attacks.Layer3.TimeseriesGroups.Duration(ctx, query) (*AttackLayer3TimeseriesGroupDurationResponse, error)` **get** `/radar/attacks/layer3/timeseries_groups/duration` Retrieves the distribution of layer 3 attacks by duration over time. ### Parameters - `query AttackLayer3TimeseriesGroupDurationParams` - `AggInterval param.Field[AttackLayer3TimeseriesGroupDurationParamsAggInterval]` Aggregation interval of the results (e.g., in 15 minutes or 1 hour intervals). Refer to [Aggregation intervals](https://developers.cloudflare.com/radar/concepts/aggregation-intervals/). - `const AttackLayer3TimeseriesGroupDurationParamsAggInterval15m AttackLayer3TimeseriesGroupDurationParamsAggInterval = "15m"` - `const AttackLayer3TimeseriesGroupDurationParamsAggInterval1h AttackLayer3TimeseriesGroupDurationParamsAggInterval = "1h"` - `const AttackLayer3TimeseriesGroupDurationParamsAggInterval1d AttackLayer3TimeseriesGroupDurationParamsAggInterval = "1d"` - `const AttackLayer3TimeseriesGroupDurationParamsAggInterval1w AttackLayer3TimeseriesGroupDurationParamsAggInterval = "1w"` - `Continent param.Field[[]string]` 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]` End of the date range (inclusive). - `DateRange param.Field[[]string]` 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]` Start of the date range. - `Direction param.Field[AttackLayer3TimeseriesGroupDurationParamsDirection]` Specifies whether the `location` filter applies to the source or target location. - `const AttackLayer3TimeseriesGroupDurationParamsDirectionOrigin AttackLayer3TimeseriesGroupDurationParamsDirection = "ORIGIN"` - `const AttackLayer3TimeseriesGroupDurationParamsDirectionTarget AttackLayer3TimeseriesGroupDurationParamsDirection = "TARGET"` - `Format param.Field[AttackLayer3TimeseriesGroupDurationParamsFormat]` Format in which results will be returned. - `const AttackLayer3TimeseriesGroupDurationParamsFormatJson AttackLayer3TimeseriesGroupDurationParamsFormat = "JSON"` - `const AttackLayer3TimeseriesGroupDurationParamsFormatCsv AttackLayer3TimeseriesGroupDurationParamsFormat = "CSV"` - `IPVersion param.Field[[]AttackLayer3TimeseriesGroupDurationParamsIPVersion]` Filters results by IP version (Ipv4 vs. IPv6). - `const AttackLayer3TimeseriesGroupDurationParamsIPVersionIPv4 AttackLayer3TimeseriesGroupDurationParamsIPVersion = "IPv4"` - `const AttackLayer3TimeseriesGroupDurationParamsIPVersionIPv6 AttackLayer3TimeseriesGroupDurationParamsIPVersion = "IPv6"` - `Location param.Field[[]string]` 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]` Array of names used to label the series in the response. - `Normalization param.Field[AttackLayer3TimeseriesGroupDurationParamsNormalization]` Normalization method applied to the results. Refer to [Normalization methods](https://developers.cloudflare.com/radar/concepts/normalization/). - `const AttackLayer3TimeseriesGroupDurationParamsNormalizationPercentage AttackLayer3TimeseriesGroupDurationParamsNormalization = "PERCENTAGE"` - `const AttackLayer3TimeseriesGroupDurationParamsNormalizationMin0Max AttackLayer3TimeseriesGroupDurationParamsNormalization = "MIN0_MAX"` - `Protocol param.Field[[]AttackLayer3TimeseriesGroupDurationParamsProtocol]` Filters the results by layer 3/4 protocol. - `const AttackLayer3TimeseriesGroupDurationParamsProtocolUdp AttackLayer3TimeseriesGroupDurationParamsProtocol = "UDP"` - `const AttackLayer3TimeseriesGroupDurationParamsProtocolTCP AttackLayer3TimeseriesGroupDurationParamsProtocol = "TCP"` - `const AttackLayer3TimeseriesGroupDurationParamsProtocolIcmp AttackLayer3TimeseriesGroupDurationParamsProtocol = "ICMP"` - `const AttackLayer3TimeseriesGroupDurationParamsProtocolGRE AttackLayer3TimeseriesGroupDurationParamsProtocol = "GRE"` ### Returns - `type AttackLayer3TimeseriesGroupDurationResponse struct{…}` - `Meta AttackLayer3TimeseriesGroupDurationResponseMeta` Metadata for the results. - `AggInterval AttackLayer3TimeseriesGroupDurationResponseMetaAggInterval` Aggregation interval of the results (e.g., in 15 minutes or 1 hour intervals). Refer to [Aggregation intervals](https://developers.cloudflare.com/radar/concepts/aggregation-intervals/). - `const AttackLayer3TimeseriesGroupDurationResponseMetaAggIntervalFifteenMinutes AttackLayer3TimeseriesGroupDurationResponseMetaAggInterval = "FIFTEEN_MINUTES"` - `const AttackLayer3TimeseriesGroupDurationResponseMetaAggIntervalOneHour AttackLayer3TimeseriesGroupDurationResponseMetaAggInterval = "ONE_HOUR"` - `const AttackLayer3TimeseriesGroupDurationResponseMetaAggIntervalOneDay AttackLayer3TimeseriesGroupDurationResponseMetaAggInterval = "ONE_DAY"` - `const AttackLayer3TimeseriesGroupDurationResponseMetaAggIntervalOneWeek AttackLayer3TimeseriesGroupDurationResponseMetaAggInterval = "ONE_WEEK"` - `const AttackLayer3TimeseriesGroupDurationResponseMetaAggIntervalOneMonth AttackLayer3TimeseriesGroupDurationResponseMetaAggInterval = "ONE_MONTH"` - `ConfidenceInfo AttackLayer3TimeseriesGroupDurationResponseMetaConfidenceInfo` - `Annotations []AttackLayer3TimeseriesGroupDurationResponseMetaConfidenceInfoAnnotation` - `DataSource AttackLayer3TimeseriesGroupDurationResponseMetaConfidenceInfoAnnotationsDataSource` Data source for annotations. - `const AttackLayer3TimeseriesGroupDurationResponseMetaConfidenceInfoAnnotationsDataSourceAll AttackLayer3TimeseriesGroupDurationResponseMetaConfidenceInfoAnnotationsDataSource = "ALL"` - `const AttackLayer3TimeseriesGroupDurationResponseMetaConfidenceInfoAnnotationsDataSourceAIBots AttackLayer3TimeseriesGroupDurationResponseMetaConfidenceInfoAnnotationsDataSource = "AI_BOTS"` - `const AttackLayer3TimeseriesGroupDurationResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway AttackLayer3TimeseriesGroupDurationResponseMetaConfidenceInfoAnnotationsDataSource = "AI_GATEWAY"` - `const AttackLayer3TimeseriesGroupDurationResponseMetaConfidenceInfoAnnotationsDataSourceBGP AttackLayer3TimeseriesGroupDurationResponseMetaConfidenceInfoAnnotationsDataSource = "BGP"` - `const AttackLayer3TimeseriesGroupDurationResponseMetaConfidenceInfoAnnotationsDataSourceBots AttackLayer3TimeseriesGroupDurationResponseMetaConfidenceInfoAnnotationsDataSource = "BOTS"` - `const AttackLayer3TimeseriesGroupDurationResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly AttackLayer3TimeseriesGroupDurationResponseMetaConfidenceInfoAnnotationsDataSource = "CONNECTION_ANOMALY"` - `const AttackLayer3TimeseriesGroupDurationResponseMetaConfidenceInfoAnnotationsDataSourceCT AttackLayer3TimeseriesGroupDurationResponseMetaConfidenceInfoAnnotationsDataSource = "CT"` - `const AttackLayer3TimeseriesGroupDurationResponseMetaConfidenceInfoAnnotationsDataSourceDNS AttackLayer3TimeseriesGroupDurationResponseMetaConfidenceInfoAnnotationsDataSource = "DNS"` - `const AttackLayer3TimeseriesGroupDurationResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude AttackLayer3TimeseriesGroupDurationResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_MAGNITUDE"` - `const AttackLayer3TimeseriesGroupDurationResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112 AttackLayer3TimeseriesGroupDurationResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_AS112"` - `const AttackLayer3TimeseriesGroupDurationResponseMetaConfidenceInfoAnnotationsDataSourceDos AttackLayer3TimeseriesGroupDurationResponseMetaConfidenceInfoAnnotationsDataSource = "DOS"` - `const AttackLayer3TimeseriesGroupDurationResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting AttackLayer3TimeseriesGroupDurationResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_ROUTING"` - `const AttackLayer3TimeseriesGroupDurationResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity AttackLayer3TimeseriesGroupDurationResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_SECURITY"` - `const AttackLayer3TimeseriesGroupDurationResponseMetaConfidenceInfoAnnotationsDataSourceFw AttackLayer3TimeseriesGroupDurationResponseMetaConfidenceInfoAnnotationsDataSource = "FW"` - `const AttackLayer3TimeseriesGroupDurationResponseMetaConfidenceInfoAnnotationsDataSourceFwPg AttackLayer3TimeseriesGroupDurationResponseMetaConfidenceInfoAnnotationsDataSource = "FW_PG"` - `const AttackLayer3TimeseriesGroupDurationResponseMetaConfidenceInfoAnnotationsDataSourceHTTP AttackLayer3TimeseriesGroupDurationResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP"` - `const AttackLayer3TimeseriesGroupDurationResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl AttackLayer3TimeseriesGroupDurationResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CONTROL"` - `const AttackLayer3TimeseriesGroupDurationResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer AttackLayer3TimeseriesGroupDurationResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CRAWLER_REFERER"` - `const AttackLayer3TimeseriesGroupDurationResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins AttackLayer3TimeseriesGroupDurationResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_ORIGINS"` - `const AttackLayer3TimeseriesGroupDurationResponseMetaConfidenceInfoAnnotationsDataSourceIQI AttackLayer3TimeseriesGroupDurationResponseMetaConfidenceInfoAnnotationsDataSource = "IQI"` - `const AttackLayer3TimeseriesGroupDurationResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials AttackLayer3TimeseriesGroupDurationResponseMetaConfidenceInfoAnnotationsDataSource = "LEAKED_CREDENTIALS"` - `const AttackLayer3TimeseriesGroupDurationResponseMetaConfidenceInfoAnnotationsDataSourceNet AttackLayer3TimeseriesGroupDurationResponseMetaConfidenceInfoAnnotationsDataSource = "NET"` - `const AttackLayer3TimeseriesGroupDurationResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT AttackLayer3TimeseriesGroupDurationResponseMetaConfidenceInfoAnnotationsDataSource = "ROBOTS_TXT"` - `const AttackLayer3TimeseriesGroupDurationResponseMetaConfidenceInfoAnnotationsDataSourceSpeed AttackLayer3TimeseriesGroupDurationResponseMetaConfidenceInfoAnnotationsDataSource = "SPEED"` - `const AttackLayer3TimeseriesGroupDurationResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI AttackLayer3TimeseriesGroupDurationResponseMetaConfidenceInfoAnnotationsDataSource = "WORKERS_AI"` - `Description string` - `EndDate Time` - `EventType AttackLayer3TimeseriesGroupDurationResponseMetaConfidenceInfoAnnotationsEventType` Event type for annotations. - `const AttackLayer3TimeseriesGroupDurationResponseMetaConfidenceInfoAnnotationsEventTypeEvent AttackLayer3TimeseriesGroupDurationResponseMetaConfidenceInfoAnnotationsEventType = "EVENT"` - `const AttackLayer3TimeseriesGroupDurationResponseMetaConfidenceInfoAnnotationsEventTypeGeneral AttackLayer3TimeseriesGroupDurationResponseMetaConfidenceInfoAnnotationsEventType = "GENERAL"` - `const AttackLayer3TimeseriesGroupDurationResponseMetaConfidenceInfoAnnotationsEventTypeOutage AttackLayer3TimeseriesGroupDurationResponseMetaConfidenceInfoAnnotationsEventType = "OUTAGE"` - `const AttackLayer3TimeseriesGroupDurationResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection AttackLayer3TimeseriesGroupDurationResponseMetaConfidenceInfoAnnotationsEventType = "PARTIAL_PROJECTION"` - `const AttackLayer3TimeseriesGroupDurationResponseMetaConfidenceInfoAnnotationsEventTypePipeline AttackLayer3TimeseriesGroupDurationResponseMetaConfidenceInfoAnnotationsEventType = "PIPELINE"` - `const AttackLayer3TimeseriesGroupDurationResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly AttackLayer3TimeseriesGroupDurationResponseMetaConfidenceInfoAnnotationsEventType = "TRAFFIC_ANOMALY"` - `IsInstantaneous bool` Whether event is a single point in time or a time range. - `LinkedURL string` - `StartDate Time` - `Level int64` Provides an indication of how much confidence Cloudflare has in the data. - `DateRange []AttackLayer3TimeseriesGroupDurationResponseMetaDateRange` - `EndTime Time` Adjusted end of date range. - `StartTime Time` Adjusted start of date range. - `LastUpdated Time` Timestamp of the last dataset update. - `Normalization AttackLayer3TimeseriesGroupDurationResponseMetaNormalization` Normalization method applied to the results. Refer to [Normalization methods](https://developers.cloudflare.com/radar/concepts/normalization/). - `const AttackLayer3TimeseriesGroupDurationResponseMetaNormalizationPercentage AttackLayer3TimeseriesGroupDurationResponseMetaNormalization = "PERCENTAGE"` - `const AttackLayer3TimeseriesGroupDurationResponseMetaNormalizationMin0Max AttackLayer3TimeseriesGroupDurationResponseMetaNormalization = "MIN0_MAX"` - `const AttackLayer3TimeseriesGroupDurationResponseMetaNormalizationMinMax AttackLayer3TimeseriesGroupDurationResponseMetaNormalization = "MIN_MAX"` - `const AttackLayer3TimeseriesGroupDurationResponseMetaNormalizationRawValues AttackLayer3TimeseriesGroupDurationResponseMetaNormalization = "RAW_VALUES"` - `const AttackLayer3TimeseriesGroupDurationResponseMetaNormalizationPercentageChange AttackLayer3TimeseriesGroupDurationResponseMetaNormalization = "PERCENTAGE_CHANGE"` - `const AttackLayer3TimeseriesGroupDurationResponseMetaNormalizationRollingAverage AttackLayer3TimeseriesGroupDurationResponseMetaNormalization = "ROLLING_AVERAGE"` - `const AttackLayer3TimeseriesGroupDurationResponseMetaNormalizationOverlappedPercentage AttackLayer3TimeseriesGroupDurationResponseMetaNormalization = "OVERLAPPED_PERCENTAGE"` - `const AttackLayer3TimeseriesGroupDurationResponseMetaNormalizationRatio AttackLayer3TimeseriesGroupDurationResponseMetaNormalization = "RATIO"` - `Units []AttackLayer3TimeseriesGroupDurationResponseMetaUnit` Measurement units for the results. - `Name string` - `Value string` - `Serie0 AttackLayer3TimeseriesGroupDurationResponseSerie0` - `OneHourToThreeHours []string` - `TenMinsToTwentyMins []string` - `TwentyMinsToFortyMins []string` - `FortyMinsToOneHour []string` - `Over3Hours []string` - `Timestamps []Time` - `Under10Mins []string` ### Example ```go 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.Duration(context.TODO(), radar.AttackLayer3TimeseriesGroupDurationParams{ }) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", response.Meta) } ``` #### Response ```json { "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_HOUR_TO_3_HOURS": [ "10" ], "_10_MINS_TO_20_MINS": [ "10" ], "_20_MINS_TO_40_MINS": [ "10" ], "_40_MINS_TO_1_HOUR": [ "10" ], "OVER_3_HOURS": [ "10" ], "timestamps": [ "2019-12-27T18:11:19.117Z" ], "UNDER_10_MINS": [ "10" ] } }, "success": true } ``` # Top ## Get top layer 3 attack pairs (origin and target locations) `client.Radar.Attacks.Layer3.Top.Attacks(ctx, query) (*AttackLayer3TopAttacksResponse, error)` **get** `/radar/attacks/layer3/top/attacks` Retrieves the top layer 3 attacks from origin to target location. Values are a percentage out of the total layer 3 attacks (with billing country). You can optionally limit the number of attacks by origin/target location (useful if all the top attacks are from or to the same location). ### Parameters - `query AttackLayer3TopAttacksParams` - `Continent param.Field[[]string]` 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]` End of the date range (inclusive). - `DateRange param.Field[[]string]` 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]` Start of the date range. - `Format param.Field[AttackLayer3TopAttacksParamsFormat]` Format in which results will be returned. - `const AttackLayer3TopAttacksParamsFormatJson AttackLayer3TopAttacksParamsFormat = "JSON"` - `const AttackLayer3TopAttacksParamsFormatCsv AttackLayer3TopAttacksParamsFormat = "CSV"` - `IPVersion param.Field[[]AttackLayer3TopAttacksParamsIPVersion]` Filters results by IP version (Ipv4 vs. IPv6). - `const AttackLayer3TopAttacksParamsIPVersionIPv4 AttackLayer3TopAttacksParamsIPVersion = "IPv4"` - `const AttackLayer3TopAttacksParamsIPVersionIPv6 AttackLayer3TopAttacksParamsIPVersion = "IPv6"` - `Limit param.Field[int64]` Limits the number of objects returned in the response. - `LimitDirection param.Field[AttackLayer3TopAttacksParamsLimitDirection]` Specifies whether the `limitPerLocation` applies to the source or target location. - `const AttackLayer3TopAttacksParamsLimitDirectionOrigin AttackLayer3TopAttacksParamsLimitDirection = "ORIGIN"` - `const AttackLayer3TopAttacksParamsLimitDirectionTarget AttackLayer3TopAttacksParamsLimitDirection = "TARGET"` - `LimitPerLocation param.Field[int64]` Limits the number of attacks per origin/target (refer to `limitDirection` parameter) location. - `Location param.Field[[]string]` 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. - `Magnitude param.Field[AttackLayer3TopAttacksParamsMagnitude]` Orders results based on attack magnitude, defined by total mitigated bytes or total mitigated attacks. - `const AttackLayer3TopAttacksParamsMagnitudeMitigatedBytes AttackLayer3TopAttacksParamsMagnitude = "MITIGATED_BYTES"` - `const AttackLayer3TopAttacksParamsMagnitudeMitigatedAttacks AttackLayer3TopAttacksParamsMagnitude = "MITIGATED_ATTACKS"` - `Name param.Field[[]string]` Array of names used to label the series in the response. - `Normalization param.Field[AttackLayer3TopAttacksParamsNormalization]` Normalization method applied to the results. Refer to [Normalization methods](https://developers.cloudflare.com/radar/concepts/normalization/). - `const AttackLayer3TopAttacksParamsNormalizationPercentage AttackLayer3TopAttacksParamsNormalization = "PERCENTAGE"` - `const AttackLayer3TopAttacksParamsNormalizationMinMax AttackLayer3TopAttacksParamsNormalization = "MIN_MAX"` - `Protocol param.Field[[]AttackLayer3TopAttacksParamsProtocol]` Filters the results by layer 3/4 protocol. - `const AttackLayer3TopAttacksParamsProtocolUdp AttackLayer3TopAttacksParamsProtocol = "UDP"` - `const AttackLayer3TopAttacksParamsProtocolTCP AttackLayer3TopAttacksParamsProtocol = "TCP"` - `const AttackLayer3TopAttacksParamsProtocolIcmp AttackLayer3TopAttacksParamsProtocol = "ICMP"` - `const AttackLayer3TopAttacksParamsProtocolGRE AttackLayer3TopAttacksParamsProtocol = "GRE"` ### Returns - `type AttackLayer3TopAttacksResponse struct{…}` - `Meta AttackLayer3TopAttacksResponseMeta` Metadata for the results. - `ConfidenceInfo AttackLayer3TopAttacksResponseMetaConfidenceInfo` - `Annotations []AttackLayer3TopAttacksResponseMetaConfidenceInfoAnnotation` - `DataSource AttackLayer3TopAttacksResponseMetaConfidenceInfoAnnotationsDataSource` Data source for annotations. - `const AttackLayer3TopAttacksResponseMetaConfidenceInfoAnnotationsDataSourceAll AttackLayer3TopAttacksResponseMetaConfidenceInfoAnnotationsDataSource = "ALL"` - `const AttackLayer3TopAttacksResponseMetaConfidenceInfoAnnotationsDataSourceAIBots AttackLayer3TopAttacksResponseMetaConfidenceInfoAnnotationsDataSource = "AI_BOTS"` - `const AttackLayer3TopAttacksResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway AttackLayer3TopAttacksResponseMetaConfidenceInfoAnnotationsDataSource = "AI_GATEWAY"` - `const AttackLayer3TopAttacksResponseMetaConfidenceInfoAnnotationsDataSourceBGP AttackLayer3TopAttacksResponseMetaConfidenceInfoAnnotationsDataSource = "BGP"` - `const AttackLayer3TopAttacksResponseMetaConfidenceInfoAnnotationsDataSourceBots AttackLayer3TopAttacksResponseMetaConfidenceInfoAnnotationsDataSource = "BOTS"` - `const AttackLayer3TopAttacksResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly AttackLayer3TopAttacksResponseMetaConfidenceInfoAnnotationsDataSource = "CONNECTION_ANOMALY"` - `const AttackLayer3TopAttacksResponseMetaConfidenceInfoAnnotationsDataSourceCT AttackLayer3TopAttacksResponseMetaConfidenceInfoAnnotationsDataSource = "CT"` - `const AttackLayer3TopAttacksResponseMetaConfidenceInfoAnnotationsDataSourceDNS AttackLayer3TopAttacksResponseMetaConfidenceInfoAnnotationsDataSource = "DNS"` - `const AttackLayer3TopAttacksResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude AttackLayer3TopAttacksResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_MAGNITUDE"` - `const AttackLayer3TopAttacksResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112 AttackLayer3TopAttacksResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_AS112"` - `const AttackLayer3TopAttacksResponseMetaConfidenceInfoAnnotationsDataSourceDos AttackLayer3TopAttacksResponseMetaConfidenceInfoAnnotationsDataSource = "DOS"` - `const AttackLayer3TopAttacksResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting AttackLayer3TopAttacksResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_ROUTING"` - `const AttackLayer3TopAttacksResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity AttackLayer3TopAttacksResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_SECURITY"` - `const AttackLayer3TopAttacksResponseMetaConfidenceInfoAnnotationsDataSourceFw AttackLayer3TopAttacksResponseMetaConfidenceInfoAnnotationsDataSource = "FW"` - `const AttackLayer3TopAttacksResponseMetaConfidenceInfoAnnotationsDataSourceFwPg AttackLayer3TopAttacksResponseMetaConfidenceInfoAnnotationsDataSource = "FW_PG"` - `const AttackLayer3TopAttacksResponseMetaConfidenceInfoAnnotationsDataSourceHTTP AttackLayer3TopAttacksResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP"` - `const AttackLayer3TopAttacksResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl AttackLayer3TopAttacksResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CONTROL"` - `const AttackLayer3TopAttacksResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer AttackLayer3TopAttacksResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CRAWLER_REFERER"` - `const AttackLayer3TopAttacksResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins AttackLayer3TopAttacksResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_ORIGINS"` - `const AttackLayer3TopAttacksResponseMetaConfidenceInfoAnnotationsDataSourceIQI AttackLayer3TopAttacksResponseMetaConfidenceInfoAnnotationsDataSource = "IQI"` - `const AttackLayer3TopAttacksResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials AttackLayer3TopAttacksResponseMetaConfidenceInfoAnnotationsDataSource = "LEAKED_CREDENTIALS"` - `const AttackLayer3TopAttacksResponseMetaConfidenceInfoAnnotationsDataSourceNet AttackLayer3TopAttacksResponseMetaConfidenceInfoAnnotationsDataSource = "NET"` - `const AttackLayer3TopAttacksResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT AttackLayer3TopAttacksResponseMetaConfidenceInfoAnnotationsDataSource = "ROBOTS_TXT"` - `const AttackLayer3TopAttacksResponseMetaConfidenceInfoAnnotationsDataSourceSpeed AttackLayer3TopAttacksResponseMetaConfidenceInfoAnnotationsDataSource = "SPEED"` - `const AttackLayer3TopAttacksResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI AttackLayer3TopAttacksResponseMetaConfidenceInfoAnnotationsDataSource = "WORKERS_AI"` - `Description string` - `EndDate Time` - `EventType AttackLayer3TopAttacksResponseMetaConfidenceInfoAnnotationsEventType` Event type for annotations. - `const AttackLayer3TopAttacksResponseMetaConfidenceInfoAnnotationsEventTypeEvent AttackLayer3TopAttacksResponseMetaConfidenceInfoAnnotationsEventType = "EVENT"` - `const AttackLayer3TopAttacksResponseMetaConfidenceInfoAnnotationsEventTypeGeneral AttackLayer3TopAttacksResponseMetaConfidenceInfoAnnotationsEventType = "GENERAL"` - `const AttackLayer3TopAttacksResponseMetaConfidenceInfoAnnotationsEventTypeOutage AttackLayer3TopAttacksResponseMetaConfidenceInfoAnnotationsEventType = "OUTAGE"` - `const AttackLayer3TopAttacksResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection AttackLayer3TopAttacksResponseMetaConfidenceInfoAnnotationsEventType = "PARTIAL_PROJECTION"` - `const AttackLayer3TopAttacksResponseMetaConfidenceInfoAnnotationsEventTypePipeline AttackLayer3TopAttacksResponseMetaConfidenceInfoAnnotationsEventType = "PIPELINE"` - `const AttackLayer3TopAttacksResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly AttackLayer3TopAttacksResponseMetaConfidenceInfoAnnotationsEventType = "TRAFFIC_ANOMALY"` - `IsInstantaneous bool` Whether event is a single point in time or a time range. - `LinkedURL string` - `StartDate Time` - `Level int64` Provides an indication of how much confidence Cloudflare has in the data. - `DateRange []AttackLayer3TopAttacksResponseMetaDateRange` - `EndTime Time` Adjusted end of date range. - `StartTime Time` Adjusted start of date range. - `LastUpdated Time` Timestamp of the last dataset update. - `Normalization AttackLayer3TopAttacksResponseMetaNormalization` Normalization method applied to the results. Refer to [Normalization methods](https://developers.cloudflare.com/radar/concepts/normalization/). - `const AttackLayer3TopAttacksResponseMetaNormalizationPercentage AttackLayer3TopAttacksResponseMetaNormalization = "PERCENTAGE"` - `const AttackLayer3TopAttacksResponseMetaNormalizationMin0Max AttackLayer3TopAttacksResponseMetaNormalization = "MIN0_MAX"` - `const AttackLayer3TopAttacksResponseMetaNormalizationMinMax AttackLayer3TopAttacksResponseMetaNormalization = "MIN_MAX"` - `const AttackLayer3TopAttacksResponseMetaNormalizationRawValues AttackLayer3TopAttacksResponseMetaNormalization = "RAW_VALUES"` - `const AttackLayer3TopAttacksResponseMetaNormalizationPercentageChange AttackLayer3TopAttacksResponseMetaNormalization = "PERCENTAGE_CHANGE"` - `const AttackLayer3TopAttacksResponseMetaNormalizationRollingAverage AttackLayer3TopAttacksResponseMetaNormalization = "ROLLING_AVERAGE"` - `const AttackLayer3TopAttacksResponseMetaNormalizationOverlappedPercentage AttackLayer3TopAttacksResponseMetaNormalization = "OVERLAPPED_PERCENTAGE"` - `const AttackLayer3TopAttacksResponseMetaNormalizationRatio AttackLayer3TopAttacksResponseMetaNormalization = "RATIO"` - `Units []AttackLayer3TopAttacksResponseMetaUnit` Measurement units for the results. - `Name string` - `Value string` - `Top0 []AttackLayer3TopAttacksResponseTop0` - `OriginCountryAlpha2 string` - `OriginCountryName string` - `Value string` ### Example ```go 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.Top.Attacks(context.TODO(), radar.AttackLayer3TopAttacksParams{ }) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", response.Meta) } ``` #### Response ```json { "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" } ] }, "top_0": [ { "originCountryAlpha2": "FR", "originCountryName": "France", "value": "4.323214" } ] }, "success": true } ``` ## Get top industries targeted by layer 3 attacks `client.Radar.Attacks.Layer3.Top.Industry(ctx, query) (*AttackLayer3TopIndustryResponse, error)` **get** `/radar/attacks/layer3/top/industry` This endpoint is deprecated. To continue getting this data, switch to the summary by industry endpoint. ### Parameters - `query AttackLayer3TopIndustryParams` - `Continent param.Field[[]string]` 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]` End of the date range (inclusive). - `DateRange param.Field[[]string]` 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]` Start of the date range. - `Format param.Field[AttackLayer3TopIndustryParamsFormat]` Format in which results will be returned. - `const AttackLayer3TopIndustryParamsFormatJson AttackLayer3TopIndustryParamsFormat = "JSON"` - `const AttackLayer3TopIndustryParamsFormatCsv AttackLayer3TopIndustryParamsFormat = "CSV"` - `IPVersion param.Field[[]AttackLayer3TopIndustryParamsIPVersion]` Filters results by IP version (Ipv4 vs. IPv6). - `const AttackLayer3TopIndustryParamsIPVersionIPv4 AttackLayer3TopIndustryParamsIPVersion = "IPv4"` - `const AttackLayer3TopIndustryParamsIPVersionIPv6 AttackLayer3TopIndustryParamsIPVersion = "IPv6"` - `Limit param.Field[int64]` Limits the number of objects returned in the response. - `Location param.Field[[]string]` 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]` Array of names used to label the series in the response. - `Protocol param.Field[[]AttackLayer3TopIndustryParamsProtocol]` Filters the results by layer 3/4 protocol. - `const AttackLayer3TopIndustryParamsProtocolUdp AttackLayer3TopIndustryParamsProtocol = "UDP"` - `const AttackLayer3TopIndustryParamsProtocolTCP AttackLayer3TopIndustryParamsProtocol = "TCP"` - `const AttackLayer3TopIndustryParamsProtocolIcmp AttackLayer3TopIndustryParamsProtocol = "ICMP"` - `const AttackLayer3TopIndustryParamsProtocolGRE AttackLayer3TopIndustryParamsProtocol = "GRE"` ### Returns - `type AttackLayer3TopIndustryResponse struct{…}` - `Meta AttackLayer3TopIndustryResponseMeta` Metadata for the results. - `ConfidenceInfo AttackLayer3TopIndustryResponseMetaConfidenceInfo` - `Annotations []AttackLayer3TopIndustryResponseMetaConfidenceInfoAnnotation` - `DataSource AttackLayer3TopIndustryResponseMetaConfidenceInfoAnnotationsDataSource` Data source for annotations. - `const AttackLayer3TopIndustryResponseMetaConfidenceInfoAnnotationsDataSourceAll AttackLayer3TopIndustryResponseMetaConfidenceInfoAnnotationsDataSource = "ALL"` - `const AttackLayer3TopIndustryResponseMetaConfidenceInfoAnnotationsDataSourceAIBots AttackLayer3TopIndustryResponseMetaConfidenceInfoAnnotationsDataSource = "AI_BOTS"` - `const AttackLayer3TopIndustryResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway AttackLayer3TopIndustryResponseMetaConfidenceInfoAnnotationsDataSource = "AI_GATEWAY"` - `const AttackLayer3TopIndustryResponseMetaConfidenceInfoAnnotationsDataSourceBGP AttackLayer3TopIndustryResponseMetaConfidenceInfoAnnotationsDataSource = "BGP"` - `const AttackLayer3TopIndustryResponseMetaConfidenceInfoAnnotationsDataSourceBots AttackLayer3TopIndustryResponseMetaConfidenceInfoAnnotationsDataSource = "BOTS"` - `const AttackLayer3TopIndustryResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly AttackLayer3TopIndustryResponseMetaConfidenceInfoAnnotationsDataSource = "CONNECTION_ANOMALY"` - `const AttackLayer3TopIndustryResponseMetaConfidenceInfoAnnotationsDataSourceCT AttackLayer3TopIndustryResponseMetaConfidenceInfoAnnotationsDataSource = "CT"` - `const AttackLayer3TopIndustryResponseMetaConfidenceInfoAnnotationsDataSourceDNS AttackLayer3TopIndustryResponseMetaConfidenceInfoAnnotationsDataSource = "DNS"` - `const AttackLayer3TopIndustryResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude AttackLayer3TopIndustryResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_MAGNITUDE"` - `const AttackLayer3TopIndustryResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112 AttackLayer3TopIndustryResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_AS112"` - `const AttackLayer3TopIndustryResponseMetaConfidenceInfoAnnotationsDataSourceDos AttackLayer3TopIndustryResponseMetaConfidenceInfoAnnotationsDataSource = "DOS"` - `const AttackLayer3TopIndustryResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting AttackLayer3TopIndustryResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_ROUTING"` - `const AttackLayer3TopIndustryResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity AttackLayer3TopIndustryResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_SECURITY"` - `const AttackLayer3TopIndustryResponseMetaConfidenceInfoAnnotationsDataSourceFw AttackLayer3TopIndustryResponseMetaConfidenceInfoAnnotationsDataSource = "FW"` - `const AttackLayer3TopIndustryResponseMetaConfidenceInfoAnnotationsDataSourceFwPg AttackLayer3TopIndustryResponseMetaConfidenceInfoAnnotationsDataSource = "FW_PG"` - `const AttackLayer3TopIndustryResponseMetaConfidenceInfoAnnotationsDataSourceHTTP AttackLayer3TopIndustryResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP"` - `const AttackLayer3TopIndustryResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl AttackLayer3TopIndustryResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CONTROL"` - `const AttackLayer3TopIndustryResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer AttackLayer3TopIndustryResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CRAWLER_REFERER"` - `const AttackLayer3TopIndustryResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins AttackLayer3TopIndustryResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_ORIGINS"` - `const AttackLayer3TopIndustryResponseMetaConfidenceInfoAnnotationsDataSourceIQI AttackLayer3TopIndustryResponseMetaConfidenceInfoAnnotationsDataSource = "IQI"` - `const AttackLayer3TopIndustryResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials AttackLayer3TopIndustryResponseMetaConfidenceInfoAnnotationsDataSource = "LEAKED_CREDENTIALS"` - `const AttackLayer3TopIndustryResponseMetaConfidenceInfoAnnotationsDataSourceNet AttackLayer3TopIndustryResponseMetaConfidenceInfoAnnotationsDataSource = "NET"` - `const AttackLayer3TopIndustryResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT AttackLayer3TopIndustryResponseMetaConfidenceInfoAnnotationsDataSource = "ROBOTS_TXT"` - `const AttackLayer3TopIndustryResponseMetaConfidenceInfoAnnotationsDataSourceSpeed AttackLayer3TopIndustryResponseMetaConfidenceInfoAnnotationsDataSource = "SPEED"` - `const AttackLayer3TopIndustryResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI AttackLayer3TopIndustryResponseMetaConfidenceInfoAnnotationsDataSource = "WORKERS_AI"` - `Description string` - `EndDate Time` - `EventType AttackLayer3TopIndustryResponseMetaConfidenceInfoAnnotationsEventType` Event type for annotations. - `const AttackLayer3TopIndustryResponseMetaConfidenceInfoAnnotationsEventTypeEvent AttackLayer3TopIndustryResponseMetaConfidenceInfoAnnotationsEventType = "EVENT"` - `const AttackLayer3TopIndustryResponseMetaConfidenceInfoAnnotationsEventTypeGeneral AttackLayer3TopIndustryResponseMetaConfidenceInfoAnnotationsEventType = "GENERAL"` - `const AttackLayer3TopIndustryResponseMetaConfidenceInfoAnnotationsEventTypeOutage AttackLayer3TopIndustryResponseMetaConfidenceInfoAnnotationsEventType = "OUTAGE"` - `const AttackLayer3TopIndustryResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection AttackLayer3TopIndustryResponseMetaConfidenceInfoAnnotationsEventType = "PARTIAL_PROJECTION"` - `const AttackLayer3TopIndustryResponseMetaConfidenceInfoAnnotationsEventTypePipeline AttackLayer3TopIndustryResponseMetaConfidenceInfoAnnotationsEventType = "PIPELINE"` - `const AttackLayer3TopIndustryResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly AttackLayer3TopIndustryResponseMetaConfidenceInfoAnnotationsEventType = "TRAFFIC_ANOMALY"` - `IsInstantaneous bool` Whether event is a single point in time or a time range. - `LinkedURL string` - `StartDate Time` - `Level int64` Provides an indication of how much confidence Cloudflare has in the data. - `DateRange []AttackLayer3TopIndustryResponseMetaDateRange` - `EndTime Time` Adjusted end of date range. - `StartTime Time` Adjusted start of date range. - `LastUpdated Time` Timestamp of the last dataset update. - `Normalization AttackLayer3TopIndustryResponseMetaNormalization` Normalization method applied to the results. Refer to [Normalization methods](https://developers.cloudflare.com/radar/concepts/normalization/). - `const AttackLayer3TopIndustryResponseMetaNormalizationPercentage AttackLayer3TopIndustryResponseMetaNormalization = "PERCENTAGE"` - `const AttackLayer3TopIndustryResponseMetaNormalizationMin0Max AttackLayer3TopIndustryResponseMetaNormalization = "MIN0_MAX"` - `const AttackLayer3TopIndustryResponseMetaNormalizationMinMax AttackLayer3TopIndustryResponseMetaNormalization = "MIN_MAX"` - `const AttackLayer3TopIndustryResponseMetaNormalizationRawValues AttackLayer3TopIndustryResponseMetaNormalization = "RAW_VALUES"` - `const AttackLayer3TopIndustryResponseMetaNormalizationPercentageChange AttackLayer3TopIndustryResponseMetaNormalization = "PERCENTAGE_CHANGE"` - `const AttackLayer3TopIndustryResponseMetaNormalizationRollingAverage AttackLayer3TopIndustryResponseMetaNormalization = "ROLLING_AVERAGE"` - `const AttackLayer3TopIndustryResponseMetaNormalizationOverlappedPercentage AttackLayer3TopIndustryResponseMetaNormalization = "OVERLAPPED_PERCENTAGE"` - `const AttackLayer3TopIndustryResponseMetaNormalizationRatio AttackLayer3TopIndustryResponseMetaNormalization = "RATIO"` - `Units []AttackLayer3TopIndustryResponseMetaUnit` Measurement units for the results. - `Name string` - `Value string` - `Top0 []AttackLayer3TopIndustryResponseTop0` - `Name string` - `Value string` ### Example ```go 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.Top.Industry(context.TODO(), radar.AttackLayer3TopIndustryParams{ }) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", response.Meta) } ``` #### Response ```json { "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" } ] }, "top_0": [ { "name": "Computer Software", "value": "65" } ] }, "success": true } ``` ## Get top verticals targeted by layer 3 attacks `client.Radar.Attacks.Layer3.Top.Vertical(ctx, query) (*AttackLayer3TopVerticalResponse, error)` **get** `/radar/attacks/layer3/top/vertical` This endpoint is deprecated. To continue getting this data, switch to the summary by vertical endpoint. ### Parameters - `query AttackLayer3TopVerticalParams` - `Continent param.Field[[]string]` 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]` End of the date range (inclusive). - `DateRange param.Field[[]string]` 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]` Start of the date range. - `Format param.Field[AttackLayer3TopVerticalParamsFormat]` Format in which results will be returned. - `const AttackLayer3TopVerticalParamsFormatJson AttackLayer3TopVerticalParamsFormat = "JSON"` - `const AttackLayer3TopVerticalParamsFormatCsv AttackLayer3TopVerticalParamsFormat = "CSV"` - `IPVersion param.Field[[]AttackLayer3TopVerticalParamsIPVersion]` Filters results by IP version (Ipv4 vs. IPv6). - `const AttackLayer3TopVerticalParamsIPVersionIPv4 AttackLayer3TopVerticalParamsIPVersion = "IPv4"` - `const AttackLayer3TopVerticalParamsIPVersionIPv6 AttackLayer3TopVerticalParamsIPVersion = "IPv6"` - `Limit param.Field[int64]` Limits the number of objects returned in the response. - `Location param.Field[[]string]` 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]` Array of names used to label the series in the response. - `Protocol param.Field[[]AttackLayer3TopVerticalParamsProtocol]` Filters the results by layer 3/4 protocol. - `const AttackLayer3TopVerticalParamsProtocolUdp AttackLayer3TopVerticalParamsProtocol = "UDP"` - `const AttackLayer3TopVerticalParamsProtocolTCP AttackLayer3TopVerticalParamsProtocol = "TCP"` - `const AttackLayer3TopVerticalParamsProtocolIcmp AttackLayer3TopVerticalParamsProtocol = "ICMP"` - `const AttackLayer3TopVerticalParamsProtocolGRE AttackLayer3TopVerticalParamsProtocol = "GRE"` ### Returns - `type AttackLayer3TopVerticalResponse struct{…}` - `Meta AttackLayer3TopVerticalResponseMeta` Metadata for the results. - `ConfidenceInfo AttackLayer3TopVerticalResponseMetaConfidenceInfo` - `Annotations []AttackLayer3TopVerticalResponseMetaConfidenceInfoAnnotation` - `DataSource AttackLayer3TopVerticalResponseMetaConfidenceInfoAnnotationsDataSource` Data source for annotations. - `const AttackLayer3TopVerticalResponseMetaConfidenceInfoAnnotationsDataSourceAll AttackLayer3TopVerticalResponseMetaConfidenceInfoAnnotationsDataSource = "ALL"` - `const AttackLayer3TopVerticalResponseMetaConfidenceInfoAnnotationsDataSourceAIBots AttackLayer3TopVerticalResponseMetaConfidenceInfoAnnotationsDataSource = "AI_BOTS"` - `const AttackLayer3TopVerticalResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway AttackLayer3TopVerticalResponseMetaConfidenceInfoAnnotationsDataSource = "AI_GATEWAY"` - `const AttackLayer3TopVerticalResponseMetaConfidenceInfoAnnotationsDataSourceBGP AttackLayer3TopVerticalResponseMetaConfidenceInfoAnnotationsDataSource = "BGP"` - `const AttackLayer3TopVerticalResponseMetaConfidenceInfoAnnotationsDataSourceBots AttackLayer3TopVerticalResponseMetaConfidenceInfoAnnotationsDataSource = "BOTS"` - `const AttackLayer3TopVerticalResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly AttackLayer3TopVerticalResponseMetaConfidenceInfoAnnotationsDataSource = "CONNECTION_ANOMALY"` - `const AttackLayer3TopVerticalResponseMetaConfidenceInfoAnnotationsDataSourceCT AttackLayer3TopVerticalResponseMetaConfidenceInfoAnnotationsDataSource = "CT"` - `const AttackLayer3TopVerticalResponseMetaConfidenceInfoAnnotationsDataSourceDNS AttackLayer3TopVerticalResponseMetaConfidenceInfoAnnotationsDataSource = "DNS"` - `const AttackLayer3TopVerticalResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude AttackLayer3TopVerticalResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_MAGNITUDE"` - `const AttackLayer3TopVerticalResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112 AttackLayer3TopVerticalResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_AS112"` - `const AttackLayer3TopVerticalResponseMetaConfidenceInfoAnnotationsDataSourceDos AttackLayer3TopVerticalResponseMetaConfidenceInfoAnnotationsDataSource = "DOS"` - `const AttackLayer3TopVerticalResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting AttackLayer3TopVerticalResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_ROUTING"` - `const AttackLayer3TopVerticalResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity AttackLayer3TopVerticalResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_SECURITY"` - `const AttackLayer3TopVerticalResponseMetaConfidenceInfoAnnotationsDataSourceFw AttackLayer3TopVerticalResponseMetaConfidenceInfoAnnotationsDataSource = "FW"` - `const AttackLayer3TopVerticalResponseMetaConfidenceInfoAnnotationsDataSourceFwPg AttackLayer3TopVerticalResponseMetaConfidenceInfoAnnotationsDataSource = "FW_PG"` - `const AttackLayer3TopVerticalResponseMetaConfidenceInfoAnnotationsDataSourceHTTP AttackLayer3TopVerticalResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP"` - `const AttackLayer3TopVerticalResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl AttackLayer3TopVerticalResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CONTROL"` - `const AttackLayer3TopVerticalResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer AttackLayer3TopVerticalResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CRAWLER_REFERER"` - `const AttackLayer3TopVerticalResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins AttackLayer3TopVerticalResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_ORIGINS"` - `const AttackLayer3TopVerticalResponseMetaConfidenceInfoAnnotationsDataSourceIQI AttackLayer3TopVerticalResponseMetaConfidenceInfoAnnotationsDataSource = "IQI"` - `const AttackLayer3TopVerticalResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials AttackLayer3TopVerticalResponseMetaConfidenceInfoAnnotationsDataSource = "LEAKED_CREDENTIALS"` - `const AttackLayer3TopVerticalResponseMetaConfidenceInfoAnnotationsDataSourceNet AttackLayer3TopVerticalResponseMetaConfidenceInfoAnnotationsDataSource = "NET"` - `const AttackLayer3TopVerticalResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT AttackLayer3TopVerticalResponseMetaConfidenceInfoAnnotationsDataSource = "ROBOTS_TXT"` - `const AttackLayer3TopVerticalResponseMetaConfidenceInfoAnnotationsDataSourceSpeed AttackLayer3TopVerticalResponseMetaConfidenceInfoAnnotationsDataSource = "SPEED"` - `const AttackLayer3TopVerticalResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI AttackLayer3TopVerticalResponseMetaConfidenceInfoAnnotationsDataSource = "WORKERS_AI"` - `Description string` - `EndDate Time` - `EventType AttackLayer3TopVerticalResponseMetaConfidenceInfoAnnotationsEventType` Event type for annotations. - `const AttackLayer3TopVerticalResponseMetaConfidenceInfoAnnotationsEventTypeEvent AttackLayer3TopVerticalResponseMetaConfidenceInfoAnnotationsEventType = "EVENT"` - `const AttackLayer3TopVerticalResponseMetaConfidenceInfoAnnotationsEventTypeGeneral AttackLayer3TopVerticalResponseMetaConfidenceInfoAnnotationsEventType = "GENERAL"` - `const AttackLayer3TopVerticalResponseMetaConfidenceInfoAnnotationsEventTypeOutage AttackLayer3TopVerticalResponseMetaConfidenceInfoAnnotationsEventType = "OUTAGE"` - `const AttackLayer3TopVerticalResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection AttackLayer3TopVerticalResponseMetaConfidenceInfoAnnotationsEventType = "PARTIAL_PROJECTION"` - `const AttackLayer3TopVerticalResponseMetaConfidenceInfoAnnotationsEventTypePipeline AttackLayer3TopVerticalResponseMetaConfidenceInfoAnnotationsEventType = "PIPELINE"` - `const AttackLayer3TopVerticalResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly AttackLayer3TopVerticalResponseMetaConfidenceInfoAnnotationsEventType = "TRAFFIC_ANOMALY"` - `IsInstantaneous bool` Whether event is a single point in time or a time range. - `LinkedURL string` - `StartDate Time` - `Level int64` Provides an indication of how much confidence Cloudflare has in the data. - `DateRange []AttackLayer3TopVerticalResponseMetaDateRange` - `EndTime Time` Adjusted end of date range. - `StartTime Time` Adjusted start of date range. - `LastUpdated Time` Timestamp of the last dataset update. - `Normalization AttackLayer3TopVerticalResponseMetaNormalization` Normalization method applied to the results. Refer to [Normalization methods](https://developers.cloudflare.com/radar/concepts/normalization/). - `const AttackLayer3TopVerticalResponseMetaNormalizationPercentage AttackLayer3TopVerticalResponseMetaNormalization = "PERCENTAGE"` - `const AttackLayer3TopVerticalResponseMetaNormalizationMin0Max AttackLayer3TopVerticalResponseMetaNormalization = "MIN0_MAX"` - `const AttackLayer3TopVerticalResponseMetaNormalizationMinMax AttackLayer3TopVerticalResponseMetaNormalization = "MIN_MAX"` - `const AttackLayer3TopVerticalResponseMetaNormalizationRawValues AttackLayer3TopVerticalResponseMetaNormalization = "RAW_VALUES"` - `const AttackLayer3TopVerticalResponseMetaNormalizationPercentageChange AttackLayer3TopVerticalResponseMetaNormalization = "PERCENTAGE_CHANGE"` - `const AttackLayer3TopVerticalResponseMetaNormalizationRollingAverage AttackLayer3TopVerticalResponseMetaNormalization = "ROLLING_AVERAGE"` - `const AttackLayer3TopVerticalResponseMetaNormalizationOverlappedPercentage AttackLayer3TopVerticalResponseMetaNormalization = "OVERLAPPED_PERCENTAGE"` - `const AttackLayer3TopVerticalResponseMetaNormalizationRatio AttackLayer3TopVerticalResponseMetaNormalization = "RATIO"` - `Units []AttackLayer3TopVerticalResponseMetaUnit` Measurement units for the results. - `Name string` - `Value string` - `Top0 []AttackLayer3TopVerticalResponseTop0` - `Name string` - `Value string` ### Example ```go 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.Top.Vertical(context.TODO(), radar.AttackLayer3TopVerticalParams{ }) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", response.Meta) } ``` #### Response ```json { "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" } ] }, "top_0": [ { "name": "Internet and Telecom", "value": "65" } ] }, "success": true } ``` # Locations ## Get top origin locations of layer 3 attacks `client.Radar.Attacks.Layer3.Top.Locations.Origin(ctx, query) (*AttackLayer3TopLocationOriginResponse, error)` **get** `/radar/attacks/layer3/top/locations/origin` Retrieves the origin locations of layer 3 attacks. ### Parameters - `query AttackLayer3TopLocationOriginParams` - `Continent param.Field[[]string]` 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]` End of the date range (inclusive). - `DateRange param.Field[[]string]` 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]` Start of the date range. - `Format param.Field[AttackLayer3TopLocationOriginParamsFormat]` Format in which results will be returned. - `const AttackLayer3TopLocationOriginParamsFormatJson AttackLayer3TopLocationOriginParamsFormat = "JSON"` - `const AttackLayer3TopLocationOriginParamsFormatCsv AttackLayer3TopLocationOriginParamsFormat = "CSV"` - `IPVersion param.Field[[]AttackLayer3TopLocationOriginParamsIPVersion]` Filters results by IP version (Ipv4 vs. IPv6). - `const AttackLayer3TopLocationOriginParamsIPVersionIPv4 AttackLayer3TopLocationOriginParamsIPVersion = "IPv4"` - `const AttackLayer3TopLocationOriginParamsIPVersionIPv6 AttackLayer3TopLocationOriginParamsIPVersion = "IPv6"` - `Limit param.Field[int64]` Limits the number of objects returned in the response. - `Location param.Field[[]string]` 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]` Array of names used to label the series in the response. - `Protocol param.Field[[]AttackLayer3TopLocationOriginParamsProtocol]` Filters the results by layer 3/4 protocol. - `const AttackLayer3TopLocationOriginParamsProtocolUdp AttackLayer3TopLocationOriginParamsProtocol = "UDP"` - `const AttackLayer3TopLocationOriginParamsProtocolTCP AttackLayer3TopLocationOriginParamsProtocol = "TCP"` - `const AttackLayer3TopLocationOriginParamsProtocolIcmp AttackLayer3TopLocationOriginParamsProtocol = "ICMP"` - `const AttackLayer3TopLocationOriginParamsProtocolGRE AttackLayer3TopLocationOriginParamsProtocol = "GRE"` ### Returns - `type AttackLayer3TopLocationOriginResponse struct{…}` - `Meta AttackLayer3TopLocationOriginResponseMeta` Metadata for the results. - `ConfidenceInfo AttackLayer3TopLocationOriginResponseMetaConfidenceInfo` - `Annotations []AttackLayer3TopLocationOriginResponseMetaConfidenceInfoAnnotation` - `DataSource AttackLayer3TopLocationOriginResponseMetaConfidenceInfoAnnotationsDataSource` Data source for annotations. - `const AttackLayer3TopLocationOriginResponseMetaConfidenceInfoAnnotationsDataSourceAll AttackLayer3TopLocationOriginResponseMetaConfidenceInfoAnnotationsDataSource = "ALL"` - `const AttackLayer3TopLocationOriginResponseMetaConfidenceInfoAnnotationsDataSourceAIBots AttackLayer3TopLocationOriginResponseMetaConfidenceInfoAnnotationsDataSource = "AI_BOTS"` - `const AttackLayer3TopLocationOriginResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway AttackLayer3TopLocationOriginResponseMetaConfidenceInfoAnnotationsDataSource = "AI_GATEWAY"` - `const AttackLayer3TopLocationOriginResponseMetaConfidenceInfoAnnotationsDataSourceBGP AttackLayer3TopLocationOriginResponseMetaConfidenceInfoAnnotationsDataSource = "BGP"` - `const AttackLayer3TopLocationOriginResponseMetaConfidenceInfoAnnotationsDataSourceBots AttackLayer3TopLocationOriginResponseMetaConfidenceInfoAnnotationsDataSource = "BOTS"` - `const AttackLayer3TopLocationOriginResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly AttackLayer3TopLocationOriginResponseMetaConfidenceInfoAnnotationsDataSource = "CONNECTION_ANOMALY"` - `const AttackLayer3TopLocationOriginResponseMetaConfidenceInfoAnnotationsDataSourceCT AttackLayer3TopLocationOriginResponseMetaConfidenceInfoAnnotationsDataSource = "CT"` - `const AttackLayer3TopLocationOriginResponseMetaConfidenceInfoAnnotationsDataSourceDNS AttackLayer3TopLocationOriginResponseMetaConfidenceInfoAnnotationsDataSource = "DNS"` - `const AttackLayer3TopLocationOriginResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude AttackLayer3TopLocationOriginResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_MAGNITUDE"` - `const AttackLayer3TopLocationOriginResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112 AttackLayer3TopLocationOriginResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_AS112"` - `const AttackLayer3TopLocationOriginResponseMetaConfidenceInfoAnnotationsDataSourceDos AttackLayer3TopLocationOriginResponseMetaConfidenceInfoAnnotationsDataSource = "DOS"` - `const AttackLayer3TopLocationOriginResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting AttackLayer3TopLocationOriginResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_ROUTING"` - `const AttackLayer3TopLocationOriginResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity AttackLayer3TopLocationOriginResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_SECURITY"` - `const AttackLayer3TopLocationOriginResponseMetaConfidenceInfoAnnotationsDataSourceFw AttackLayer3TopLocationOriginResponseMetaConfidenceInfoAnnotationsDataSource = "FW"` - `const AttackLayer3TopLocationOriginResponseMetaConfidenceInfoAnnotationsDataSourceFwPg AttackLayer3TopLocationOriginResponseMetaConfidenceInfoAnnotationsDataSource = "FW_PG"` - `const AttackLayer3TopLocationOriginResponseMetaConfidenceInfoAnnotationsDataSourceHTTP AttackLayer3TopLocationOriginResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP"` - `const AttackLayer3TopLocationOriginResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl AttackLayer3TopLocationOriginResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CONTROL"` - `const AttackLayer3TopLocationOriginResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer AttackLayer3TopLocationOriginResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CRAWLER_REFERER"` - `const AttackLayer3TopLocationOriginResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins AttackLayer3TopLocationOriginResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_ORIGINS"` - `const AttackLayer3TopLocationOriginResponseMetaConfidenceInfoAnnotationsDataSourceIQI AttackLayer3TopLocationOriginResponseMetaConfidenceInfoAnnotationsDataSource = "IQI"` - `const AttackLayer3TopLocationOriginResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials AttackLayer3TopLocationOriginResponseMetaConfidenceInfoAnnotationsDataSource = "LEAKED_CREDENTIALS"` - `const AttackLayer3TopLocationOriginResponseMetaConfidenceInfoAnnotationsDataSourceNet AttackLayer3TopLocationOriginResponseMetaConfidenceInfoAnnotationsDataSource = "NET"` - `const AttackLayer3TopLocationOriginResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT AttackLayer3TopLocationOriginResponseMetaConfidenceInfoAnnotationsDataSource = "ROBOTS_TXT"` - `const AttackLayer3TopLocationOriginResponseMetaConfidenceInfoAnnotationsDataSourceSpeed AttackLayer3TopLocationOriginResponseMetaConfidenceInfoAnnotationsDataSource = "SPEED"` - `const AttackLayer3TopLocationOriginResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI AttackLayer3TopLocationOriginResponseMetaConfidenceInfoAnnotationsDataSource = "WORKERS_AI"` - `Description string` - `EndDate Time` - `EventType AttackLayer3TopLocationOriginResponseMetaConfidenceInfoAnnotationsEventType` Event type for annotations. - `const AttackLayer3TopLocationOriginResponseMetaConfidenceInfoAnnotationsEventTypeEvent AttackLayer3TopLocationOriginResponseMetaConfidenceInfoAnnotationsEventType = "EVENT"` - `const AttackLayer3TopLocationOriginResponseMetaConfidenceInfoAnnotationsEventTypeGeneral AttackLayer3TopLocationOriginResponseMetaConfidenceInfoAnnotationsEventType = "GENERAL"` - `const AttackLayer3TopLocationOriginResponseMetaConfidenceInfoAnnotationsEventTypeOutage AttackLayer3TopLocationOriginResponseMetaConfidenceInfoAnnotationsEventType = "OUTAGE"` - `const AttackLayer3TopLocationOriginResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection AttackLayer3TopLocationOriginResponseMetaConfidenceInfoAnnotationsEventType = "PARTIAL_PROJECTION"` - `const AttackLayer3TopLocationOriginResponseMetaConfidenceInfoAnnotationsEventTypePipeline AttackLayer3TopLocationOriginResponseMetaConfidenceInfoAnnotationsEventType = "PIPELINE"` - `const AttackLayer3TopLocationOriginResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly AttackLayer3TopLocationOriginResponseMetaConfidenceInfoAnnotationsEventType = "TRAFFIC_ANOMALY"` - `IsInstantaneous bool` Whether event is a single point in time or a time range. - `LinkedURL string` - `StartDate Time` - `Level int64` Provides an indication of how much confidence Cloudflare has in the data. - `DateRange []AttackLayer3TopLocationOriginResponseMetaDateRange` - `EndTime Time` Adjusted end of date range. - `StartTime Time` Adjusted start of date range. - `LastUpdated Time` Timestamp of the last dataset update. - `Normalization AttackLayer3TopLocationOriginResponseMetaNormalization` Normalization method applied to the results. Refer to [Normalization methods](https://developers.cloudflare.com/radar/concepts/normalization/). - `const AttackLayer3TopLocationOriginResponseMetaNormalizationPercentage AttackLayer3TopLocationOriginResponseMetaNormalization = "PERCENTAGE"` - `const AttackLayer3TopLocationOriginResponseMetaNormalizationMin0Max AttackLayer3TopLocationOriginResponseMetaNormalization = "MIN0_MAX"` - `const AttackLayer3TopLocationOriginResponseMetaNormalizationMinMax AttackLayer3TopLocationOriginResponseMetaNormalization = "MIN_MAX"` - `const AttackLayer3TopLocationOriginResponseMetaNormalizationRawValues AttackLayer3TopLocationOriginResponseMetaNormalization = "RAW_VALUES"` - `const AttackLayer3TopLocationOriginResponseMetaNormalizationPercentageChange AttackLayer3TopLocationOriginResponseMetaNormalization = "PERCENTAGE_CHANGE"` - `const AttackLayer3TopLocationOriginResponseMetaNormalizationRollingAverage AttackLayer3TopLocationOriginResponseMetaNormalization = "ROLLING_AVERAGE"` - `const AttackLayer3TopLocationOriginResponseMetaNormalizationOverlappedPercentage AttackLayer3TopLocationOriginResponseMetaNormalization = "OVERLAPPED_PERCENTAGE"` - `const AttackLayer3TopLocationOriginResponseMetaNormalizationRatio AttackLayer3TopLocationOriginResponseMetaNormalization = "RATIO"` - `Units []AttackLayer3TopLocationOriginResponseMetaUnit` Measurement units for the results. - `Name string` - `Value string` - `Top0 []AttackLayer3TopLocationOriginResponseTop0` - `OriginCountryAlpha2 string` - `OriginCountryName string` - `Rank float64` - `Value string` ### Example ```go 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.Top.Locations.Origin(context.TODO(), radar.AttackLayer3TopLocationOriginParams{ }) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", response.Meta) } ``` #### Response ```json { "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" } ] }, "top_0": [ { "originCountryAlpha2": "FR", "originCountryName": "France", "rank": 1, "value": "4.323214" } ] }, "success": true } ``` ## 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. ### Parameters - `query AttackLayer3TopLocationTargetParams` - `Continent param.Field[[]string]` 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]` End of the date range (inclusive). - `DateRange param.Field[[]string]` 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]` Start of the date range. - `Format param.Field[AttackLayer3TopLocationTargetParamsFormat]` Format in which results will be returned. - `const AttackLayer3TopLocationTargetParamsFormatJson AttackLayer3TopLocationTargetParamsFormat = "JSON"` - `const AttackLayer3TopLocationTargetParamsFormatCsv AttackLayer3TopLocationTargetParamsFormat = "CSV"` - `IPVersion param.Field[[]AttackLayer3TopLocationTargetParamsIPVersion]` Filters results by IP version (Ipv4 vs. IPv6). - `const AttackLayer3TopLocationTargetParamsIPVersionIPv4 AttackLayer3TopLocationTargetParamsIPVersion = "IPv4"` - `const AttackLayer3TopLocationTargetParamsIPVersionIPv6 AttackLayer3TopLocationTargetParamsIPVersion = "IPv6"` - `Limit param.Field[int64]` Limits the number of objects returned in the response. - `Location param.Field[[]string]` 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]` Array of names used to label the series in the response. - `Protocol param.Field[[]AttackLayer3TopLocationTargetParamsProtocol]` Filters the results by layer 3/4 protocol. - `const AttackLayer3TopLocationTargetParamsProtocolUdp AttackLayer3TopLocationTargetParamsProtocol = "UDP"` - `const AttackLayer3TopLocationTargetParamsProtocolTCP AttackLayer3TopLocationTargetParamsProtocol = "TCP"` - `const AttackLayer3TopLocationTargetParamsProtocolIcmp AttackLayer3TopLocationTargetParamsProtocol = "ICMP"` - `const AttackLayer3TopLocationTargetParamsProtocolGRE AttackLayer3TopLocationTargetParamsProtocol = "GRE"` ### Returns - `type AttackLayer3TopLocationTargetResponse struct{…}` - `Meta AttackLayer3TopLocationTargetResponseMeta` Metadata for the results. - `ConfidenceInfo AttackLayer3TopLocationTargetResponseMetaConfidenceInfo` - `Annotations []AttackLayer3TopLocationTargetResponseMetaConfidenceInfoAnnotation` - `DataSource AttackLayer3TopLocationTargetResponseMetaConfidenceInfoAnnotationsDataSource` Data source for annotations. - `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` - `EventType AttackLayer3TopLocationTargetResponseMetaConfidenceInfoAnnotationsEventType` Event type for annotations. - `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` - `StartDate Time` - `Level int64` Provides an indication of how much confidence Cloudflare has in the data. - `DateRange []AttackLayer3TopLocationTargetResponseMetaDateRange` - `EndTime Time` Adjusted end of date range. - `StartTime Time` Adjusted start of date range. - `LastUpdated Time` Timestamp of the last dataset update. - `Normalization AttackLayer3TopLocationTargetResponseMetaNormalization` Normalization method applied to the results. Refer to [Normalization methods](https://developers.cloudflare.com/radar/concepts/normalization/). - `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` ### Example ```go 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.Top.Locations.Target(context.TODO(), radar.AttackLayer3TopLocationTargetParams{ }) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", response.Meta) } ``` #### Response ```json { "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" } ] }, "top_0": [ { "rank": 1, "targetCountryAlpha2": "FR", "targetCountryName": "France", "value": "4.323214" } ] }, "success": true } ``` # Layer7 ## Get layer 7 attacks summary by dimension `client.Radar.Attacks.Layer7.SummaryV2(ctx, dimension, query) (*AttackLayer7SummaryV2Response, error)` **get** `/radar/attacks/layer7/summary/{dimension}` Retrieves the distribution of layer 7 attacks by the specified dimension. ### Parameters - `dimension AttackLayer7SummaryV2ParamsDimension` Specifies the attribute by which to group the results. - `const AttackLayer7SummaryV2ParamsDimensionHTTPMethod AttackLayer7SummaryV2ParamsDimension = "HTTP_METHOD"` - `const AttackLayer7SummaryV2ParamsDimensionHTTPVersion AttackLayer7SummaryV2ParamsDimension = "HTTP_VERSION"` - `const AttackLayer7SummaryV2ParamsDimensionIPVersion AttackLayer7SummaryV2ParamsDimension = "IP_VERSION"` - `const AttackLayer7SummaryV2ParamsDimensionManagedRules AttackLayer7SummaryV2ParamsDimension = "MANAGED_RULES"` - `const AttackLayer7SummaryV2ParamsDimensionMitigationProduct AttackLayer7SummaryV2ParamsDimension = "MITIGATION_PRODUCT"` - `const AttackLayer7SummaryV2ParamsDimensionVertical AttackLayer7SummaryV2ParamsDimension = "VERTICAL"` - `const AttackLayer7SummaryV2ParamsDimensionIndustry AttackLayer7SummaryV2ParamsDimension = "INDUSTRY"` - `query AttackLayer7SummaryV2Params` - `ASN param.Field[[]string]` Filters results by Autonomous System. Specify one or more Autonomous System Numbers (ASNs) as a comma-separated list. Prefix with `-` to exclude ASNs from results. For example, `-174, 3356` excludes results from AS174, but includes results from AS3356. - `Continent param.Field[[]string]` 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]` End of the date range (inclusive). - `DateRange param.Field[[]string]` 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]` Start of the date range. - `Format param.Field[AttackLayer7SummaryV2ParamsFormat]` Format in which results will be returned. - `const AttackLayer7SummaryV2ParamsFormatJson AttackLayer7SummaryV2ParamsFormat = "JSON"` - `const AttackLayer7SummaryV2ParamsFormatCsv AttackLayer7SummaryV2ParamsFormat = "CSV"` - `HTTPMethod param.Field[[]AttackLayer7SummaryV2ParamsHTTPMethod]` Filters results by HTTP method. - `const AttackLayer7SummaryV2ParamsHTTPMethodGet AttackLayer7SummaryV2ParamsHTTPMethod = "GET"` - `const AttackLayer7SummaryV2ParamsHTTPMethodPost AttackLayer7SummaryV2ParamsHTTPMethod = "POST"` - `const AttackLayer7SummaryV2ParamsHTTPMethodDelete AttackLayer7SummaryV2ParamsHTTPMethod = "DELETE"` - `const AttackLayer7SummaryV2ParamsHTTPMethodPut AttackLayer7SummaryV2ParamsHTTPMethod = "PUT"` - `const AttackLayer7SummaryV2ParamsHTTPMethodHead AttackLayer7SummaryV2ParamsHTTPMethod = "HEAD"` - `const AttackLayer7SummaryV2ParamsHTTPMethodPurge AttackLayer7SummaryV2ParamsHTTPMethod = "PURGE"` - `const AttackLayer7SummaryV2ParamsHTTPMethodOptions AttackLayer7SummaryV2ParamsHTTPMethod = "OPTIONS"` - `const AttackLayer7SummaryV2ParamsHTTPMethodPropfind AttackLayer7SummaryV2ParamsHTTPMethod = "PROPFIND"` - `const AttackLayer7SummaryV2ParamsHTTPMethodMkcol AttackLayer7SummaryV2ParamsHTTPMethod = "MKCOL"` - `const AttackLayer7SummaryV2ParamsHTTPMethodPatch AttackLayer7SummaryV2ParamsHTTPMethod = "PATCH"` - `const AttackLayer7SummaryV2ParamsHTTPMethodACL AttackLayer7SummaryV2ParamsHTTPMethod = "ACL"` - `const AttackLayer7SummaryV2ParamsHTTPMethodBcopy AttackLayer7SummaryV2ParamsHTTPMethod = "BCOPY"` - `const AttackLayer7SummaryV2ParamsHTTPMethodBdelete AttackLayer7SummaryV2ParamsHTTPMethod = "BDELETE"` - `const AttackLayer7SummaryV2ParamsHTTPMethodBmove AttackLayer7SummaryV2ParamsHTTPMethod = "BMOVE"` - `const AttackLayer7SummaryV2ParamsHTTPMethodBpropfind AttackLayer7SummaryV2ParamsHTTPMethod = "BPROPFIND"` - `const AttackLayer7SummaryV2ParamsHTTPMethodBproppatch AttackLayer7SummaryV2ParamsHTTPMethod = "BPROPPATCH"` - `const AttackLayer7SummaryV2ParamsHTTPMethodCheckin AttackLayer7SummaryV2ParamsHTTPMethod = "CHECKIN"` - `const AttackLayer7SummaryV2ParamsHTTPMethodCheckout AttackLayer7SummaryV2ParamsHTTPMethod = "CHECKOUT"` - `const AttackLayer7SummaryV2ParamsHTTPMethodConnect AttackLayer7SummaryV2ParamsHTTPMethod = "CONNECT"` - `const AttackLayer7SummaryV2ParamsHTTPMethodCopy AttackLayer7SummaryV2ParamsHTTPMethod = "COPY"` - `const AttackLayer7SummaryV2ParamsHTTPMethodLabel AttackLayer7SummaryV2ParamsHTTPMethod = "LABEL"` - `const AttackLayer7SummaryV2ParamsHTTPMethodLock AttackLayer7SummaryV2ParamsHTTPMethod = "LOCK"` - `const AttackLayer7SummaryV2ParamsHTTPMethodMerge AttackLayer7SummaryV2ParamsHTTPMethod = "MERGE"` - `const AttackLayer7SummaryV2ParamsHTTPMethodMkactivity AttackLayer7SummaryV2ParamsHTTPMethod = "MKACTIVITY"` - `const AttackLayer7SummaryV2ParamsHTTPMethodMkworkspace AttackLayer7SummaryV2ParamsHTTPMethod = "MKWORKSPACE"` - `const AttackLayer7SummaryV2ParamsHTTPMethodMove AttackLayer7SummaryV2ParamsHTTPMethod = "MOVE"` - `const AttackLayer7SummaryV2ParamsHTTPMethodNotify AttackLayer7SummaryV2ParamsHTTPMethod = "NOTIFY"` - `const AttackLayer7SummaryV2ParamsHTTPMethodOrderpatch AttackLayer7SummaryV2ParamsHTTPMethod = "ORDERPATCH"` - `const AttackLayer7SummaryV2ParamsHTTPMethodPoll AttackLayer7SummaryV2ParamsHTTPMethod = "POLL"` - `const AttackLayer7SummaryV2ParamsHTTPMethodProppatch AttackLayer7SummaryV2ParamsHTTPMethod = "PROPPATCH"` - `const AttackLayer7SummaryV2ParamsHTTPMethodReport AttackLayer7SummaryV2ParamsHTTPMethod = "REPORT"` - `const AttackLayer7SummaryV2ParamsHTTPMethodSearch AttackLayer7SummaryV2ParamsHTTPMethod = "SEARCH"` - `const AttackLayer7SummaryV2ParamsHTTPMethodSubscribe AttackLayer7SummaryV2ParamsHTTPMethod = "SUBSCRIBE"` - `const AttackLayer7SummaryV2ParamsHTTPMethodTrace AttackLayer7SummaryV2ParamsHTTPMethod = "TRACE"` - `const AttackLayer7SummaryV2ParamsHTTPMethodUncheckout AttackLayer7SummaryV2ParamsHTTPMethod = "UNCHECKOUT"` - `const AttackLayer7SummaryV2ParamsHTTPMethodUnlock AttackLayer7SummaryV2ParamsHTTPMethod = "UNLOCK"` - `const AttackLayer7SummaryV2ParamsHTTPMethodUnsubscribe AttackLayer7SummaryV2ParamsHTTPMethod = "UNSUBSCRIBE"` - `const AttackLayer7SummaryV2ParamsHTTPMethodUpdate AttackLayer7SummaryV2ParamsHTTPMethod = "UPDATE"` - `const AttackLayer7SummaryV2ParamsHTTPMethodVersioncontrol AttackLayer7SummaryV2ParamsHTTPMethod = "VERSIONCONTROL"` - `const AttackLayer7SummaryV2ParamsHTTPMethodBaselinecontrol AttackLayer7SummaryV2ParamsHTTPMethod = "BASELINECONTROL"` - `const AttackLayer7SummaryV2ParamsHTTPMethodXmsenumatts AttackLayer7SummaryV2ParamsHTTPMethod = "XMSENUMATTS"` - `const AttackLayer7SummaryV2ParamsHTTPMethodRpcOutData AttackLayer7SummaryV2ParamsHTTPMethod = "RPC_OUT_DATA"` - `const AttackLayer7SummaryV2ParamsHTTPMethodRpcInData AttackLayer7SummaryV2ParamsHTTPMethod = "RPC_IN_DATA"` - `const AttackLayer7SummaryV2ParamsHTTPMethodJson AttackLayer7SummaryV2ParamsHTTPMethod = "JSON"` - `const AttackLayer7SummaryV2ParamsHTTPMethodCook AttackLayer7SummaryV2ParamsHTTPMethod = "COOK"` - `const AttackLayer7SummaryV2ParamsHTTPMethodTrack AttackLayer7SummaryV2ParamsHTTPMethod = "TRACK"` - `HTTPVersion param.Field[[]AttackLayer7SummaryV2ParamsHTTPVersion]` Filters results by HTTP version. - `const AttackLayer7SummaryV2ParamsHTTPVersionHttPv1 AttackLayer7SummaryV2ParamsHTTPVersion = "HTTPv1"` - `const AttackLayer7SummaryV2ParamsHTTPVersionHttPv2 AttackLayer7SummaryV2ParamsHTTPVersion = "HTTPv2"` - `const AttackLayer7SummaryV2ParamsHTTPVersionHttPv3 AttackLayer7SummaryV2ParamsHTTPVersion = "HTTPv3"` - `IPVersion param.Field[[]AttackLayer7SummaryV2ParamsIPVersion]` Filters results by IP version (Ipv4 vs. IPv6). - `const AttackLayer7SummaryV2ParamsIPVersionIPv4 AttackLayer7SummaryV2ParamsIPVersion = "IPv4"` - `const AttackLayer7SummaryV2ParamsIPVersionIPv6 AttackLayer7SummaryV2ParamsIPVersion = "IPv6"` - `LimitPerGroup param.Field[int64]` 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]` 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. - `MitigationProduct param.Field[[]AttackLayer7SummaryV2ParamsMitigationProduct]` Filters the results by layer 7 mitigation product. - `const AttackLayer7SummaryV2ParamsMitigationProductDDoS AttackLayer7SummaryV2ParamsMitigationProduct = "DDOS"` - `const AttackLayer7SummaryV2ParamsMitigationProductWAF AttackLayer7SummaryV2ParamsMitigationProduct = "WAF"` - `const AttackLayer7SummaryV2ParamsMitigationProductBotManagement AttackLayer7SummaryV2ParamsMitigationProduct = "BOT_MANAGEMENT"` - `const AttackLayer7SummaryV2ParamsMitigationProductAccessRules AttackLayer7SummaryV2ParamsMitigationProduct = "ACCESS_RULES"` - `const AttackLayer7SummaryV2ParamsMitigationProductIPReputation AttackLayer7SummaryV2ParamsMitigationProduct = "IP_REPUTATION"` - `const AttackLayer7SummaryV2ParamsMitigationProductAPIShield AttackLayer7SummaryV2ParamsMitigationProduct = "API_SHIELD"` - `const AttackLayer7SummaryV2ParamsMitigationProductDataLossPrevention AttackLayer7SummaryV2ParamsMitigationProduct = "DATA_LOSS_PREVENTION"` - `Name param.Field[[]string]` Array of names used to label the series in the response. ### Returns - `type AttackLayer7SummaryV2Response struct{…}` - `Meta AttackLayer7SummaryV2ResponseMeta` Metadata for the results. - `ConfidenceInfo AttackLayer7SummaryV2ResponseMetaConfidenceInfo` - `Annotations []AttackLayer7SummaryV2ResponseMetaConfidenceInfoAnnotation` - `DataSource AttackLayer7SummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource` Data source for annotations. - `const AttackLayer7SummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceAll AttackLayer7SummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "ALL"` - `const AttackLayer7SummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceAIBots AttackLayer7SummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "AI_BOTS"` - `const AttackLayer7SummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway AttackLayer7SummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "AI_GATEWAY"` - `const AttackLayer7SummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceBGP AttackLayer7SummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "BGP"` - `const AttackLayer7SummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceBots AttackLayer7SummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "BOTS"` - `const AttackLayer7SummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly AttackLayer7SummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "CONNECTION_ANOMALY"` - `const AttackLayer7SummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceCT AttackLayer7SummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "CT"` - `const AttackLayer7SummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceDNS AttackLayer7SummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "DNS"` - `const AttackLayer7SummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude AttackLayer7SummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_MAGNITUDE"` - `const AttackLayer7SummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112 AttackLayer7SummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_AS112"` - `const AttackLayer7SummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceDos AttackLayer7SummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "DOS"` - `const AttackLayer7SummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting AttackLayer7SummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_ROUTING"` - `const AttackLayer7SummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity AttackLayer7SummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_SECURITY"` - `const AttackLayer7SummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceFw AttackLayer7SummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "FW"` - `const AttackLayer7SummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceFwPg AttackLayer7SummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "FW_PG"` - `const AttackLayer7SummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceHTTP AttackLayer7SummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP"` - `const AttackLayer7SummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl AttackLayer7SummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CONTROL"` - `const AttackLayer7SummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer AttackLayer7SummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CRAWLER_REFERER"` - `const AttackLayer7SummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins AttackLayer7SummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_ORIGINS"` - `const AttackLayer7SummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceIQI AttackLayer7SummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "IQI"` - `const AttackLayer7SummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials AttackLayer7SummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "LEAKED_CREDENTIALS"` - `const AttackLayer7SummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceNet AttackLayer7SummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "NET"` - `const AttackLayer7SummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT AttackLayer7SummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "ROBOTS_TXT"` - `const AttackLayer7SummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceSpeed AttackLayer7SummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "SPEED"` - `const AttackLayer7SummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI AttackLayer7SummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "WORKERS_AI"` - `Description string` - `EndDate Time` - `EventType AttackLayer7SummaryV2ResponseMetaConfidenceInfoAnnotationsEventType` Event type for annotations. - `const AttackLayer7SummaryV2ResponseMetaConfidenceInfoAnnotationsEventTypeEvent AttackLayer7SummaryV2ResponseMetaConfidenceInfoAnnotationsEventType = "EVENT"` - `const AttackLayer7SummaryV2ResponseMetaConfidenceInfoAnnotationsEventTypeGeneral AttackLayer7SummaryV2ResponseMetaConfidenceInfoAnnotationsEventType = "GENERAL"` - `const AttackLayer7SummaryV2ResponseMetaConfidenceInfoAnnotationsEventTypeOutage AttackLayer7SummaryV2ResponseMetaConfidenceInfoAnnotationsEventType = "OUTAGE"` - `const AttackLayer7SummaryV2ResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection AttackLayer7SummaryV2ResponseMetaConfidenceInfoAnnotationsEventType = "PARTIAL_PROJECTION"` - `const AttackLayer7SummaryV2ResponseMetaConfidenceInfoAnnotationsEventTypePipeline AttackLayer7SummaryV2ResponseMetaConfidenceInfoAnnotationsEventType = "PIPELINE"` - `const AttackLayer7SummaryV2ResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly AttackLayer7SummaryV2ResponseMetaConfidenceInfoAnnotationsEventType = "TRAFFIC_ANOMALY"` - `IsInstantaneous bool` Whether event is a single point in time or a time range. - `LinkedURL string` - `StartDate Time` - `Level int64` Provides an indication of how much confidence Cloudflare has in the data. - `DateRange []AttackLayer7SummaryV2ResponseMetaDateRange` - `EndTime Time` Adjusted end of date range. - `StartTime Time` Adjusted start of date range. - `LastUpdated Time` Timestamp of the last dataset update. - `Normalization AttackLayer7SummaryV2ResponseMetaNormalization` Normalization method applied to the results. Refer to [Normalization methods](https://developers.cloudflare.com/radar/concepts/normalization/). - `const AttackLayer7SummaryV2ResponseMetaNormalizationPercentage AttackLayer7SummaryV2ResponseMetaNormalization = "PERCENTAGE"` - `const AttackLayer7SummaryV2ResponseMetaNormalizationMin0Max AttackLayer7SummaryV2ResponseMetaNormalization = "MIN0_MAX"` - `const AttackLayer7SummaryV2ResponseMetaNormalizationMinMax AttackLayer7SummaryV2ResponseMetaNormalization = "MIN_MAX"` - `const AttackLayer7SummaryV2ResponseMetaNormalizationRawValues AttackLayer7SummaryV2ResponseMetaNormalization = "RAW_VALUES"` - `const AttackLayer7SummaryV2ResponseMetaNormalizationPercentageChange AttackLayer7SummaryV2ResponseMetaNormalization = "PERCENTAGE_CHANGE"` - `const AttackLayer7SummaryV2ResponseMetaNormalizationRollingAverage AttackLayer7SummaryV2ResponseMetaNormalization = "ROLLING_AVERAGE"` - `const AttackLayer7SummaryV2ResponseMetaNormalizationOverlappedPercentage AttackLayer7SummaryV2ResponseMetaNormalization = "OVERLAPPED_PERCENTAGE"` - `const AttackLayer7SummaryV2ResponseMetaNormalizationRatio AttackLayer7SummaryV2ResponseMetaNormalization = "RATIO"` - `Units []AttackLayer7SummaryV2ResponseMetaUnit` Measurement units for the results. - `Name string` - `Value string` - `Summary0 map[string, string]` ### Example ```go 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.Layer7.SummaryV2( context.TODO(), radar.AttackLayer7SummaryV2ParamsDimensionHTTPMethod, radar.AttackLayer7SummaryV2Params{ }, ) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", response.Meta) } ``` #### Response ```json { "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": { "GET": "50.168733", "POST": "25.084366" } }, "success": true } ``` ## Get layer 7 attacks time series `client.Radar.Attacks.Layer7.Timeseries(ctx, query) (*AttackLayer7TimeseriesResponse, error)` **get** `/radar/attacks/layer7/timeseries` Retrieves layer 7 attacks over time. ### Parameters - `query AttackLayer7TimeseriesParams` - `AggInterval param.Field[AttackLayer7TimeseriesParamsAggInterval]` Aggregation interval of the results (e.g., in 15 minutes or 1 hour intervals). Refer to [Aggregation intervals](https://developers.cloudflare.com/radar/concepts/aggregation-intervals/). - `const AttackLayer7TimeseriesParamsAggInterval15m AttackLayer7TimeseriesParamsAggInterval = "15m"` - `const AttackLayer7TimeseriesParamsAggInterval1h AttackLayer7TimeseriesParamsAggInterval = "1h"` - `const AttackLayer7TimeseriesParamsAggInterval1d AttackLayer7TimeseriesParamsAggInterval = "1d"` - `const AttackLayer7TimeseriesParamsAggInterval1w AttackLayer7TimeseriesParamsAggInterval = "1w"` - `ASN param.Field[[]string]` Filters results by Autonomous System. Specify one or more Autonomous System Numbers (ASNs) as a comma-separated list. Prefix with `-` to exclude ASNs from results. For example, `-174, 3356` excludes results from AS174, but includes results from AS3356. - `Continent param.Field[[]string]` 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]` End of the date range (inclusive). - `DateRange param.Field[[]string]` 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]` Start of the date range. - `Format param.Field[AttackLayer7TimeseriesParamsFormat]` Format in which results will be returned. - `const AttackLayer7TimeseriesParamsFormatJson AttackLayer7TimeseriesParamsFormat = "JSON"` - `const AttackLayer7TimeseriesParamsFormatCsv AttackLayer7TimeseriesParamsFormat = "CSV"` - `HTTPMethod param.Field[[]AttackLayer7TimeseriesParamsHTTPMethod]` Filters results by HTTP method. - `const AttackLayer7TimeseriesParamsHTTPMethodGet AttackLayer7TimeseriesParamsHTTPMethod = "GET"` - `const AttackLayer7TimeseriesParamsHTTPMethodPost AttackLayer7TimeseriesParamsHTTPMethod = "POST"` - `const AttackLayer7TimeseriesParamsHTTPMethodDelete AttackLayer7TimeseriesParamsHTTPMethod = "DELETE"` - `const AttackLayer7TimeseriesParamsHTTPMethodPut AttackLayer7TimeseriesParamsHTTPMethod = "PUT"` - `const AttackLayer7TimeseriesParamsHTTPMethodHead AttackLayer7TimeseriesParamsHTTPMethod = "HEAD"` - `const AttackLayer7TimeseriesParamsHTTPMethodPurge AttackLayer7TimeseriesParamsHTTPMethod = "PURGE"` - `const AttackLayer7TimeseriesParamsHTTPMethodOptions AttackLayer7TimeseriesParamsHTTPMethod = "OPTIONS"` - `const AttackLayer7TimeseriesParamsHTTPMethodPropfind AttackLayer7TimeseriesParamsHTTPMethod = "PROPFIND"` - `const AttackLayer7TimeseriesParamsHTTPMethodMkcol AttackLayer7TimeseriesParamsHTTPMethod = "MKCOL"` - `const AttackLayer7TimeseriesParamsHTTPMethodPatch AttackLayer7TimeseriesParamsHTTPMethod = "PATCH"` - `const AttackLayer7TimeseriesParamsHTTPMethodACL AttackLayer7TimeseriesParamsHTTPMethod = "ACL"` - `const AttackLayer7TimeseriesParamsHTTPMethodBcopy AttackLayer7TimeseriesParamsHTTPMethod = "BCOPY"` - `const AttackLayer7TimeseriesParamsHTTPMethodBdelete AttackLayer7TimeseriesParamsHTTPMethod = "BDELETE"` - `const AttackLayer7TimeseriesParamsHTTPMethodBmove AttackLayer7TimeseriesParamsHTTPMethod = "BMOVE"` - `const AttackLayer7TimeseriesParamsHTTPMethodBpropfind AttackLayer7TimeseriesParamsHTTPMethod = "BPROPFIND"` - `const AttackLayer7TimeseriesParamsHTTPMethodBproppatch AttackLayer7TimeseriesParamsHTTPMethod = "BPROPPATCH"` - `const AttackLayer7TimeseriesParamsHTTPMethodCheckin AttackLayer7TimeseriesParamsHTTPMethod = "CHECKIN"` - `const AttackLayer7TimeseriesParamsHTTPMethodCheckout AttackLayer7TimeseriesParamsHTTPMethod = "CHECKOUT"` - `const AttackLayer7TimeseriesParamsHTTPMethodConnect AttackLayer7TimeseriesParamsHTTPMethod = "CONNECT"` - `const AttackLayer7TimeseriesParamsHTTPMethodCopy AttackLayer7TimeseriesParamsHTTPMethod = "COPY"` - `const AttackLayer7TimeseriesParamsHTTPMethodLabel AttackLayer7TimeseriesParamsHTTPMethod = "LABEL"` - `const AttackLayer7TimeseriesParamsHTTPMethodLock AttackLayer7TimeseriesParamsHTTPMethod = "LOCK"` - `const AttackLayer7TimeseriesParamsHTTPMethodMerge AttackLayer7TimeseriesParamsHTTPMethod = "MERGE"` - `const AttackLayer7TimeseriesParamsHTTPMethodMkactivity AttackLayer7TimeseriesParamsHTTPMethod = "MKACTIVITY"` - `const AttackLayer7TimeseriesParamsHTTPMethodMkworkspace AttackLayer7TimeseriesParamsHTTPMethod = "MKWORKSPACE"` - `const AttackLayer7TimeseriesParamsHTTPMethodMove AttackLayer7TimeseriesParamsHTTPMethod = "MOVE"` - `const AttackLayer7TimeseriesParamsHTTPMethodNotify AttackLayer7TimeseriesParamsHTTPMethod = "NOTIFY"` - `const AttackLayer7TimeseriesParamsHTTPMethodOrderpatch AttackLayer7TimeseriesParamsHTTPMethod = "ORDERPATCH"` - `const AttackLayer7TimeseriesParamsHTTPMethodPoll AttackLayer7TimeseriesParamsHTTPMethod = "POLL"` - `const AttackLayer7TimeseriesParamsHTTPMethodProppatch AttackLayer7TimeseriesParamsHTTPMethod = "PROPPATCH"` - `const AttackLayer7TimeseriesParamsHTTPMethodReport AttackLayer7TimeseriesParamsHTTPMethod = "REPORT"` - `const AttackLayer7TimeseriesParamsHTTPMethodSearch AttackLayer7TimeseriesParamsHTTPMethod = "SEARCH"` - `const AttackLayer7TimeseriesParamsHTTPMethodSubscribe AttackLayer7TimeseriesParamsHTTPMethod = "SUBSCRIBE"` - `const AttackLayer7TimeseriesParamsHTTPMethodTrace AttackLayer7TimeseriesParamsHTTPMethod = "TRACE"` - `const AttackLayer7TimeseriesParamsHTTPMethodUncheckout AttackLayer7TimeseriesParamsHTTPMethod = "UNCHECKOUT"` - `const AttackLayer7TimeseriesParamsHTTPMethodUnlock AttackLayer7TimeseriesParamsHTTPMethod = "UNLOCK"` - `const AttackLayer7TimeseriesParamsHTTPMethodUnsubscribe AttackLayer7TimeseriesParamsHTTPMethod = "UNSUBSCRIBE"` - `const AttackLayer7TimeseriesParamsHTTPMethodUpdate AttackLayer7TimeseriesParamsHTTPMethod = "UPDATE"` - `const AttackLayer7TimeseriesParamsHTTPMethodVersioncontrol AttackLayer7TimeseriesParamsHTTPMethod = "VERSIONCONTROL"` - `const AttackLayer7TimeseriesParamsHTTPMethodBaselinecontrol AttackLayer7TimeseriesParamsHTTPMethod = "BASELINECONTROL"` - `const AttackLayer7TimeseriesParamsHTTPMethodXmsenumatts AttackLayer7TimeseriesParamsHTTPMethod = "XMSENUMATTS"` - `const AttackLayer7TimeseriesParamsHTTPMethodRpcOutData AttackLayer7TimeseriesParamsHTTPMethod = "RPC_OUT_DATA"` - `const AttackLayer7TimeseriesParamsHTTPMethodRpcInData AttackLayer7TimeseriesParamsHTTPMethod = "RPC_IN_DATA"` - `const AttackLayer7TimeseriesParamsHTTPMethodJson AttackLayer7TimeseriesParamsHTTPMethod = "JSON"` - `const AttackLayer7TimeseriesParamsHTTPMethodCook AttackLayer7TimeseriesParamsHTTPMethod = "COOK"` - `const AttackLayer7TimeseriesParamsHTTPMethodTrack AttackLayer7TimeseriesParamsHTTPMethod = "TRACK"` - `HTTPVersion param.Field[[]AttackLayer7TimeseriesParamsHTTPVersion]` Filters results by HTTP version. - `const AttackLayer7TimeseriesParamsHTTPVersionHttPv1 AttackLayer7TimeseriesParamsHTTPVersion = "HTTPv1"` - `const AttackLayer7TimeseriesParamsHTTPVersionHttPv2 AttackLayer7TimeseriesParamsHTTPVersion = "HTTPv2"` - `const AttackLayer7TimeseriesParamsHTTPVersionHttPv3 AttackLayer7TimeseriesParamsHTTPVersion = "HTTPv3"` - `IPVersion param.Field[[]AttackLayer7TimeseriesParamsIPVersion]` Filters results by IP version (Ipv4 vs. IPv6). - `const AttackLayer7TimeseriesParamsIPVersionIPv4 AttackLayer7TimeseriesParamsIPVersion = "IPv4"` - `const AttackLayer7TimeseriesParamsIPVersionIPv6 AttackLayer7TimeseriesParamsIPVersion = "IPv6"` - `Location param.Field[[]string]` 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. - `MitigationProduct param.Field[[]AttackLayer7TimeseriesParamsMitigationProduct]` Filters the results by layer 7 mitigation product. - `const AttackLayer7TimeseriesParamsMitigationProductDDoS AttackLayer7TimeseriesParamsMitigationProduct = "DDOS"` - `const AttackLayer7TimeseriesParamsMitigationProductWAF AttackLayer7TimeseriesParamsMitigationProduct = "WAF"` - `const AttackLayer7TimeseriesParamsMitigationProductBotManagement AttackLayer7TimeseriesParamsMitigationProduct = "BOT_MANAGEMENT"` - `const AttackLayer7TimeseriesParamsMitigationProductAccessRules AttackLayer7TimeseriesParamsMitigationProduct = "ACCESS_RULES"` - `const AttackLayer7TimeseriesParamsMitigationProductIPReputation AttackLayer7TimeseriesParamsMitigationProduct = "IP_REPUTATION"` - `const AttackLayer7TimeseriesParamsMitigationProductAPIShield AttackLayer7TimeseriesParamsMitigationProduct = "API_SHIELD"` - `const AttackLayer7TimeseriesParamsMitigationProductDataLossPrevention AttackLayer7TimeseriesParamsMitigationProduct = "DATA_LOSS_PREVENTION"` - `Name param.Field[[]string]` Array of names used to label the series in the response. - `Normalization param.Field[AttackLayer7TimeseriesParamsNormalization]` Normalization method applied to the results. Refer to [Normalization methods](https://developers.cloudflare.com/radar/concepts/normalization/). - `const AttackLayer7TimeseriesParamsNormalizationPercentageChange AttackLayer7TimeseriesParamsNormalization = "PERCENTAGE_CHANGE"` - `const AttackLayer7TimeseriesParamsNormalizationMin0Max AttackLayer7TimeseriesParamsNormalization = "MIN0_MAX"` ### Returns - `type AttackLayer7TimeseriesResponse struct{…}` - `Meta AttackLayer7TimeseriesResponseMeta` Metadata for the results. - `AggInterval AttackLayer7TimeseriesResponseMetaAggInterval` Aggregation interval of the results (e.g., in 15 minutes or 1 hour intervals). Refer to [Aggregation intervals](https://developers.cloudflare.com/radar/concepts/aggregation-intervals/). - `const AttackLayer7TimeseriesResponseMetaAggIntervalFifteenMinutes AttackLayer7TimeseriesResponseMetaAggInterval = "FIFTEEN_MINUTES"` - `const AttackLayer7TimeseriesResponseMetaAggIntervalOneHour AttackLayer7TimeseriesResponseMetaAggInterval = "ONE_HOUR"` - `const AttackLayer7TimeseriesResponseMetaAggIntervalOneDay AttackLayer7TimeseriesResponseMetaAggInterval = "ONE_DAY"` - `const AttackLayer7TimeseriesResponseMetaAggIntervalOneWeek AttackLayer7TimeseriesResponseMetaAggInterval = "ONE_WEEK"` - `const AttackLayer7TimeseriesResponseMetaAggIntervalOneMonth AttackLayer7TimeseriesResponseMetaAggInterval = "ONE_MONTH"` - `ConfidenceInfo AttackLayer7TimeseriesResponseMetaConfidenceInfo` - `Annotations []AttackLayer7TimeseriesResponseMetaConfidenceInfoAnnotation` - `DataSource AttackLayer7TimeseriesResponseMetaConfidenceInfoAnnotationsDataSource` Data source for annotations. - `const AttackLayer7TimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceAll AttackLayer7TimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "ALL"` - `const AttackLayer7TimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceAIBots AttackLayer7TimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "AI_BOTS"` - `const AttackLayer7TimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway AttackLayer7TimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "AI_GATEWAY"` - `const AttackLayer7TimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceBGP AttackLayer7TimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "BGP"` - `const AttackLayer7TimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceBots AttackLayer7TimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "BOTS"` - `const AttackLayer7TimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly AttackLayer7TimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "CONNECTION_ANOMALY"` - `const AttackLayer7TimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceCT AttackLayer7TimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "CT"` - `const AttackLayer7TimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceDNS AttackLayer7TimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "DNS"` - `const AttackLayer7TimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude AttackLayer7TimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_MAGNITUDE"` - `const AttackLayer7TimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112 AttackLayer7TimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_AS112"` - `const AttackLayer7TimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceDos AttackLayer7TimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "DOS"` - `const AttackLayer7TimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting AttackLayer7TimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_ROUTING"` - `const AttackLayer7TimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity AttackLayer7TimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_SECURITY"` - `const AttackLayer7TimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceFw AttackLayer7TimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "FW"` - `const AttackLayer7TimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceFwPg AttackLayer7TimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "FW_PG"` - `const AttackLayer7TimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceHTTP AttackLayer7TimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP"` - `const AttackLayer7TimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl AttackLayer7TimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CONTROL"` - `const AttackLayer7TimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer AttackLayer7TimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CRAWLER_REFERER"` - `const AttackLayer7TimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins AttackLayer7TimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_ORIGINS"` - `const AttackLayer7TimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceIQI AttackLayer7TimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "IQI"` - `const AttackLayer7TimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials AttackLayer7TimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "LEAKED_CREDENTIALS"` - `const AttackLayer7TimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceNet AttackLayer7TimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "NET"` - `const AttackLayer7TimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT AttackLayer7TimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "ROBOTS_TXT"` - `const AttackLayer7TimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceSpeed AttackLayer7TimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "SPEED"` - `const AttackLayer7TimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI AttackLayer7TimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "WORKERS_AI"` - `Description string` - `EndDate Time` - `EventType AttackLayer7TimeseriesResponseMetaConfidenceInfoAnnotationsEventType` Event type for annotations. - `const AttackLayer7TimeseriesResponseMetaConfidenceInfoAnnotationsEventTypeEvent AttackLayer7TimeseriesResponseMetaConfidenceInfoAnnotationsEventType = "EVENT"` - `const AttackLayer7TimeseriesResponseMetaConfidenceInfoAnnotationsEventTypeGeneral AttackLayer7TimeseriesResponseMetaConfidenceInfoAnnotationsEventType = "GENERAL"` - `const AttackLayer7TimeseriesResponseMetaConfidenceInfoAnnotationsEventTypeOutage AttackLayer7TimeseriesResponseMetaConfidenceInfoAnnotationsEventType = "OUTAGE"` - `const AttackLayer7TimeseriesResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection AttackLayer7TimeseriesResponseMetaConfidenceInfoAnnotationsEventType = "PARTIAL_PROJECTION"` - `const AttackLayer7TimeseriesResponseMetaConfidenceInfoAnnotationsEventTypePipeline AttackLayer7TimeseriesResponseMetaConfidenceInfoAnnotationsEventType = "PIPELINE"` - `const AttackLayer7TimeseriesResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly AttackLayer7TimeseriesResponseMetaConfidenceInfoAnnotationsEventType = "TRAFFIC_ANOMALY"` - `IsInstantaneous bool` Whether event is a single point in time or a time range. - `LinkedURL string` - `StartDate Time` - `Level int64` Provides an indication of how much confidence Cloudflare has in the data. - `DateRange []AttackLayer7TimeseriesResponseMetaDateRange` - `EndTime Time` Adjusted end of date range. - `StartTime Time` Adjusted start of date range. - `LastUpdated Time` Timestamp of the last dataset update. - `Normalization AttackLayer7TimeseriesResponseMetaNormalization` Normalization method applied to the results. Refer to [Normalization methods](https://developers.cloudflare.com/radar/concepts/normalization/). - `const AttackLayer7TimeseriesResponseMetaNormalizationPercentage AttackLayer7TimeseriesResponseMetaNormalization = "PERCENTAGE"` - `const AttackLayer7TimeseriesResponseMetaNormalizationMin0Max AttackLayer7TimeseriesResponseMetaNormalization = "MIN0_MAX"` - `const AttackLayer7TimeseriesResponseMetaNormalizationMinMax AttackLayer7TimeseriesResponseMetaNormalization = "MIN_MAX"` - `const AttackLayer7TimeseriesResponseMetaNormalizationRawValues AttackLayer7TimeseriesResponseMetaNormalization = "RAW_VALUES"` - `const AttackLayer7TimeseriesResponseMetaNormalizationPercentageChange AttackLayer7TimeseriesResponseMetaNormalization = "PERCENTAGE_CHANGE"` - `const AttackLayer7TimeseriesResponseMetaNormalizationRollingAverage AttackLayer7TimeseriesResponseMetaNormalization = "ROLLING_AVERAGE"` - `const AttackLayer7TimeseriesResponseMetaNormalizationOverlappedPercentage AttackLayer7TimeseriesResponseMetaNormalization = "OVERLAPPED_PERCENTAGE"` - `const AttackLayer7TimeseriesResponseMetaNormalizationRatio AttackLayer7TimeseriesResponseMetaNormalization = "RATIO"` - `Units []AttackLayer7TimeseriesResponseMetaUnit` Measurement units for the results. - `Name string` - `Value string` - `Serie0 AttackLayer7TimeseriesResponseSerie0` - `Timestamps []Time` - `Values []string` ### Example ```go 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.Layer7.Timeseries(context.TODO(), radar.AttackLayer7TimeseriesParams{ }) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", response.Meta) } ``` #### Response ```json { "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": { "timestamps": [ "2019-12-27T18:11:19.117Z" ], "values": [ "10" ] } }, "success": true } ``` ## Get layer 7 attacks time series grouped by dimension `client.Radar.Attacks.Layer7.TimeseriesGroupsV2(ctx, dimension, query) (*AttackLayer7TimeseriesGroupsV2Response, error)` **get** `/radar/attacks/layer7/timeseries_groups/{dimension}` Retrieves the distribution of layer 7 attacks grouped by dimension over time. ### Parameters - `dimension AttackLayer7TimeseriesGroupsV2ParamsDimension` Specifies the attribute by which to group the results. - `const AttackLayer7TimeseriesGroupsV2ParamsDimensionHTTPMethod AttackLayer7TimeseriesGroupsV2ParamsDimension = "HTTP_METHOD"` - `const AttackLayer7TimeseriesGroupsV2ParamsDimensionHTTPVersion AttackLayer7TimeseriesGroupsV2ParamsDimension = "HTTP_VERSION"` - `const AttackLayer7TimeseriesGroupsV2ParamsDimensionIPVersion AttackLayer7TimeseriesGroupsV2ParamsDimension = "IP_VERSION"` - `const AttackLayer7TimeseriesGroupsV2ParamsDimensionManagedRules AttackLayer7TimeseriesGroupsV2ParamsDimension = "MANAGED_RULES"` - `const AttackLayer7TimeseriesGroupsV2ParamsDimensionMitigationProduct AttackLayer7TimeseriesGroupsV2ParamsDimension = "MITIGATION_PRODUCT"` - `const AttackLayer7TimeseriesGroupsV2ParamsDimensionVertical AttackLayer7TimeseriesGroupsV2ParamsDimension = "VERTICAL"` - `const AttackLayer7TimeseriesGroupsV2ParamsDimensionIndustry AttackLayer7TimeseriesGroupsV2ParamsDimension = "INDUSTRY"` - `query AttackLayer7TimeseriesGroupsV2Params` - `AggInterval param.Field[AttackLayer7TimeseriesGroupsV2ParamsAggInterval]` Aggregation interval of the results (e.g., in 15 minutes or 1 hour intervals). Refer to [Aggregation intervals](https://developers.cloudflare.com/radar/concepts/aggregation-intervals/). - `const AttackLayer7TimeseriesGroupsV2ParamsAggInterval15m AttackLayer7TimeseriesGroupsV2ParamsAggInterval = "15m"` - `const AttackLayer7TimeseriesGroupsV2ParamsAggInterval1h AttackLayer7TimeseriesGroupsV2ParamsAggInterval = "1h"` - `const AttackLayer7TimeseriesGroupsV2ParamsAggInterval1d AttackLayer7TimeseriesGroupsV2ParamsAggInterval = "1d"` - `const AttackLayer7TimeseriesGroupsV2ParamsAggInterval1w AttackLayer7TimeseriesGroupsV2ParamsAggInterval = "1w"` - `ASN param.Field[[]string]` Filters results by Autonomous System. Specify one or more Autonomous System Numbers (ASNs) as a comma-separated list. Prefix with `-` to exclude ASNs from results. For example, `-174, 3356` excludes results from AS174, but includes results from AS3356. - `Continent param.Field[[]string]` 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]` End of the date range (inclusive). - `DateRange param.Field[[]string]` 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]` Start of the date range. - `Format param.Field[AttackLayer7TimeseriesGroupsV2ParamsFormat]` Format in which results will be returned. - `const AttackLayer7TimeseriesGroupsV2ParamsFormatJson AttackLayer7TimeseriesGroupsV2ParamsFormat = "JSON"` - `const AttackLayer7TimeseriesGroupsV2ParamsFormatCsv AttackLayer7TimeseriesGroupsV2ParamsFormat = "CSV"` - `HTTPMethod param.Field[[]AttackLayer7TimeseriesGroupsV2ParamsHTTPMethod]` Filters results by HTTP method. - `const AttackLayer7TimeseriesGroupsV2ParamsHTTPMethodGet AttackLayer7TimeseriesGroupsV2ParamsHTTPMethod = "GET"` - `const AttackLayer7TimeseriesGroupsV2ParamsHTTPMethodPost AttackLayer7TimeseriesGroupsV2ParamsHTTPMethod = "POST"` - `const AttackLayer7TimeseriesGroupsV2ParamsHTTPMethodDelete AttackLayer7TimeseriesGroupsV2ParamsHTTPMethod = "DELETE"` - `const AttackLayer7TimeseriesGroupsV2ParamsHTTPMethodPut AttackLayer7TimeseriesGroupsV2ParamsHTTPMethod = "PUT"` - `const AttackLayer7TimeseriesGroupsV2ParamsHTTPMethodHead AttackLayer7TimeseriesGroupsV2ParamsHTTPMethod = "HEAD"` - `const AttackLayer7TimeseriesGroupsV2ParamsHTTPMethodPurge AttackLayer7TimeseriesGroupsV2ParamsHTTPMethod = "PURGE"` - `const AttackLayer7TimeseriesGroupsV2ParamsHTTPMethodOptions AttackLayer7TimeseriesGroupsV2ParamsHTTPMethod = "OPTIONS"` - `const AttackLayer7TimeseriesGroupsV2ParamsHTTPMethodPropfind AttackLayer7TimeseriesGroupsV2ParamsHTTPMethod = "PROPFIND"` - `const AttackLayer7TimeseriesGroupsV2ParamsHTTPMethodMkcol AttackLayer7TimeseriesGroupsV2ParamsHTTPMethod = "MKCOL"` - `const AttackLayer7TimeseriesGroupsV2ParamsHTTPMethodPatch AttackLayer7TimeseriesGroupsV2ParamsHTTPMethod = "PATCH"` - `const AttackLayer7TimeseriesGroupsV2ParamsHTTPMethodACL AttackLayer7TimeseriesGroupsV2ParamsHTTPMethod = "ACL"` - `const AttackLayer7TimeseriesGroupsV2ParamsHTTPMethodBcopy AttackLayer7TimeseriesGroupsV2ParamsHTTPMethod = "BCOPY"` - `const AttackLayer7TimeseriesGroupsV2ParamsHTTPMethodBdelete AttackLayer7TimeseriesGroupsV2ParamsHTTPMethod = "BDELETE"` - `const AttackLayer7TimeseriesGroupsV2ParamsHTTPMethodBmove AttackLayer7TimeseriesGroupsV2ParamsHTTPMethod = "BMOVE"` - `const AttackLayer7TimeseriesGroupsV2ParamsHTTPMethodBpropfind AttackLayer7TimeseriesGroupsV2ParamsHTTPMethod = "BPROPFIND"` - `const AttackLayer7TimeseriesGroupsV2ParamsHTTPMethodBproppatch AttackLayer7TimeseriesGroupsV2ParamsHTTPMethod = "BPROPPATCH"` - `const AttackLayer7TimeseriesGroupsV2ParamsHTTPMethodCheckin AttackLayer7TimeseriesGroupsV2ParamsHTTPMethod = "CHECKIN"` - `const AttackLayer7TimeseriesGroupsV2ParamsHTTPMethodCheckout AttackLayer7TimeseriesGroupsV2ParamsHTTPMethod = "CHECKOUT"` - `const AttackLayer7TimeseriesGroupsV2ParamsHTTPMethodConnect AttackLayer7TimeseriesGroupsV2ParamsHTTPMethod = "CONNECT"` - `const AttackLayer7TimeseriesGroupsV2ParamsHTTPMethodCopy AttackLayer7TimeseriesGroupsV2ParamsHTTPMethod = "COPY"` - `const AttackLayer7TimeseriesGroupsV2ParamsHTTPMethodLabel AttackLayer7TimeseriesGroupsV2ParamsHTTPMethod = "LABEL"` - `const AttackLayer7TimeseriesGroupsV2ParamsHTTPMethodLock AttackLayer7TimeseriesGroupsV2ParamsHTTPMethod = "LOCK"` - `const AttackLayer7TimeseriesGroupsV2ParamsHTTPMethodMerge AttackLayer7TimeseriesGroupsV2ParamsHTTPMethod = "MERGE"` - `const AttackLayer7TimeseriesGroupsV2ParamsHTTPMethodMkactivity AttackLayer7TimeseriesGroupsV2ParamsHTTPMethod = "MKACTIVITY"` - `const AttackLayer7TimeseriesGroupsV2ParamsHTTPMethodMkworkspace AttackLayer7TimeseriesGroupsV2ParamsHTTPMethod = "MKWORKSPACE"` - `const AttackLayer7TimeseriesGroupsV2ParamsHTTPMethodMove AttackLayer7TimeseriesGroupsV2ParamsHTTPMethod = "MOVE"` - `const AttackLayer7TimeseriesGroupsV2ParamsHTTPMethodNotify AttackLayer7TimeseriesGroupsV2ParamsHTTPMethod = "NOTIFY"` - `const AttackLayer7TimeseriesGroupsV2ParamsHTTPMethodOrderpatch AttackLayer7TimeseriesGroupsV2ParamsHTTPMethod = "ORDERPATCH"` - `const AttackLayer7TimeseriesGroupsV2ParamsHTTPMethodPoll AttackLayer7TimeseriesGroupsV2ParamsHTTPMethod = "POLL"` - `const AttackLayer7TimeseriesGroupsV2ParamsHTTPMethodProppatch AttackLayer7TimeseriesGroupsV2ParamsHTTPMethod = "PROPPATCH"` - `const AttackLayer7TimeseriesGroupsV2ParamsHTTPMethodReport AttackLayer7TimeseriesGroupsV2ParamsHTTPMethod = "REPORT"` - `const AttackLayer7TimeseriesGroupsV2ParamsHTTPMethodSearch AttackLayer7TimeseriesGroupsV2ParamsHTTPMethod = "SEARCH"` - `const AttackLayer7TimeseriesGroupsV2ParamsHTTPMethodSubscribe AttackLayer7TimeseriesGroupsV2ParamsHTTPMethod = "SUBSCRIBE"` - `const AttackLayer7TimeseriesGroupsV2ParamsHTTPMethodTrace AttackLayer7TimeseriesGroupsV2ParamsHTTPMethod = "TRACE"` - `const AttackLayer7TimeseriesGroupsV2ParamsHTTPMethodUncheckout AttackLayer7TimeseriesGroupsV2ParamsHTTPMethod = "UNCHECKOUT"` - `const AttackLayer7TimeseriesGroupsV2ParamsHTTPMethodUnlock AttackLayer7TimeseriesGroupsV2ParamsHTTPMethod = "UNLOCK"` - `const AttackLayer7TimeseriesGroupsV2ParamsHTTPMethodUnsubscribe AttackLayer7TimeseriesGroupsV2ParamsHTTPMethod = "UNSUBSCRIBE"` - `const AttackLayer7TimeseriesGroupsV2ParamsHTTPMethodUpdate AttackLayer7TimeseriesGroupsV2ParamsHTTPMethod = "UPDATE"` - `const AttackLayer7TimeseriesGroupsV2ParamsHTTPMethodVersioncontrol AttackLayer7TimeseriesGroupsV2ParamsHTTPMethod = "VERSIONCONTROL"` - `const AttackLayer7TimeseriesGroupsV2ParamsHTTPMethodBaselinecontrol AttackLayer7TimeseriesGroupsV2ParamsHTTPMethod = "BASELINECONTROL"` - `const AttackLayer7TimeseriesGroupsV2ParamsHTTPMethodXmsenumatts AttackLayer7TimeseriesGroupsV2ParamsHTTPMethod = "XMSENUMATTS"` - `const AttackLayer7TimeseriesGroupsV2ParamsHTTPMethodRpcOutData AttackLayer7TimeseriesGroupsV2ParamsHTTPMethod = "RPC_OUT_DATA"` - `const AttackLayer7TimeseriesGroupsV2ParamsHTTPMethodRpcInData AttackLayer7TimeseriesGroupsV2ParamsHTTPMethod = "RPC_IN_DATA"` - `const AttackLayer7TimeseriesGroupsV2ParamsHTTPMethodJson AttackLayer7TimeseriesGroupsV2ParamsHTTPMethod = "JSON"` - `const AttackLayer7TimeseriesGroupsV2ParamsHTTPMethodCook AttackLayer7TimeseriesGroupsV2ParamsHTTPMethod = "COOK"` - `const AttackLayer7TimeseriesGroupsV2ParamsHTTPMethodTrack AttackLayer7TimeseriesGroupsV2ParamsHTTPMethod = "TRACK"` - `HTTPVersion param.Field[[]AttackLayer7TimeseriesGroupsV2ParamsHTTPVersion]` Filters results by HTTP version. - `const AttackLayer7TimeseriesGroupsV2ParamsHTTPVersionHttPv1 AttackLayer7TimeseriesGroupsV2ParamsHTTPVersion = "HTTPv1"` - `const AttackLayer7TimeseriesGroupsV2ParamsHTTPVersionHttPv2 AttackLayer7TimeseriesGroupsV2ParamsHTTPVersion = "HTTPv2"` - `const AttackLayer7TimeseriesGroupsV2ParamsHTTPVersionHttPv3 AttackLayer7TimeseriesGroupsV2ParamsHTTPVersion = "HTTPv3"` - `IPVersion param.Field[[]AttackLayer7TimeseriesGroupsV2ParamsIPVersion]` Filters results by IP version (Ipv4 vs. IPv6). - `const AttackLayer7TimeseriesGroupsV2ParamsIPVersionIPv4 AttackLayer7TimeseriesGroupsV2ParamsIPVersion = "IPv4"` - `const AttackLayer7TimeseriesGroupsV2ParamsIPVersionIPv6 AttackLayer7TimeseriesGroupsV2ParamsIPVersion = "IPv6"` - `LimitPerGroup param.Field[int64]` 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]` 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. - `MitigationProduct param.Field[[]AttackLayer7TimeseriesGroupsV2ParamsMitigationProduct]` Filters the results by layer 7 mitigation product. - `const AttackLayer7TimeseriesGroupsV2ParamsMitigationProductDDoS AttackLayer7TimeseriesGroupsV2ParamsMitigationProduct = "DDOS"` - `const AttackLayer7TimeseriesGroupsV2ParamsMitigationProductWAF AttackLayer7TimeseriesGroupsV2ParamsMitigationProduct = "WAF"` - `const AttackLayer7TimeseriesGroupsV2ParamsMitigationProductBotManagement AttackLayer7TimeseriesGroupsV2ParamsMitigationProduct = "BOT_MANAGEMENT"` - `const AttackLayer7TimeseriesGroupsV2ParamsMitigationProductAccessRules AttackLayer7TimeseriesGroupsV2ParamsMitigationProduct = "ACCESS_RULES"` - `const AttackLayer7TimeseriesGroupsV2ParamsMitigationProductIPReputation AttackLayer7TimeseriesGroupsV2ParamsMitigationProduct = "IP_REPUTATION"` - `const AttackLayer7TimeseriesGroupsV2ParamsMitigationProductAPIShield AttackLayer7TimeseriesGroupsV2ParamsMitigationProduct = "API_SHIELD"` - `const AttackLayer7TimeseriesGroupsV2ParamsMitigationProductDataLossPrevention AttackLayer7TimeseriesGroupsV2ParamsMitigationProduct = "DATA_LOSS_PREVENTION"` - `Name param.Field[[]string]` Array of names used to label the series in the response. - `Normalization param.Field[AttackLayer7TimeseriesGroupsV2ParamsNormalization]` Normalization method applied to the results. Refer to [Normalization methods](https://developers.cloudflare.com/radar/concepts/normalization/). - `const AttackLayer7TimeseriesGroupsV2ParamsNormalizationPercentage AttackLayer7TimeseriesGroupsV2ParamsNormalization = "PERCENTAGE"` - `const AttackLayer7TimeseriesGroupsV2ParamsNormalizationMin0Max AttackLayer7TimeseriesGroupsV2ParamsNormalization = "MIN0_MAX"` ### Returns - `type AttackLayer7TimeseriesGroupsV2Response struct{…}` - `Meta AttackLayer7TimeseriesGroupsV2ResponseMeta` Metadata for the results. - `AggInterval AttackLayer7TimeseriesGroupsV2ResponseMetaAggInterval` Aggregation interval of the results (e.g., in 15 minutes or 1 hour intervals). Refer to [Aggregation intervals](https://developers.cloudflare.com/radar/concepts/aggregation-intervals/). - `const AttackLayer7TimeseriesGroupsV2ResponseMetaAggIntervalFifteenMinutes AttackLayer7TimeseriesGroupsV2ResponseMetaAggInterval = "FIFTEEN_MINUTES"` - `const AttackLayer7TimeseriesGroupsV2ResponseMetaAggIntervalOneHour AttackLayer7TimeseriesGroupsV2ResponseMetaAggInterval = "ONE_HOUR"` - `const AttackLayer7TimeseriesGroupsV2ResponseMetaAggIntervalOneDay AttackLayer7TimeseriesGroupsV2ResponseMetaAggInterval = "ONE_DAY"` - `const AttackLayer7TimeseriesGroupsV2ResponseMetaAggIntervalOneWeek AttackLayer7TimeseriesGroupsV2ResponseMetaAggInterval = "ONE_WEEK"` - `const AttackLayer7TimeseriesGroupsV2ResponseMetaAggIntervalOneMonth AttackLayer7TimeseriesGroupsV2ResponseMetaAggInterval = "ONE_MONTH"` - `ConfidenceInfo AttackLayer7TimeseriesGroupsV2ResponseMetaConfidenceInfo` - `Annotations []AttackLayer7TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotation` - `DataSource AttackLayer7TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSource` Data source for annotations. - `const AttackLayer7TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceAll AttackLayer7TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSource = "ALL"` - `const AttackLayer7TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceAIBots AttackLayer7TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSource = "AI_BOTS"` - `const AttackLayer7TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway AttackLayer7TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSource = "AI_GATEWAY"` - `const AttackLayer7TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceBGP AttackLayer7TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSource = "BGP"` - `const AttackLayer7TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceBots AttackLayer7TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSource = "BOTS"` - `const AttackLayer7TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly AttackLayer7TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSource = "CONNECTION_ANOMALY"` - `const AttackLayer7TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceCT AttackLayer7TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSource = "CT"` - `const AttackLayer7TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceDNS AttackLayer7TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSource = "DNS"` - `const AttackLayer7TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude AttackLayer7TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_MAGNITUDE"` - `const AttackLayer7TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112 AttackLayer7TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_AS112"` - `const AttackLayer7TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceDos AttackLayer7TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSource = "DOS"` - `const AttackLayer7TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting AttackLayer7TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_ROUTING"` - `const AttackLayer7TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity AttackLayer7TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_SECURITY"` - `const AttackLayer7TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceFw AttackLayer7TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSource = "FW"` - `const AttackLayer7TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceFwPg AttackLayer7TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSource = "FW_PG"` - `const AttackLayer7TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceHTTP AttackLayer7TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP"` - `const AttackLayer7TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl AttackLayer7TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CONTROL"` - `const AttackLayer7TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer AttackLayer7TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CRAWLER_REFERER"` - `const AttackLayer7TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins AttackLayer7TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_ORIGINS"` - `const AttackLayer7TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceIQI AttackLayer7TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSource = "IQI"` - `const AttackLayer7TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials AttackLayer7TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSource = "LEAKED_CREDENTIALS"` - `const AttackLayer7TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceNet AttackLayer7TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSource = "NET"` - `const AttackLayer7TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT AttackLayer7TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSource = "ROBOTS_TXT"` - `const AttackLayer7TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceSpeed AttackLayer7TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSource = "SPEED"` - `const AttackLayer7TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI AttackLayer7TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSource = "WORKERS_AI"` - `Description string` - `EndDate Time` - `EventType AttackLayer7TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsEventType` Event type for annotations. - `const AttackLayer7TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsEventTypeEvent AttackLayer7TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsEventType = "EVENT"` - `const AttackLayer7TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsEventTypeGeneral AttackLayer7TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsEventType = "GENERAL"` - `const AttackLayer7TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsEventTypeOutage AttackLayer7TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsEventType = "OUTAGE"` - `const AttackLayer7TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection AttackLayer7TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsEventType = "PARTIAL_PROJECTION"` - `const AttackLayer7TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsEventTypePipeline AttackLayer7TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsEventType = "PIPELINE"` - `const AttackLayer7TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly AttackLayer7TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsEventType = "TRAFFIC_ANOMALY"` - `IsInstantaneous bool` Whether event is a single point in time or a time range. - `LinkedURL string` - `StartDate Time` - `Level int64` Provides an indication of how much confidence Cloudflare has in the data. - `DateRange []AttackLayer7TimeseriesGroupsV2ResponseMetaDateRange` - `EndTime Time` Adjusted end of date range. - `StartTime Time` Adjusted start of date range. - `LastUpdated Time` Timestamp of the last dataset update. - `Normalization AttackLayer7TimeseriesGroupsV2ResponseMetaNormalization` Normalization method applied to the results. Refer to [Normalization methods](https://developers.cloudflare.com/radar/concepts/normalization/). - `const AttackLayer7TimeseriesGroupsV2ResponseMetaNormalizationPercentage AttackLayer7TimeseriesGroupsV2ResponseMetaNormalization = "PERCENTAGE"` - `const AttackLayer7TimeseriesGroupsV2ResponseMetaNormalizationMin0Max AttackLayer7TimeseriesGroupsV2ResponseMetaNormalization = "MIN0_MAX"` - `const AttackLayer7TimeseriesGroupsV2ResponseMetaNormalizationMinMax AttackLayer7TimeseriesGroupsV2ResponseMetaNormalization = "MIN_MAX"` - `const AttackLayer7TimeseriesGroupsV2ResponseMetaNormalizationRawValues AttackLayer7TimeseriesGroupsV2ResponseMetaNormalization = "RAW_VALUES"` - `const AttackLayer7TimeseriesGroupsV2ResponseMetaNormalizationPercentageChange AttackLayer7TimeseriesGroupsV2ResponseMetaNormalization = "PERCENTAGE_CHANGE"` - `const AttackLayer7TimeseriesGroupsV2ResponseMetaNormalizationRollingAverage AttackLayer7TimeseriesGroupsV2ResponseMetaNormalization = "ROLLING_AVERAGE"` - `const AttackLayer7TimeseriesGroupsV2ResponseMetaNormalizationOverlappedPercentage AttackLayer7TimeseriesGroupsV2ResponseMetaNormalization = "OVERLAPPED_PERCENTAGE"` - `const AttackLayer7TimeseriesGroupsV2ResponseMetaNormalizationRatio AttackLayer7TimeseriesGroupsV2ResponseMetaNormalization = "RATIO"` - `Units []AttackLayer7TimeseriesGroupsV2ResponseMetaUnit` Measurement units for the results. - `Name string` - `Value string` - `Serie0 AttackLayer7TimeseriesGroupsV2ResponseSerie0` - `Timestamps []Time` ### Example ```go 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.Layer7.TimeseriesGroupsV2( context.TODO(), radar.AttackLayer7TimeseriesGroupsV2ParamsDimensionHTTPMethod, radar.AttackLayer7TimeseriesGroupsV2Params{ }, ) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", response.Meta) } ``` #### Response ```json { "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": { "timestamps": [ "2023-08-08T10:15:00Z" ] } }, "success": true } ``` # Summary ## Get layer 7 attacks by IP version summary `client.Radar.Attacks.Layer7.Summary.IPVersion(ctx, query) (*AttackLayer7SummaryIPVersionResponse, error)` **get** `/radar/attacks/layer7/summary/ip_version` Retrieves the distribution of layer 7 attacks by IP version. ### Parameters - `query AttackLayer7SummaryIPVersionParams` - `ASN param.Field[[]string]` Filters results by Autonomous System. Specify one or more Autonomous System Numbers (ASNs) as a comma-separated list. Prefix with `-` to exclude ASNs from results. For example, `-174, 3356` excludes results from AS174, but includes results from AS3356. - `Continent param.Field[[]string]` 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]` End of the date range (inclusive). - `DateRange param.Field[[]string]` 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]` Start of the date range. - `Format param.Field[AttackLayer7SummaryIPVersionParamsFormat]` Format in which results will be returned. - `const AttackLayer7SummaryIPVersionParamsFormatJson AttackLayer7SummaryIPVersionParamsFormat = "JSON"` - `const AttackLayer7SummaryIPVersionParamsFormatCsv AttackLayer7SummaryIPVersionParamsFormat = "CSV"` - `HTTPMethod param.Field[[]AttackLayer7SummaryIPVersionParamsHTTPMethod]` Filters results by HTTP method. - `const AttackLayer7SummaryIPVersionParamsHTTPMethodGet AttackLayer7SummaryIPVersionParamsHTTPMethod = "GET"` - `const AttackLayer7SummaryIPVersionParamsHTTPMethodPost AttackLayer7SummaryIPVersionParamsHTTPMethod = "POST"` - `const AttackLayer7SummaryIPVersionParamsHTTPMethodDelete AttackLayer7SummaryIPVersionParamsHTTPMethod = "DELETE"` - `const AttackLayer7SummaryIPVersionParamsHTTPMethodPut AttackLayer7SummaryIPVersionParamsHTTPMethod = "PUT"` - `const AttackLayer7SummaryIPVersionParamsHTTPMethodHead AttackLayer7SummaryIPVersionParamsHTTPMethod = "HEAD"` - `const AttackLayer7SummaryIPVersionParamsHTTPMethodPurge AttackLayer7SummaryIPVersionParamsHTTPMethod = "PURGE"` - `const AttackLayer7SummaryIPVersionParamsHTTPMethodOptions AttackLayer7SummaryIPVersionParamsHTTPMethod = "OPTIONS"` - `const AttackLayer7SummaryIPVersionParamsHTTPMethodPropfind AttackLayer7SummaryIPVersionParamsHTTPMethod = "PROPFIND"` - `const AttackLayer7SummaryIPVersionParamsHTTPMethodMkcol AttackLayer7SummaryIPVersionParamsHTTPMethod = "MKCOL"` - `const AttackLayer7SummaryIPVersionParamsHTTPMethodPatch AttackLayer7SummaryIPVersionParamsHTTPMethod = "PATCH"` - `const AttackLayer7SummaryIPVersionParamsHTTPMethodACL AttackLayer7SummaryIPVersionParamsHTTPMethod = "ACL"` - `const AttackLayer7SummaryIPVersionParamsHTTPMethodBcopy AttackLayer7SummaryIPVersionParamsHTTPMethod = "BCOPY"` - `const AttackLayer7SummaryIPVersionParamsHTTPMethodBdelete AttackLayer7SummaryIPVersionParamsHTTPMethod = "BDELETE"` - `const AttackLayer7SummaryIPVersionParamsHTTPMethodBmove AttackLayer7SummaryIPVersionParamsHTTPMethod = "BMOVE"` - `const AttackLayer7SummaryIPVersionParamsHTTPMethodBpropfind AttackLayer7SummaryIPVersionParamsHTTPMethod = "BPROPFIND"` - `const AttackLayer7SummaryIPVersionParamsHTTPMethodBproppatch AttackLayer7SummaryIPVersionParamsHTTPMethod = "BPROPPATCH"` - `const AttackLayer7SummaryIPVersionParamsHTTPMethodCheckin AttackLayer7SummaryIPVersionParamsHTTPMethod = "CHECKIN"` - `const AttackLayer7SummaryIPVersionParamsHTTPMethodCheckout AttackLayer7SummaryIPVersionParamsHTTPMethod = "CHECKOUT"` - `const AttackLayer7SummaryIPVersionParamsHTTPMethodConnect AttackLayer7SummaryIPVersionParamsHTTPMethod = "CONNECT"` - `const AttackLayer7SummaryIPVersionParamsHTTPMethodCopy AttackLayer7SummaryIPVersionParamsHTTPMethod = "COPY"` - `const AttackLayer7SummaryIPVersionParamsHTTPMethodLabel AttackLayer7SummaryIPVersionParamsHTTPMethod = "LABEL"` - `const AttackLayer7SummaryIPVersionParamsHTTPMethodLock AttackLayer7SummaryIPVersionParamsHTTPMethod = "LOCK"` - `const AttackLayer7SummaryIPVersionParamsHTTPMethodMerge AttackLayer7SummaryIPVersionParamsHTTPMethod = "MERGE"` - `const AttackLayer7SummaryIPVersionParamsHTTPMethodMkactivity AttackLayer7SummaryIPVersionParamsHTTPMethod = "MKACTIVITY"` - `const AttackLayer7SummaryIPVersionParamsHTTPMethodMkworkspace AttackLayer7SummaryIPVersionParamsHTTPMethod = "MKWORKSPACE"` - `const AttackLayer7SummaryIPVersionParamsHTTPMethodMove AttackLayer7SummaryIPVersionParamsHTTPMethod = "MOVE"` - `const AttackLayer7SummaryIPVersionParamsHTTPMethodNotify AttackLayer7SummaryIPVersionParamsHTTPMethod = "NOTIFY"` - `const AttackLayer7SummaryIPVersionParamsHTTPMethodOrderpatch AttackLayer7SummaryIPVersionParamsHTTPMethod = "ORDERPATCH"` - `const AttackLayer7SummaryIPVersionParamsHTTPMethodPoll AttackLayer7SummaryIPVersionParamsHTTPMethod = "POLL"` - `const AttackLayer7SummaryIPVersionParamsHTTPMethodProppatch AttackLayer7SummaryIPVersionParamsHTTPMethod = "PROPPATCH"` - `const AttackLayer7SummaryIPVersionParamsHTTPMethodReport AttackLayer7SummaryIPVersionParamsHTTPMethod = "REPORT"` - `const AttackLayer7SummaryIPVersionParamsHTTPMethodSearch AttackLayer7SummaryIPVersionParamsHTTPMethod = "SEARCH"` - `const AttackLayer7SummaryIPVersionParamsHTTPMethodSubscribe AttackLayer7SummaryIPVersionParamsHTTPMethod = "SUBSCRIBE"` - `const AttackLayer7SummaryIPVersionParamsHTTPMethodTrace AttackLayer7SummaryIPVersionParamsHTTPMethod = "TRACE"` - `const AttackLayer7SummaryIPVersionParamsHTTPMethodUncheckout AttackLayer7SummaryIPVersionParamsHTTPMethod = "UNCHECKOUT"` - `const AttackLayer7SummaryIPVersionParamsHTTPMethodUnlock AttackLayer7SummaryIPVersionParamsHTTPMethod = "UNLOCK"` - `const AttackLayer7SummaryIPVersionParamsHTTPMethodUnsubscribe AttackLayer7SummaryIPVersionParamsHTTPMethod = "UNSUBSCRIBE"` - `const AttackLayer7SummaryIPVersionParamsHTTPMethodUpdate AttackLayer7SummaryIPVersionParamsHTTPMethod = "UPDATE"` - `const AttackLayer7SummaryIPVersionParamsHTTPMethodVersioncontrol AttackLayer7SummaryIPVersionParamsHTTPMethod = "VERSIONCONTROL"` - `const AttackLayer7SummaryIPVersionParamsHTTPMethodBaselinecontrol AttackLayer7SummaryIPVersionParamsHTTPMethod = "BASELINECONTROL"` - `const AttackLayer7SummaryIPVersionParamsHTTPMethodXmsenumatts AttackLayer7SummaryIPVersionParamsHTTPMethod = "XMSENUMATTS"` - `const AttackLayer7SummaryIPVersionParamsHTTPMethodRpcOutData AttackLayer7SummaryIPVersionParamsHTTPMethod = "RPC_OUT_DATA"` - `const AttackLayer7SummaryIPVersionParamsHTTPMethodRpcInData AttackLayer7SummaryIPVersionParamsHTTPMethod = "RPC_IN_DATA"` - `const AttackLayer7SummaryIPVersionParamsHTTPMethodJson AttackLayer7SummaryIPVersionParamsHTTPMethod = "JSON"` - `const AttackLayer7SummaryIPVersionParamsHTTPMethodCook AttackLayer7SummaryIPVersionParamsHTTPMethod = "COOK"` - `const AttackLayer7SummaryIPVersionParamsHTTPMethodTrack AttackLayer7SummaryIPVersionParamsHTTPMethod = "TRACK"` - `HTTPVersion param.Field[[]AttackLayer7SummaryIPVersionParamsHTTPVersion]` Filters results by HTTP version. - `const AttackLayer7SummaryIPVersionParamsHTTPVersionHttPv1 AttackLayer7SummaryIPVersionParamsHTTPVersion = "HTTPv1"` - `const AttackLayer7SummaryIPVersionParamsHTTPVersionHttPv2 AttackLayer7SummaryIPVersionParamsHTTPVersion = "HTTPv2"` - `const AttackLayer7SummaryIPVersionParamsHTTPVersionHttPv3 AttackLayer7SummaryIPVersionParamsHTTPVersion = "HTTPv3"` - `Location param.Field[[]string]` 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. - `MitigationProduct param.Field[[]AttackLayer7SummaryIPVersionParamsMitigationProduct]` Filters the results by layer 7 mitigation product. - `const AttackLayer7SummaryIPVersionParamsMitigationProductDDoS AttackLayer7SummaryIPVersionParamsMitigationProduct = "DDOS"` - `const AttackLayer7SummaryIPVersionParamsMitigationProductWAF AttackLayer7SummaryIPVersionParamsMitigationProduct = "WAF"` - `const AttackLayer7SummaryIPVersionParamsMitigationProductBotManagement AttackLayer7SummaryIPVersionParamsMitigationProduct = "BOT_MANAGEMENT"` - `const AttackLayer7SummaryIPVersionParamsMitigationProductAccessRules AttackLayer7SummaryIPVersionParamsMitigationProduct = "ACCESS_RULES"` - `const AttackLayer7SummaryIPVersionParamsMitigationProductIPReputation AttackLayer7SummaryIPVersionParamsMitigationProduct = "IP_REPUTATION"` - `const AttackLayer7SummaryIPVersionParamsMitigationProductAPIShield AttackLayer7SummaryIPVersionParamsMitigationProduct = "API_SHIELD"` - `const AttackLayer7SummaryIPVersionParamsMitigationProductDataLossPrevention AttackLayer7SummaryIPVersionParamsMitigationProduct = "DATA_LOSS_PREVENTION"` - `Name param.Field[[]string]` Array of names used to label the series in the response. ### Returns - `type AttackLayer7SummaryIPVersionResponse struct{…}` - `Meta AttackLayer7SummaryIPVersionResponseMeta` Metadata for the results. - `ConfidenceInfo AttackLayer7SummaryIPVersionResponseMetaConfidenceInfo` - `Annotations []AttackLayer7SummaryIPVersionResponseMetaConfidenceInfoAnnotation` - `DataSource AttackLayer7SummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSource` Data source for annotations. - `const AttackLayer7SummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceAll AttackLayer7SummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "ALL"` - `const AttackLayer7SummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceAIBots AttackLayer7SummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "AI_BOTS"` - `const AttackLayer7SummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway AttackLayer7SummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "AI_GATEWAY"` - `const AttackLayer7SummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceBGP AttackLayer7SummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "BGP"` - `const AttackLayer7SummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceBots AttackLayer7SummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "BOTS"` - `const AttackLayer7SummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly AttackLayer7SummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "CONNECTION_ANOMALY"` - `const AttackLayer7SummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceCT AttackLayer7SummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "CT"` - `const AttackLayer7SummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceDNS AttackLayer7SummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "DNS"` - `const AttackLayer7SummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude AttackLayer7SummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_MAGNITUDE"` - `const AttackLayer7SummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112 AttackLayer7SummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_AS112"` - `const AttackLayer7SummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceDos AttackLayer7SummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "DOS"` - `const AttackLayer7SummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting AttackLayer7SummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_ROUTING"` - `const AttackLayer7SummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity AttackLayer7SummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_SECURITY"` - `const AttackLayer7SummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceFw AttackLayer7SummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "FW"` - `const AttackLayer7SummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceFwPg AttackLayer7SummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "FW_PG"` - `const AttackLayer7SummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceHTTP AttackLayer7SummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP"` - `const AttackLayer7SummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl AttackLayer7SummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CONTROL"` - `const AttackLayer7SummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer AttackLayer7SummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CRAWLER_REFERER"` - `const AttackLayer7SummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins AttackLayer7SummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_ORIGINS"` - `const AttackLayer7SummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceIQI AttackLayer7SummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "IQI"` - `const AttackLayer7SummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials AttackLayer7SummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "LEAKED_CREDENTIALS"` - `const AttackLayer7SummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceNet AttackLayer7SummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "NET"` - `const AttackLayer7SummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT AttackLayer7SummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "ROBOTS_TXT"` - `const AttackLayer7SummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceSpeed AttackLayer7SummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "SPEED"` - `const AttackLayer7SummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI AttackLayer7SummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "WORKERS_AI"` - `Description string` - `EndDate Time` - `EventType AttackLayer7SummaryIPVersionResponseMetaConfidenceInfoAnnotationsEventType` Event type for annotations. - `const AttackLayer7SummaryIPVersionResponseMetaConfidenceInfoAnnotationsEventTypeEvent AttackLayer7SummaryIPVersionResponseMetaConfidenceInfoAnnotationsEventType = "EVENT"` - `const AttackLayer7SummaryIPVersionResponseMetaConfidenceInfoAnnotationsEventTypeGeneral AttackLayer7SummaryIPVersionResponseMetaConfidenceInfoAnnotationsEventType = "GENERAL"` - `const AttackLayer7SummaryIPVersionResponseMetaConfidenceInfoAnnotationsEventTypeOutage AttackLayer7SummaryIPVersionResponseMetaConfidenceInfoAnnotationsEventType = "OUTAGE"` - `const AttackLayer7SummaryIPVersionResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection AttackLayer7SummaryIPVersionResponseMetaConfidenceInfoAnnotationsEventType = "PARTIAL_PROJECTION"` - `const AttackLayer7SummaryIPVersionResponseMetaConfidenceInfoAnnotationsEventTypePipeline AttackLayer7SummaryIPVersionResponseMetaConfidenceInfoAnnotationsEventType = "PIPELINE"` - `const AttackLayer7SummaryIPVersionResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly AttackLayer7SummaryIPVersionResponseMetaConfidenceInfoAnnotationsEventType = "TRAFFIC_ANOMALY"` - `IsInstantaneous bool` Whether event is a single point in time or a time range. - `LinkedURL string` - `StartDate Time` - `Level int64` Provides an indication of how much confidence Cloudflare has in the data. - `DateRange []AttackLayer7SummaryIPVersionResponseMetaDateRange` - `EndTime Time` Adjusted end of date range. - `StartTime Time` Adjusted start of date range. - `LastUpdated Time` Timestamp of the last dataset update. - `Normalization AttackLayer7SummaryIPVersionResponseMetaNormalization` Normalization method applied to the results. Refer to [Normalization methods](https://developers.cloudflare.com/radar/concepts/normalization/). - `const AttackLayer7SummaryIPVersionResponseMetaNormalizationPercentage AttackLayer7SummaryIPVersionResponseMetaNormalization = "PERCENTAGE"` - `const AttackLayer7SummaryIPVersionResponseMetaNormalizationMin0Max AttackLayer7SummaryIPVersionResponseMetaNormalization = "MIN0_MAX"` - `const AttackLayer7SummaryIPVersionResponseMetaNormalizationMinMax AttackLayer7SummaryIPVersionResponseMetaNormalization = "MIN_MAX"` - `const AttackLayer7SummaryIPVersionResponseMetaNormalizationRawValues AttackLayer7SummaryIPVersionResponseMetaNormalization = "RAW_VALUES"` - `const AttackLayer7SummaryIPVersionResponseMetaNormalizationPercentageChange AttackLayer7SummaryIPVersionResponseMetaNormalization = "PERCENTAGE_CHANGE"` - `const AttackLayer7SummaryIPVersionResponseMetaNormalizationRollingAverage AttackLayer7SummaryIPVersionResponseMetaNormalization = "ROLLING_AVERAGE"` - `const AttackLayer7SummaryIPVersionResponseMetaNormalizationOverlappedPercentage AttackLayer7SummaryIPVersionResponseMetaNormalization = "OVERLAPPED_PERCENTAGE"` - `const AttackLayer7SummaryIPVersionResponseMetaNormalizationRatio AttackLayer7SummaryIPVersionResponseMetaNormalization = "RATIO"` - `Units []AttackLayer7SummaryIPVersionResponseMetaUnit` Measurement units for the results. - `Name string` - `Value string` - `Summary0 AttackLayer7SummaryIPVersionResponseSummary0` - `IPv4 string` - `IPv6 string` ### Example ```go 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.Layer7.Summary.IPVersion(context.TODO(), radar.AttackLayer7SummaryIPVersionParams{ }) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", response.Meta) } ``` #### Response ```json { "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": { "IPv4": "99.935733", "IPv6": "0.064267" } }, "success": true } ``` ## Get layer 7 attacks by HTTP method summary `client.Radar.Attacks.Layer7.Summary.HTTPMethod(ctx, query) (*AttackLayer7SummaryHTTPMethodResponse, error)` **get** `/radar/attacks/layer7/summary/http_method` Retrieves the distribution of layer 7 attacks by HTTP method. ### Parameters - `query AttackLayer7SummaryHTTPMethodParams` - `ASN param.Field[[]string]` Filters results by Autonomous System. Specify one or more Autonomous System Numbers (ASNs) as a comma-separated list. Prefix with `-` to exclude ASNs from results. For example, `-174, 3356` excludes results from AS174, but includes results from AS3356. - `Continent param.Field[[]string]` 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]` End of the date range (inclusive). - `DateRange param.Field[[]string]` 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]` Start of the date range. - `Format param.Field[AttackLayer7SummaryHTTPMethodParamsFormat]` Format in which results will be returned. - `const AttackLayer7SummaryHTTPMethodParamsFormatJson AttackLayer7SummaryHTTPMethodParamsFormat = "JSON"` - `const AttackLayer7SummaryHTTPMethodParamsFormatCsv AttackLayer7SummaryHTTPMethodParamsFormat = "CSV"` - `HTTPVersion param.Field[[]AttackLayer7SummaryHTTPMethodParamsHTTPVersion]` Filters results by HTTP version. - `const AttackLayer7SummaryHTTPMethodParamsHTTPVersionHttPv1 AttackLayer7SummaryHTTPMethodParamsHTTPVersion = "HTTPv1"` - `const AttackLayer7SummaryHTTPMethodParamsHTTPVersionHttPv2 AttackLayer7SummaryHTTPMethodParamsHTTPVersion = "HTTPv2"` - `const AttackLayer7SummaryHTTPMethodParamsHTTPVersionHttPv3 AttackLayer7SummaryHTTPMethodParamsHTTPVersion = "HTTPv3"` - `IPVersion param.Field[[]AttackLayer7SummaryHTTPMethodParamsIPVersion]` Filters results by IP version (Ipv4 vs. IPv6). - `const AttackLayer7SummaryHTTPMethodParamsIPVersionIPv4 AttackLayer7SummaryHTTPMethodParamsIPVersion = "IPv4"` - `const AttackLayer7SummaryHTTPMethodParamsIPVersionIPv6 AttackLayer7SummaryHTTPMethodParamsIPVersion = "IPv6"` - `LimitPerGroup param.Field[int64]` 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]` 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. - `MitigationProduct param.Field[[]AttackLayer7SummaryHTTPMethodParamsMitigationProduct]` Filters the results by layer 7 mitigation product. - `const AttackLayer7SummaryHTTPMethodParamsMitigationProductDDoS AttackLayer7SummaryHTTPMethodParamsMitigationProduct = "DDOS"` - `const AttackLayer7SummaryHTTPMethodParamsMitigationProductWAF AttackLayer7SummaryHTTPMethodParamsMitigationProduct = "WAF"` - `const AttackLayer7SummaryHTTPMethodParamsMitigationProductBotManagement AttackLayer7SummaryHTTPMethodParamsMitigationProduct = "BOT_MANAGEMENT"` - `const AttackLayer7SummaryHTTPMethodParamsMitigationProductAccessRules AttackLayer7SummaryHTTPMethodParamsMitigationProduct = "ACCESS_RULES"` - `const AttackLayer7SummaryHTTPMethodParamsMitigationProductIPReputation AttackLayer7SummaryHTTPMethodParamsMitigationProduct = "IP_REPUTATION"` - `const AttackLayer7SummaryHTTPMethodParamsMitigationProductAPIShield AttackLayer7SummaryHTTPMethodParamsMitigationProduct = "API_SHIELD"` - `const AttackLayer7SummaryHTTPMethodParamsMitigationProductDataLossPrevention AttackLayer7SummaryHTTPMethodParamsMitigationProduct = "DATA_LOSS_PREVENTION"` - `Name param.Field[[]string]` Array of names used to label the series in the response. ### Returns - `type AttackLayer7SummaryHTTPMethodResponse struct{…}` - `Meta AttackLayer7SummaryHTTPMethodResponseMeta` Metadata for the results. - `ConfidenceInfo AttackLayer7SummaryHTTPMethodResponseMetaConfidenceInfo` - `Annotations []AttackLayer7SummaryHTTPMethodResponseMetaConfidenceInfoAnnotation` - `DataSource AttackLayer7SummaryHTTPMethodResponseMetaConfidenceInfoAnnotationsDataSource` Data source for annotations. - `const AttackLayer7SummaryHTTPMethodResponseMetaConfidenceInfoAnnotationsDataSourceAll AttackLayer7SummaryHTTPMethodResponseMetaConfidenceInfoAnnotationsDataSource = "ALL"` - `const AttackLayer7SummaryHTTPMethodResponseMetaConfidenceInfoAnnotationsDataSourceAIBots AttackLayer7SummaryHTTPMethodResponseMetaConfidenceInfoAnnotationsDataSource = "AI_BOTS"` - `const AttackLayer7SummaryHTTPMethodResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway AttackLayer7SummaryHTTPMethodResponseMetaConfidenceInfoAnnotationsDataSource = "AI_GATEWAY"` - `const AttackLayer7SummaryHTTPMethodResponseMetaConfidenceInfoAnnotationsDataSourceBGP AttackLayer7SummaryHTTPMethodResponseMetaConfidenceInfoAnnotationsDataSource = "BGP"` - `const AttackLayer7SummaryHTTPMethodResponseMetaConfidenceInfoAnnotationsDataSourceBots AttackLayer7SummaryHTTPMethodResponseMetaConfidenceInfoAnnotationsDataSource = "BOTS"` - `const AttackLayer7SummaryHTTPMethodResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly AttackLayer7SummaryHTTPMethodResponseMetaConfidenceInfoAnnotationsDataSource = "CONNECTION_ANOMALY"` - `const AttackLayer7SummaryHTTPMethodResponseMetaConfidenceInfoAnnotationsDataSourceCT AttackLayer7SummaryHTTPMethodResponseMetaConfidenceInfoAnnotationsDataSource = "CT"` - `const AttackLayer7SummaryHTTPMethodResponseMetaConfidenceInfoAnnotationsDataSourceDNS AttackLayer7SummaryHTTPMethodResponseMetaConfidenceInfoAnnotationsDataSource = "DNS"` - `const AttackLayer7SummaryHTTPMethodResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude AttackLayer7SummaryHTTPMethodResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_MAGNITUDE"` - `const AttackLayer7SummaryHTTPMethodResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112 AttackLayer7SummaryHTTPMethodResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_AS112"` - `const AttackLayer7SummaryHTTPMethodResponseMetaConfidenceInfoAnnotationsDataSourceDos AttackLayer7SummaryHTTPMethodResponseMetaConfidenceInfoAnnotationsDataSource = "DOS"` - `const AttackLayer7SummaryHTTPMethodResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting AttackLayer7SummaryHTTPMethodResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_ROUTING"` - `const AttackLayer7SummaryHTTPMethodResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity AttackLayer7SummaryHTTPMethodResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_SECURITY"` - `const AttackLayer7SummaryHTTPMethodResponseMetaConfidenceInfoAnnotationsDataSourceFw AttackLayer7SummaryHTTPMethodResponseMetaConfidenceInfoAnnotationsDataSource = "FW"` - `const AttackLayer7SummaryHTTPMethodResponseMetaConfidenceInfoAnnotationsDataSourceFwPg AttackLayer7SummaryHTTPMethodResponseMetaConfidenceInfoAnnotationsDataSource = "FW_PG"` - `const AttackLayer7SummaryHTTPMethodResponseMetaConfidenceInfoAnnotationsDataSourceHTTP AttackLayer7SummaryHTTPMethodResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP"` - `const AttackLayer7SummaryHTTPMethodResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl AttackLayer7SummaryHTTPMethodResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CONTROL"` - `const AttackLayer7SummaryHTTPMethodResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer AttackLayer7SummaryHTTPMethodResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CRAWLER_REFERER"` - `const AttackLayer7SummaryHTTPMethodResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins AttackLayer7SummaryHTTPMethodResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_ORIGINS"` - `const AttackLayer7SummaryHTTPMethodResponseMetaConfidenceInfoAnnotationsDataSourceIQI AttackLayer7SummaryHTTPMethodResponseMetaConfidenceInfoAnnotationsDataSource = "IQI"` - `const AttackLayer7SummaryHTTPMethodResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials AttackLayer7SummaryHTTPMethodResponseMetaConfidenceInfoAnnotationsDataSource = "LEAKED_CREDENTIALS"` - `const AttackLayer7SummaryHTTPMethodResponseMetaConfidenceInfoAnnotationsDataSourceNet AttackLayer7SummaryHTTPMethodResponseMetaConfidenceInfoAnnotationsDataSource = "NET"` - `const AttackLayer7SummaryHTTPMethodResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT AttackLayer7SummaryHTTPMethodResponseMetaConfidenceInfoAnnotationsDataSource = "ROBOTS_TXT"` - `const AttackLayer7SummaryHTTPMethodResponseMetaConfidenceInfoAnnotationsDataSourceSpeed AttackLayer7SummaryHTTPMethodResponseMetaConfidenceInfoAnnotationsDataSource = "SPEED"` - `const AttackLayer7SummaryHTTPMethodResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI AttackLayer7SummaryHTTPMethodResponseMetaConfidenceInfoAnnotationsDataSource = "WORKERS_AI"` - `Description string` - `EndDate Time` - `EventType AttackLayer7SummaryHTTPMethodResponseMetaConfidenceInfoAnnotationsEventType` Event type for annotations. - `const AttackLayer7SummaryHTTPMethodResponseMetaConfidenceInfoAnnotationsEventTypeEvent AttackLayer7SummaryHTTPMethodResponseMetaConfidenceInfoAnnotationsEventType = "EVENT"` - `const AttackLayer7SummaryHTTPMethodResponseMetaConfidenceInfoAnnotationsEventTypeGeneral AttackLayer7SummaryHTTPMethodResponseMetaConfidenceInfoAnnotationsEventType = "GENERAL"` - `const AttackLayer7SummaryHTTPMethodResponseMetaConfidenceInfoAnnotationsEventTypeOutage AttackLayer7SummaryHTTPMethodResponseMetaConfidenceInfoAnnotationsEventType = "OUTAGE"` - `const AttackLayer7SummaryHTTPMethodResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection AttackLayer7SummaryHTTPMethodResponseMetaConfidenceInfoAnnotationsEventType = "PARTIAL_PROJECTION"` - `const AttackLayer7SummaryHTTPMethodResponseMetaConfidenceInfoAnnotationsEventTypePipeline AttackLayer7SummaryHTTPMethodResponseMetaConfidenceInfoAnnotationsEventType = "PIPELINE"` - `const AttackLayer7SummaryHTTPMethodResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly AttackLayer7SummaryHTTPMethodResponseMetaConfidenceInfoAnnotationsEventType = "TRAFFIC_ANOMALY"` - `IsInstantaneous bool` Whether event is a single point in time or a time range. - `LinkedURL string` - `StartDate Time` - `Level int64` Provides an indication of how much confidence Cloudflare has in the data. - `DateRange []AttackLayer7SummaryHTTPMethodResponseMetaDateRange` - `EndTime Time` Adjusted end of date range. - `StartTime Time` Adjusted start of date range. - `LastUpdated Time` Timestamp of the last dataset update. - `Normalization AttackLayer7SummaryHTTPMethodResponseMetaNormalization` Normalization method applied to the results. Refer to [Normalization methods](https://developers.cloudflare.com/radar/concepts/normalization/). - `const AttackLayer7SummaryHTTPMethodResponseMetaNormalizationPercentage AttackLayer7SummaryHTTPMethodResponseMetaNormalization = "PERCENTAGE"` - `const AttackLayer7SummaryHTTPMethodResponseMetaNormalizationMin0Max AttackLayer7SummaryHTTPMethodResponseMetaNormalization = "MIN0_MAX"` - `const AttackLayer7SummaryHTTPMethodResponseMetaNormalizationMinMax AttackLayer7SummaryHTTPMethodResponseMetaNormalization = "MIN_MAX"` - `const AttackLayer7SummaryHTTPMethodResponseMetaNormalizationRawValues AttackLayer7SummaryHTTPMethodResponseMetaNormalization = "RAW_VALUES"` - `const AttackLayer7SummaryHTTPMethodResponseMetaNormalizationPercentageChange AttackLayer7SummaryHTTPMethodResponseMetaNormalization = "PERCENTAGE_CHANGE"` - `const AttackLayer7SummaryHTTPMethodResponseMetaNormalizationRollingAverage AttackLayer7SummaryHTTPMethodResponseMetaNormalization = "ROLLING_AVERAGE"` - `const AttackLayer7SummaryHTTPMethodResponseMetaNormalizationOverlappedPercentage AttackLayer7SummaryHTTPMethodResponseMetaNormalization = "OVERLAPPED_PERCENTAGE"` - `const AttackLayer7SummaryHTTPMethodResponseMetaNormalizationRatio AttackLayer7SummaryHTTPMethodResponseMetaNormalization = "RATIO"` - `Units []AttackLayer7SummaryHTTPMethodResponseMetaUnit` Measurement units for the results. - `Name string` - `Value string` - `Summary0 map[string, string]` ### Example ```go 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.Layer7.Summary.HTTPMethod(context.TODO(), radar.AttackLayer7SummaryHTTPMethodParams{ }) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", response.Meta) } ``` #### Response ```json { "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": { "GET": "99.100257", "POST": "0.899743" } }, "success": true } ``` ## Get layer 7 attacks by HTTP version summary `client.Radar.Attacks.Layer7.Summary.HTTPVersion(ctx, query) (*AttackLayer7SummaryHTTPVersionResponse, error)` **get** `/radar/attacks/layer7/summary/http_version` Retrieves the distribution of layer 7 attacks by HTTP version. ### Parameters - `query AttackLayer7SummaryHTTPVersionParams` - `ASN param.Field[[]string]` Filters results by Autonomous System. Specify one or more Autonomous System Numbers (ASNs) as a comma-separated list. Prefix with `-` to exclude ASNs from results. For example, `-174, 3356` excludes results from AS174, but includes results from AS3356. - `Continent param.Field[[]string]` 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]` End of the date range (inclusive). - `DateRange param.Field[[]string]` 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]` Start of the date range. - `Format param.Field[AttackLayer7SummaryHTTPVersionParamsFormat]` Format in which results will be returned. - `const AttackLayer7SummaryHTTPVersionParamsFormatJson AttackLayer7SummaryHTTPVersionParamsFormat = "JSON"` - `const AttackLayer7SummaryHTTPVersionParamsFormatCsv AttackLayer7SummaryHTTPVersionParamsFormat = "CSV"` - `HTTPMethod param.Field[[]AttackLayer7SummaryHTTPVersionParamsHTTPMethod]` Filters results by HTTP method. - `const AttackLayer7SummaryHTTPVersionParamsHTTPMethodGet AttackLayer7SummaryHTTPVersionParamsHTTPMethod = "GET"` - `const AttackLayer7SummaryHTTPVersionParamsHTTPMethodPost AttackLayer7SummaryHTTPVersionParamsHTTPMethod = "POST"` - `const AttackLayer7SummaryHTTPVersionParamsHTTPMethodDelete AttackLayer7SummaryHTTPVersionParamsHTTPMethod = "DELETE"` - `const AttackLayer7SummaryHTTPVersionParamsHTTPMethodPut AttackLayer7SummaryHTTPVersionParamsHTTPMethod = "PUT"` - `const AttackLayer7SummaryHTTPVersionParamsHTTPMethodHead AttackLayer7SummaryHTTPVersionParamsHTTPMethod = "HEAD"` - `const AttackLayer7SummaryHTTPVersionParamsHTTPMethodPurge AttackLayer7SummaryHTTPVersionParamsHTTPMethod = "PURGE"` - `const AttackLayer7SummaryHTTPVersionParamsHTTPMethodOptions AttackLayer7SummaryHTTPVersionParamsHTTPMethod = "OPTIONS"` - `const AttackLayer7SummaryHTTPVersionParamsHTTPMethodPropfind AttackLayer7SummaryHTTPVersionParamsHTTPMethod = "PROPFIND"` - `const AttackLayer7SummaryHTTPVersionParamsHTTPMethodMkcol AttackLayer7SummaryHTTPVersionParamsHTTPMethod = "MKCOL"` - `const AttackLayer7SummaryHTTPVersionParamsHTTPMethodPatch AttackLayer7SummaryHTTPVersionParamsHTTPMethod = "PATCH"` - `const AttackLayer7SummaryHTTPVersionParamsHTTPMethodACL AttackLayer7SummaryHTTPVersionParamsHTTPMethod = "ACL"` - `const AttackLayer7SummaryHTTPVersionParamsHTTPMethodBcopy AttackLayer7SummaryHTTPVersionParamsHTTPMethod = "BCOPY"` - `const AttackLayer7SummaryHTTPVersionParamsHTTPMethodBdelete AttackLayer7SummaryHTTPVersionParamsHTTPMethod = "BDELETE"` - `const AttackLayer7SummaryHTTPVersionParamsHTTPMethodBmove AttackLayer7SummaryHTTPVersionParamsHTTPMethod = "BMOVE"` - `const AttackLayer7SummaryHTTPVersionParamsHTTPMethodBpropfind AttackLayer7SummaryHTTPVersionParamsHTTPMethod = "BPROPFIND"` - `const AttackLayer7SummaryHTTPVersionParamsHTTPMethodBproppatch AttackLayer7SummaryHTTPVersionParamsHTTPMethod = "BPROPPATCH"` - `const AttackLayer7SummaryHTTPVersionParamsHTTPMethodCheckin AttackLayer7SummaryHTTPVersionParamsHTTPMethod = "CHECKIN"` - `const AttackLayer7SummaryHTTPVersionParamsHTTPMethodCheckout AttackLayer7SummaryHTTPVersionParamsHTTPMethod = "CHECKOUT"` - `const AttackLayer7SummaryHTTPVersionParamsHTTPMethodConnect AttackLayer7SummaryHTTPVersionParamsHTTPMethod = "CONNECT"` - `const AttackLayer7SummaryHTTPVersionParamsHTTPMethodCopy AttackLayer7SummaryHTTPVersionParamsHTTPMethod = "COPY"` - `const AttackLayer7SummaryHTTPVersionParamsHTTPMethodLabel AttackLayer7SummaryHTTPVersionParamsHTTPMethod = "LABEL"` - `const AttackLayer7SummaryHTTPVersionParamsHTTPMethodLock AttackLayer7SummaryHTTPVersionParamsHTTPMethod = "LOCK"` - `const AttackLayer7SummaryHTTPVersionParamsHTTPMethodMerge AttackLayer7SummaryHTTPVersionParamsHTTPMethod = "MERGE"` - `const AttackLayer7SummaryHTTPVersionParamsHTTPMethodMkactivity AttackLayer7SummaryHTTPVersionParamsHTTPMethod = "MKACTIVITY"` - `const AttackLayer7SummaryHTTPVersionParamsHTTPMethodMkworkspace AttackLayer7SummaryHTTPVersionParamsHTTPMethod = "MKWORKSPACE"` - `const AttackLayer7SummaryHTTPVersionParamsHTTPMethodMove AttackLayer7SummaryHTTPVersionParamsHTTPMethod = "MOVE"` - `const AttackLayer7SummaryHTTPVersionParamsHTTPMethodNotify AttackLayer7SummaryHTTPVersionParamsHTTPMethod = "NOTIFY"` - `const AttackLayer7SummaryHTTPVersionParamsHTTPMethodOrderpatch AttackLayer7SummaryHTTPVersionParamsHTTPMethod = "ORDERPATCH"` - `const AttackLayer7SummaryHTTPVersionParamsHTTPMethodPoll AttackLayer7SummaryHTTPVersionParamsHTTPMethod = "POLL"` - `const AttackLayer7SummaryHTTPVersionParamsHTTPMethodProppatch AttackLayer7SummaryHTTPVersionParamsHTTPMethod = "PROPPATCH"` - `const AttackLayer7SummaryHTTPVersionParamsHTTPMethodReport AttackLayer7SummaryHTTPVersionParamsHTTPMethod = "REPORT"` - `const AttackLayer7SummaryHTTPVersionParamsHTTPMethodSearch AttackLayer7SummaryHTTPVersionParamsHTTPMethod = "SEARCH"` - `const AttackLayer7SummaryHTTPVersionParamsHTTPMethodSubscribe AttackLayer7SummaryHTTPVersionParamsHTTPMethod = "SUBSCRIBE"` - `const AttackLayer7SummaryHTTPVersionParamsHTTPMethodTrace AttackLayer7SummaryHTTPVersionParamsHTTPMethod = "TRACE"` - `const AttackLayer7SummaryHTTPVersionParamsHTTPMethodUncheckout AttackLayer7SummaryHTTPVersionParamsHTTPMethod = "UNCHECKOUT"` - `const AttackLayer7SummaryHTTPVersionParamsHTTPMethodUnlock AttackLayer7SummaryHTTPVersionParamsHTTPMethod = "UNLOCK"` - `const AttackLayer7SummaryHTTPVersionParamsHTTPMethodUnsubscribe AttackLayer7SummaryHTTPVersionParamsHTTPMethod = "UNSUBSCRIBE"` - `const AttackLayer7SummaryHTTPVersionParamsHTTPMethodUpdate AttackLayer7SummaryHTTPVersionParamsHTTPMethod = "UPDATE"` - `const AttackLayer7SummaryHTTPVersionParamsHTTPMethodVersioncontrol AttackLayer7SummaryHTTPVersionParamsHTTPMethod = "VERSIONCONTROL"` - `const AttackLayer7SummaryHTTPVersionParamsHTTPMethodBaselinecontrol AttackLayer7SummaryHTTPVersionParamsHTTPMethod = "BASELINECONTROL"` - `const AttackLayer7SummaryHTTPVersionParamsHTTPMethodXmsenumatts AttackLayer7SummaryHTTPVersionParamsHTTPMethod = "XMSENUMATTS"` - `const AttackLayer7SummaryHTTPVersionParamsHTTPMethodRpcOutData AttackLayer7SummaryHTTPVersionParamsHTTPMethod = "RPC_OUT_DATA"` - `const AttackLayer7SummaryHTTPVersionParamsHTTPMethodRpcInData AttackLayer7SummaryHTTPVersionParamsHTTPMethod = "RPC_IN_DATA"` - `const AttackLayer7SummaryHTTPVersionParamsHTTPMethodJson AttackLayer7SummaryHTTPVersionParamsHTTPMethod = "JSON"` - `const AttackLayer7SummaryHTTPVersionParamsHTTPMethodCook AttackLayer7SummaryHTTPVersionParamsHTTPMethod = "COOK"` - `const AttackLayer7SummaryHTTPVersionParamsHTTPMethodTrack AttackLayer7SummaryHTTPVersionParamsHTTPMethod = "TRACK"` - `IPVersion param.Field[[]AttackLayer7SummaryHTTPVersionParamsIPVersion]` Filters results by IP version (Ipv4 vs. IPv6). - `const AttackLayer7SummaryHTTPVersionParamsIPVersionIPv4 AttackLayer7SummaryHTTPVersionParamsIPVersion = "IPv4"` - `const AttackLayer7SummaryHTTPVersionParamsIPVersionIPv6 AttackLayer7SummaryHTTPVersionParamsIPVersion = "IPv6"` - `Location param.Field[[]string]` 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. - `MitigationProduct param.Field[[]AttackLayer7SummaryHTTPVersionParamsMitigationProduct]` Filters the results by layer 7 mitigation product. - `const AttackLayer7SummaryHTTPVersionParamsMitigationProductDDoS AttackLayer7SummaryHTTPVersionParamsMitigationProduct = "DDOS"` - `const AttackLayer7SummaryHTTPVersionParamsMitigationProductWAF AttackLayer7SummaryHTTPVersionParamsMitigationProduct = "WAF"` - `const AttackLayer7SummaryHTTPVersionParamsMitigationProductBotManagement AttackLayer7SummaryHTTPVersionParamsMitigationProduct = "BOT_MANAGEMENT"` - `const AttackLayer7SummaryHTTPVersionParamsMitigationProductAccessRules AttackLayer7SummaryHTTPVersionParamsMitigationProduct = "ACCESS_RULES"` - `const AttackLayer7SummaryHTTPVersionParamsMitigationProductIPReputation AttackLayer7SummaryHTTPVersionParamsMitigationProduct = "IP_REPUTATION"` - `const AttackLayer7SummaryHTTPVersionParamsMitigationProductAPIShield AttackLayer7SummaryHTTPVersionParamsMitigationProduct = "API_SHIELD"` - `const AttackLayer7SummaryHTTPVersionParamsMitigationProductDataLossPrevention AttackLayer7SummaryHTTPVersionParamsMitigationProduct = "DATA_LOSS_PREVENTION"` - `Name param.Field[[]string]` Array of names used to label the series in the response. ### Returns - `type AttackLayer7SummaryHTTPVersionResponse struct{…}` - `Meta AttackLayer7SummaryHTTPVersionResponseMeta` Metadata for the results. - `ConfidenceInfo AttackLayer7SummaryHTTPVersionResponseMetaConfidenceInfo` - `Annotations []AttackLayer7SummaryHTTPVersionResponseMetaConfidenceInfoAnnotation` - `DataSource AttackLayer7SummaryHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSource` Data source for annotations. - `const AttackLayer7SummaryHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSourceAll AttackLayer7SummaryHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "ALL"` - `const AttackLayer7SummaryHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSourceAIBots AttackLayer7SummaryHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "AI_BOTS"` - `const AttackLayer7SummaryHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway AttackLayer7SummaryHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "AI_GATEWAY"` - `const AttackLayer7SummaryHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSourceBGP AttackLayer7SummaryHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "BGP"` - `const AttackLayer7SummaryHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSourceBots AttackLayer7SummaryHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "BOTS"` - `const AttackLayer7SummaryHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly AttackLayer7SummaryHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "CONNECTION_ANOMALY"` - `const AttackLayer7SummaryHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSourceCT AttackLayer7SummaryHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "CT"` - `const AttackLayer7SummaryHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSourceDNS AttackLayer7SummaryHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "DNS"` - `const AttackLayer7SummaryHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude AttackLayer7SummaryHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_MAGNITUDE"` - `const AttackLayer7SummaryHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112 AttackLayer7SummaryHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_AS112"` - `const AttackLayer7SummaryHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSourceDos AttackLayer7SummaryHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "DOS"` - `const AttackLayer7SummaryHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting AttackLayer7SummaryHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_ROUTING"` - `const AttackLayer7SummaryHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity AttackLayer7SummaryHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_SECURITY"` - `const AttackLayer7SummaryHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSourceFw AttackLayer7SummaryHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "FW"` - `const AttackLayer7SummaryHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSourceFwPg AttackLayer7SummaryHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "FW_PG"` - `const AttackLayer7SummaryHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSourceHTTP AttackLayer7SummaryHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP"` - `const AttackLayer7SummaryHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl AttackLayer7SummaryHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CONTROL"` - `const AttackLayer7SummaryHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer AttackLayer7SummaryHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CRAWLER_REFERER"` - `const AttackLayer7SummaryHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins AttackLayer7SummaryHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_ORIGINS"` - `const AttackLayer7SummaryHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSourceIQI AttackLayer7SummaryHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "IQI"` - `const AttackLayer7SummaryHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials AttackLayer7SummaryHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "LEAKED_CREDENTIALS"` - `const AttackLayer7SummaryHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSourceNet AttackLayer7SummaryHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "NET"` - `const AttackLayer7SummaryHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT AttackLayer7SummaryHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "ROBOTS_TXT"` - `const AttackLayer7SummaryHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSourceSpeed AttackLayer7SummaryHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "SPEED"` - `const AttackLayer7SummaryHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI AttackLayer7SummaryHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "WORKERS_AI"` - `Description string` - `EndDate Time` - `EventType AttackLayer7SummaryHTTPVersionResponseMetaConfidenceInfoAnnotationsEventType` Event type for annotations. - `const AttackLayer7SummaryHTTPVersionResponseMetaConfidenceInfoAnnotationsEventTypeEvent AttackLayer7SummaryHTTPVersionResponseMetaConfidenceInfoAnnotationsEventType = "EVENT"` - `const AttackLayer7SummaryHTTPVersionResponseMetaConfidenceInfoAnnotationsEventTypeGeneral AttackLayer7SummaryHTTPVersionResponseMetaConfidenceInfoAnnotationsEventType = "GENERAL"` - `const AttackLayer7SummaryHTTPVersionResponseMetaConfidenceInfoAnnotationsEventTypeOutage AttackLayer7SummaryHTTPVersionResponseMetaConfidenceInfoAnnotationsEventType = "OUTAGE"` - `const AttackLayer7SummaryHTTPVersionResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection AttackLayer7SummaryHTTPVersionResponseMetaConfidenceInfoAnnotationsEventType = "PARTIAL_PROJECTION"` - `const AttackLayer7SummaryHTTPVersionResponseMetaConfidenceInfoAnnotationsEventTypePipeline AttackLayer7SummaryHTTPVersionResponseMetaConfidenceInfoAnnotationsEventType = "PIPELINE"` - `const AttackLayer7SummaryHTTPVersionResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly AttackLayer7SummaryHTTPVersionResponseMetaConfidenceInfoAnnotationsEventType = "TRAFFIC_ANOMALY"` - `IsInstantaneous bool` Whether event is a single point in time or a time range. - `LinkedURL string` - `StartDate Time` - `Level int64` Provides an indication of how much confidence Cloudflare has in the data. - `DateRange []AttackLayer7SummaryHTTPVersionResponseMetaDateRange` - `EndTime Time` Adjusted end of date range. - `StartTime Time` Adjusted start of date range. - `LastUpdated Time` Timestamp of the last dataset update. - `Normalization AttackLayer7SummaryHTTPVersionResponseMetaNormalization` Normalization method applied to the results. Refer to [Normalization methods](https://developers.cloudflare.com/radar/concepts/normalization/). - `const AttackLayer7SummaryHTTPVersionResponseMetaNormalizationPercentage AttackLayer7SummaryHTTPVersionResponseMetaNormalization = "PERCENTAGE"` - `const AttackLayer7SummaryHTTPVersionResponseMetaNormalizationMin0Max AttackLayer7SummaryHTTPVersionResponseMetaNormalization = "MIN0_MAX"` - `const AttackLayer7SummaryHTTPVersionResponseMetaNormalizationMinMax AttackLayer7SummaryHTTPVersionResponseMetaNormalization = "MIN_MAX"` - `const AttackLayer7SummaryHTTPVersionResponseMetaNormalizationRawValues AttackLayer7SummaryHTTPVersionResponseMetaNormalization = "RAW_VALUES"` - `const AttackLayer7SummaryHTTPVersionResponseMetaNormalizationPercentageChange AttackLayer7SummaryHTTPVersionResponseMetaNormalization = "PERCENTAGE_CHANGE"` - `const AttackLayer7SummaryHTTPVersionResponseMetaNormalizationRollingAverage AttackLayer7SummaryHTTPVersionResponseMetaNormalization = "ROLLING_AVERAGE"` - `const AttackLayer7SummaryHTTPVersionResponseMetaNormalizationOverlappedPercentage AttackLayer7SummaryHTTPVersionResponseMetaNormalization = "OVERLAPPED_PERCENTAGE"` - `const AttackLayer7SummaryHTTPVersionResponseMetaNormalizationRatio AttackLayer7SummaryHTTPVersionResponseMetaNormalization = "RATIO"` - `Units []AttackLayer7SummaryHTTPVersionResponseMetaUnit` Measurement units for the results. - `Name string` - `Value string` - `Summary0 AttackLayer7SummaryHTTPVersionResponseSummary0` - `HTTP1X string` - `HTTP2 string` - `HTTP3 string` ### Example ```go 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.Layer7.Summary.HTTPVersion(context.TODO(), radar.AttackLayer7SummaryHTTPVersionParams{ }) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", response.Meta) } ``` #### Response ```json { "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": { "HTTP/1.x": "21.722365", "HTTP/2": "77.056555", "HTTP/3": "1.22108" } }, "success": true } ``` ## Get layer 7 attacks by managed rules summary `client.Radar.Attacks.Layer7.Summary.ManagedRules(ctx, query) (*AttackLayer7SummaryManagedRulesResponse, error)` **get** `/radar/attacks/layer7/summary/managed_rules` Retrieves the distribution of layer 7 attacks by managed rules. ### Parameters - `query AttackLayer7SummaryManagedRulesParams` - `ASN param.Field[[]string]` Filters results by Autonomous System. Specify one or more Autonomous System Numbers (ASNs) as a comma-separated list. Prefix with `-` to exclude ASNs from results. For example, `-174, 3356` excludes results from AS174, but includes results from AS3356. - `Continent param.Field[[]string]` 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]` End of the date range (inclusive). - `DateRange param.Field[[]string]` 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]` Start of the date range. - `Format param.Field[AttackLayer7SummaryManagedRulesParamsFormat]` Format in which results will be returned. - `const AttackLayer7SummaryManagedRulesParamsFormatJson AttackLayer7SummaryManagedRulesParamsFormat = "JSON"` - `const AttackLayer7SummaryManagedRulesParamsFormatCsv AttackLayer7SummaryManagedRulesParamsFormat = "CSV"` - `HTTPMethod param.Field[[]AttackLayer7SummaryManagedRulesParamsHTTPMethod]` Filters results by HTTP method. - `const AttackLayer7SummaryManagedRulesParamsHTTPMethodGet AttackLayer7SummaryManagedRulesParamsHTTPMethod = "GET"` - `const AttackLayer7SummaryManagedRulesParamsHTTPMethodPost AttackLayer7SummaryManagedRulesParamsHTTPMethod = "POST"` - `const AttackLayer7SummaryManagedRulesParamsHTTPMethodDelete AttackLayer7SummaryManagedRulesParamsHTTPMethod = "DELETE"` - `const AttackLayer7SummaryManagedRulesParamsHTTPMethodPut AttackLayer7SummaryManagedRulesParamsHTTPMethod = "PUT"` - `const AttackLayer7SummaryManagedRulesParamsHTTPMethodHead AttackLayer7SummaryManagedRulesParamsHTTPMethod = "HEAD"` - `const AttackLayer7SummaryManagedRulesParamsHTTPMethodPurge AttackLayer7SummaryManagedRulesParamsHTTPMethod = "PURGE"` - `const AttackLayer7SummaryManagedRulesParamsHTTPMethodOptions AttackLayer7SummaryManagedRulesParamsHTTPMethod = "OPTIONS"` - `const AttackLayer7SummaryManagedRulesParamsHTTPMethodPropfind AttackLayer7SummaryManagedRulesParamsHTTPMethod = "PROPFIND"` - `const AttackLayer7SummaryManagedRulesParamsHTTPMethodMkcol AttackLayer7SummaryManagedRulesParamsHTTPMethod = "MKCOL"` - `const AttackLayer7SummaryManagedRulesParamsHTTPMethodPatch AttackLayer7SummaryManagedRulesParamsHTTPMethod = "PATCH"` - `const AttackLayer7SummaryManagedRulesParamsHTTPMethodACL AttackLayer7SummaryManagedRulesParamsHTTPMethod = "ACL"` - `const AttackLayer7SummaryManagedRulesParamsHTTPMethodBcopy AttackLayer7SummaryManagedRulesParamsHTTPMethod = "BCOPY"` - `const AttackLayer7SummaryManagedRulesParamsHTTPMethodBdelete AttackLayer7SummaryManagedRulesParamsHTTPMethod = "BDELETE"` - `const AttackLayer7SummaryManagedRulesParamsHTTPMethodBmove AttackLayer7SummaryManagedRulesParamsHTTPMethod = "BMOVE"` - `const AttackLayer7SummaryManagedRulesParamsHTTPMethodBpropfind AttackLayer7SummaryManagedRulesParamsHTTPMethod = "BPROPFIND"` - `const AttackLayer7SummaryManagedRulesParamsHTTPMethodBproppatch AttackLayer7SummaryManagedRulesParamsHTTPMethod = "BPROPPATCH"` - `const AttackLayer7SummaryManagedRulesParamsHTTPMethodCheckin AttackLayer7SummaryManagedRulesParamsHTTPMethod = "CHECKIN"` - `const AttackLayer7SummaryManagedRulesParamsHTTPMethodCheckout AttackLayer7SummaryManagedRulesParamsHTTPMethod = "CHECKOUT"` - `const AttackLayer7SummaryManagedRulesParamsHTTPMethodConnect AttackLayer7SummaryManagedRulesParamsHTTPMethod = "CONNECT"` - `const AttackLayer7SummaryManagedRulesParamsHTTPMethodCopy AttackLayer7SummaryManagedRulesParamsHTTPMethod = "COPY"` - `const AttackLayer7SummaryManagedRulesParamsHTTPMethodLabel AttackLayer7SummaryManagedRulesParamsHTTPMethod = "LABEL"` - `const AttackLayer7SummaryManagedRulesParamsHTTPMethodLock AttackLayer7SummaryManagedRulesParamsHTTPMethod = "LOCK"` - `const AttackLayer7SummaryManagedRulesParamsHTTPMethodMerge AttackLayer7SummaryManagedRulesParamsHTTPMethod = "MERGE"` - `const AttackLayer7SummaryManagedRulesParamsHTTPMethodMkactivity AttackLayer7SummaryManagedRulesParamsHTTPMethod = "MKACTIVITY"` - `const AttackLayer7SummaryManagedRulesParamsHTTPMethodMkworkspace AttackLayer7SummaryManagedRulesParamsHTTPMethod = "MKWORKSPACE"` - `const AttackLayer7SummaryManagedRulesParamsHTTPMethodMove AttackLayer7SummaryManagedRulesParamsHTTPMethod = "MOVE"` - `const AttackLayer7SummaryManagedRulesParamsHTTPMethodNotify AttackLayer7SummaryManagedRulesParamsHTTPMethod = "NOTIFY"` - `const AttackLayer7SummaryManagedRulesParamsHTTPMethodOrderpatch AttackLayer7SummaryManagedRulesParamsHTTPMethod = "ORDERPATCH"` - `const AttackLayer7SummaryManagedRulesParamsHTTPMethodPoll AttackLayer7SummaryManagedRulesParamsHTTPMethod = "POLL"` - `const AttackLayer7SummaryManagedRulesParamsHTTPMethodProppatch AttackLayer7SummaryManagedRulesParamsHTTPMethod = "PROPPATCH"` - `const AttackLayer7SummaryManagedRulesParamsHTTPMethodReport AttackLayer7SummaryManagedRulesParamsHTTPMethod = "REPORT"` - `const AttackLayer7SummaryManagedRulesParamsHTTPMethodSearch AttackLayer7SummaryManagedRulesParamsHTTPMethod = "SEARCH"` - `const AttackLayer7SummaryManagedRulesParamsHTTPMethodSubscribe AttackLayer7SummaryManagedRulesParamsHTTPMethod = "SUBSCRIBE"` - `const AttackLayer7SummaryManagedRulesParamsHTTPMethodTrace AttackLayer7SummaryManagedRulesParamsHTTPMethod = "TRACE"` - `const AttackLayer7SummaryManagedRulesParamsHTTPMethodUncheckout AttackLayer7SummaryManagedRulesParamsHTTPMethod = "UNCHECKOUT"` - `const AttackLayer7SummaryManagedRulesParamsHTTPMethodUnlock AttackLayer7SummaryManagedRulesParamsHTTPMethod = "UNLOCK"` - `const AttackLayer7SummaryManagedRulesParamsHTTPMethodUnsubscribe AttackLayer7SummaryManagedRulesParamsHTTPMethod = "UNSUBSCRIBE"` - `const AttackLayer7SummaryManagedRulesParamsHTTPMethodUpdate AttackLayer7SummaryManagedRulesParamsHTTPMethod = "UPDATE"` - `const AttackLayer7SummaryManagedRulesParamsHTTPMethodVersioncontrol AttackLayer7SummaryManagedRulesParamsHTTPMethod = "VERSIONCONTROL"` - `const AttackLayer7SummaryManagedRulesParamsHTTPMethodBaselinecontrol AttackLayer7SummaryManagedRulesParamsHTTPMethod = "BASELINECONTROL"` - `const AttackLayer7SummaryManagedRulesParamsHTTPMethodXmsenumatts AttackLayer7SummaryManagedRulesParamsHTTPMethod = "XMSENUMATTS"` - `const AttackLayer7SummaryManagedRulesParamsHTTPMethodRpcOutData AttackLayer7SummaryManagedRulesParamsHTTPMethod = "RPC_OUT_DATA"` - `const AttackLayer7SummaryManagedRulesParamsHTTPMethodRpcInData AttackLayer7SummaryManagedRulesParamsHTTPMethod = "RPC_IN_DATA"` - `const AttackLayer7SummaryManagedRulesParamsHTTPMethodJson AttackLayer7SummaryManagedRulesParamsHTTPMethod = "JSON"` - `const AttackLayer7SummaryManagedRulesParamsHTTPMethodCook AttackLayer7SummaryManagedRulesParamsHTTPMethod = "COOK"` - `const AttackLayer7SummaryManagedRulesParamsHTTPMethodTrack AttackLayer7SummaryManagedRulesParamsHTTPMethod = "TRACK"` - `HTTPVersion param.Field[[]AttackLayer7SummaryManagedRulesParamsHTTPVersion]` Filters results by HTTP version. - `const AttackLayer7SummaryManagedRulesParamsHTTPVersionHttPv1 AttackLayer7SummaryManagedRulesParamsHTTPVersion = "HTTPv1"` - `const AttackLayer7SummaryManagedRulesParamsHTTPVersionHttPv2 AttackLayer7SummaryManagedRulesParamsHTTPVersion = "HTTPv2"` - `const AttackLayer7SummaryManagedRulesParamsHTTPVersionHttPv3 AttackLayer7SummaryManagedRulesParamsHTTPVersion = "HTTPv3"` - `IPVersion param.Field[[]AttackLayer7SummaryManagedRulesParamsIPVersion]` Filters results by IP version (Ipv4 vs. IPv6). - `const AttackLayer7SummaryManagedRulesParamsIPVersionIPv4 AttackLayer7SummaryManagedRulesParamsIPVersion = "IPv4"` - `const AttackLayer7SummaryManagedRulesParamsIPVersionIPv6 AttackLayer7SummaryManagedRulesParamsIPVersion = "IPv6"` - `LimitPerGroup param.Field[int64]` 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]` 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. - `MitigationProduct param.Field[[]AttackLayer7SummaryManagedRulesParamsMitigationProduct]` Filters the results by layer 7 mitigation product. - `const AttackLayer7SummaryManagedRulesParamsMitigationProductDDoS AttackLayer7SummaryManagedRulesParamsMitigationProduct = "DDOS"` - `const AttackLayer7SummaryManagedRulesParamsMitigationProductWAF AttackLayer7SummaryManagedRulesParamsMitigationProduct = "WAF"` - `const AttackLayer7SummaryManagedRulesParamsMitigationProductBotManagement AttackLayer7SummaryManagedRulesParamsMitigationProduct = "BOT_MANAGEMENT"` - `const AttackLayer7SummaryManagedRulesParamsMitigationProductAccessRules AttackLayer7SummaryManagedRulesParamsMitigationProduct = "ACCESS_RULES"` - `const AttackLayer7SummaryManagedRulesParamsMitigationProductIPReputation AttackLayer7SummaryManagedRulesParamsMitigationProduct = "IP_REPUTATION"` - `const AttackLayer7SummaryManagedRulesParamsMitigationProductAPIShield AttackLayer7SummaryManagedRulesParamsMitigationProduct = "API_SHIELD"` - `const AttackLayer7SummaryManagedRulesParamsMitigationProductDataLossPrevention AttackLayer7SummaryManagedRulesParamsMitigationProduct = "DATA_LOSS_PREVENTION"` - `Name param.Field[[]string]` Array of names used to label the series in the response. ### Returns - `type AttackLayer7SummaryManagedRulesResponse struct{…}` - `Meta AttackLayer7SummaryManagedRulesResponseMeta` Metadata for the results. - `ConfidenceInfo AttackLayer7SummaryManagedRulesResponseMetaConfidenceInfo` - `Annotations []AttackLayer7SummaryManagedRulesResponseMetaConfidenceInfoAnnotation` - `DataSource AttackLayer7SummaryManagedRulesResponseMetaConfidenceInfoAnnotationsDataSource` Data source for annotations. - `const AttackLayer7SummaryManagedRulesResponseMetaConfidenceInfoAnnotationsDataSourceAll AttackLayer7SummaryManagedRulesResponseMetaConfidenceInfoAnnotationsDataSource = "ALL"` - `const AttackLayer7SummaryManagedRulesResponseMetaConfidenceInfoAnnotationsDataSourceAIBots AttackLayer7SummaryManagedRulesResponseMetaConfidenceInfoAnnotationsDataSource = "AI_BOTS"` - `const AttackLayer7SummaryManagedRulesResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway AttackLayer7SummaryManagedRulesResponseMetaConfidenceInfoAnnotationsDataSource = "AI_GATEWAY"` - `const AttackLayer7SummaryManagedRulesResponseMetaConfidenceInfoAnnotationsDataSourceBGP AttackLayer7SummaryManagedRulesResponseMetaConfidenceInfoAnnotationsDataSource = "BGP"` - `const AttackLayer7SummaryManagedRulesResponseMetaConfidenceInfoAnnotationsDataSourceBots AttackLayer7SummaryManagedRulesResponseMetaConfidenceInfoAnnotationsDataSource = "BOTS"` - `const AttackLayer7SummaryManagedRulesResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly AttackLayer7SummaryManagedRulesResponseMetaConfidenceInfoAnnotationsDataSource = "CONNECTION_ANOMALY"` - `const AttackLayer7SummaryManagedRulesResponseMetaConfidenceInfoAnnotationsDataSourceCT AttackLayer7SummaryManagedRulesResponseMetaConfidenceInfoAnnotationsDataSource = "CT"` - `const AttackLayer7SummaryManagedRulesResponseMetaConfidenceInfoAnnotationsDataSourceDNS AttackLayer7SummaryManagedRulesResponseMetaConfidenceInfoAnnotationsDataSource = "DNS"` - `const AttackLayer7SummaryManagedRulesResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude AttackLayer7SummaryManagedRulesResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_MAGNITUDE"` - `const AttackLayer7SummaryManagedRulesResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112 AttackLayer7SummaryManagedRulesResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_AS112"` - `const AttackLayer7SummaryManagedRulesResponseMetaConfidenceInfoAnnotationsDataSourceDos AttackLayer7SummaryManagedRulesResponseMetaConfidenceInfoAnnotationsDataSource = "DOS"` - `const AttackLayer7SummaryManagedRulesResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting AttackLayer7SummaryManagedRulesResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_ROUTING"` - `const AttackLayer7SummaryManagedRulesResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity AttackLayer7SummaryManagedRulesResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_SECURITY"` - `const AttackLayer7SummaryManagedRulesResponseMetaConfidenceInfoAnnotationsDataSourceFw AttackLayer7SummaryManagedRulesResponseMetaConfidenceInfoAnnotationsDataSource = "FW"` - `const AttackLayer7SummaryManagedRulesResponseMetaConfidenceInfoAnnotationsDataSourceFwPg AttackLayer7SummaryManagedRulesResponseMetaConfidenceInfoAnnotationsDataSource = "FW_PG"` - `const AttackLayer7SummaryManagedRulesResponseMetaConfidenceInfoAnnotationsDataSourceHTTP AttackLayer7SummaryManagedRulesResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP"` - `const AttackLayer7SummaryManagedRulesResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl AttackLayer7SummaryManagedRulesResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CONTROL"` - `const AttackLayer7SummaryManagedRulesResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer AttackLayer7SummaryManagedRulesResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CRAWLER_REFERER"` - `const AttackLayer7SummaryManagedRulesResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins AttackLayer7SummaryManagedRulesResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_ORIGINS"` - `const AttackLayer7SummaryManagedRulesResponseMetaConfidenceInfoAnnotationsDataSourceIQI AttackLayer7SummaryManagedRulesResponseMetaConfidenceInfoAnnotationsDataSource = "IQI"` - `const AttackLayer7SummaryManagedRulesResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials AttackLayer7SummaryManagedRulesResponseMetaConfidenceInfoAnnotationsDataSource = "LEAKED_CREDENTIALS"` - `const AttackLayer7SummaryManagedRulesResponseMetaConfidenceInfoAnnotationsDataSourceNet AttackLayer7SummaryManagedRulesResponseMetaConfidenceInfoAnnotationsDataSource = "NET"` - `const AttackLayer7SummaryManagedRulesResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT AttackLayer7SummaryManagedRulesResponseMetaConfidenceInfoAnnotationsDataSource = "ROBOTS_TXT"` - `const AttackLayer7SummaryManagedRulesResponseMetaConfidenceInfoAnnotationsDataSourceSpeed AttackLayer7SummaryManagedRulesResponseMetaConfidenceInfoAnnotationsDataSource = "SPEED"` - `const AttackLayer7SummaryManagedRulesResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI AttackLayer7SummaryManagedRulesResponseMetaConfidenceInfoAnnotationsDataSource = "WORKERS_AI"` - `Description string` - `EndDate Time` - `EventType AttackLayer7SummaryManagedRulesResponseMetaConfidenceInfoAnnotationsEventType` Event type for annotations. - `const AttackLayer7SummaryManagedRulesResponseMetaConfidenceInfoAnnotationsEventTypeEvent AttackLayer7SummaryManagedRulesResponseMetaConfidenceInfoAnnotationsEventType = "EVENT"` - `const AttackLayer7SummaryManagedRulesResponseMetaConfidenceInfoAnnotationsEventTypeGeneral AttackLayer7SummaryManagedRulesResponseMetaConfidenceInfoAnnotationsEventType = "GENERAL"` - `const AttackLayer7SummaryManagedRulesResponseMetaConfidenceInfoAnnotationsEventTypeOutage AttackLayer7SummaryManagedRulesResponseMetaConfidenceInfoAnnotationsEventType = "OUTAGE"` - `const AttackLayer7SummaryManagedRulesResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection AttackLayer7SummaryManagedRulesResponseMetaConfidenceInfoAnnotationsEventType = "PARTIAL_PROJECTION"` - `const AttackLayer7SummaryManagedRulesResponseMetaConfidenceInfoAnnotationsEventTypePipeline AttackLayer7SummaryManagedRulesResponseMetaConfidenceInfoAnnotationsEventType = "PIPELINE"` - `const AttackLayer7SummaryManagedRulesResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly AttackLayer7SummaryManagedRulesResponseMetaConfidenceInfoAnnotationsEventType = "TRAFFIC_ANOMALY"` - `IsInstantaneous bool` Whether event is a single point in time or a time range. - `LinkedURL string` - `StartDate Time` - `Level int64` Provides an indication of how much confidence Cloudflare has in the data. - `DateRange []AttackLayer7SummaryManagedRulesResponseMetaDateRange` - `EndTime Time` Adjusted end of date range. - `StartTime Time` Adjusted start of date range. - `LastUpdated Time` Timestamp of the last dataset update. - `Normalization AttackLayer7SummaryManagedRulesResponseMetaNormalization` Normalization method applied to the results. Refer to [Normalization methods](https://developers.cloudflare.com/radar/concepts/normalization/). - `const AttackLayer7SummaryManagedRulesResponseMetaNormalizationPercentage AttackLayer7SummaryManagedRulesResponseMetaNormalization = "PERCENTAGE"` - `const AttackLayer7SummaryManagedRulesResponseMetaNormalizationMin0Max AttackLayer7SummaryManagedRulesResponseMetaNormalization = "MIN0_MAX"` - `const AttackLayer7SummaryManagedRulesResponseMetaNormalizationMinMax AttackLayer7SummaryManagedRulesResponseMetaNormalization = "MIN_MAX"` - `const AttackLayer7SummaryManagedRulesResponseMetaNormalizationRawValues AttackLayer7SummaryManagedRulesResponseMetaNormalization = "RAW_VALUES"` - `const AttackLayer7SummaryManagedRulesResponseMetaNormalizationPercentageChange AttackLayer7SummaryManagedRulesResponseMetaNormalization = "PERCENTAGE_CHANGE"` - `const AttackLayer7SummaryManagedRulesResponseMetaNormalizationRollingAverage AttackLayer7SummaryManagedRulesResponseMetaNormalization = "ROLLING_AVERAGE"` - `const AttackLayer7SummaryManagedRulesResponseMetaNormalizationOverlappedPercentage AttackLayer7SummaryManagedRulesResponseMetaNormalization = "OVERLAPPED_PERCENTAGE"` - `const AttackLayer7SummaryManagedRulesResponseMetaNormalizationRatio AttackLayer7SummaryManagedRulesResponseMetaNormalization = "RATIO"` - `Units []AttackLayer7SummaryManagedRulesResponseMetaUnit` Measurement units for the results. - `Name string` - `Value string` - `Summary0 map[string, string]` ### Example ```go 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.Layer7.Summary.ManagedRules(context.TODO(), radar.AttackLayer7SummaryManagedRulesParams{ }) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", response.Meta) } ``` #### Response ```json { "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": { "HTTP Anomaly": "85.714286", "XSS": "10.274394" } }, "success": true } ``` ## Get layer 7 attacks by mitigation product summary `client.Radar.Attacks.Layer7.Summary.MitigationProduct(ctx, query) (*AttackLayer7SummaryMitigationProductResponse, error)` **get** `/radar/attacks/layer7/summary/mitigation_product` Retrieves the distribution of layer 7 attacks by mitigation product. ### Parameters - `query AttackLayer7SummaryMitigationProductParams` - `ASN param.Field[[]string]` Filters results by Autonomous System. Specify one or more Autonomous System Numbers (ASNs) as a comma-separated list. Prefix with `-` to exclude ASNs from results. For example, `-174, 3356` excludes results from AS174, but includes results from AS3356. - `Continent param.Field[[]string]` 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]` End of the date range (inclusive). - `DateRange param.Field[[]string]` 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]` Start of the date range. - `Format param.Field[AttackLayer7SummaryMitigationProductParamsFormat]` Format in which results will be returned. - `const AttackLayer7SummaryMitigationProductParamsFormatJson AttackLayer7SummaryMitigationProductParamsFormat = "JSON"` - `const AttackLayer7SummaryMitigationProductParamsFormatCsv AttackLayer7SummaryMitigationProductParamsFormat = "CSV"` - `HTTPMethod param.Field[[]AttackLayer7SummaryMitigationProductParamsHTTPMethod]` Filters results by HTTP method. - `const AttackLayer7SummaryMitigationProductParamsHTTPMethodGet AttackLayer7SummaryMitigationProductParamsHTTPMethod = "GET"` - `const AttackLayer7SummaryMitigationProductParamsHTTPMethodPost AttackLayer7SummaryMitigationProductParamsHTTPMethod = "POST"` - `const AttackLayer7SummaryMitigationProductParamsHTTPMethodDelete AttackLayer7SummaryMitigationProductParamsHTTPMethod = "DELETE"` - `const AttackLayer7SummaryMitigationProductParamsHTTPMethodPut AttackLayer7SummaryMitigationProductParamsHTTPMethod = "PUT"` - `const AttackLayer7SummaryMitigationProductParamsHTTPMethodHead AttackLayer7SummaryMitigationProductParamsHTTPMethod = "HEAD"` - `const AttackLayer7SummaryMitigationProductParamsHTTPMethodPurge AttackLayer7SummaryMitigationProductParamsHTTPMethod = "PURGE"` - `const AttackLayer7SummaryMitigationProductParamsHTTPMethodOptions AttackLayer7SummaryMitigationProductParamsHTTPMethod = "OPTIONS"` - `const AttackLayer7SummaryMitigationProductParamsHTTPMethodPropfind AttackLayer7SummaryMitigationProductParamsHTTPMethod = "PROPFIND"` - `const AttackLayer7SummaryMitigationProductParamsHTTPMethodMkcol AttackLayer7SummaryMitigationProductParamsHTTPMethod = "MKCOL"` - `const AttackLayer7SummaryMitigationProductParamsHTTPMethodPatch AttackLayer7SummaryMitigationProductParamsHTTPMethod = "PATCH"` - `const AttackLayer7SummaryMitigationProductParamsHTTPMethodACL AttackLayer7SummaryMitigationProductParamsHTTPMethod = "ACL"` - `const AttackLayer7SummaryMitigationProductParamsHTTPMethodBcopy AttackLayer7SummaryMitigationProductParamsHTTPMethod = "BCOPY"` - `const AttackLayer7SummaryMitigationProductParamsHTTPMethodBdelete AttackLayer7SummaryMitigationProductParamsHTTPMethod = "BDELETE"` - `const AttackLayer7SummaryMitigationProductParamsHTTPMethodBmove AttackLayer7SummaryMitigationProductParamsHTTPMethod = "BMOVE"` - `const AttackLayer7SummaryMitigationProductParamsHTTPMethodBpropfind AttackLayer7SummaryMitigationProductParamsHTTPMethod = "BPROPFIND"` - `const AttackLayer7SummaryMitigationProductParamsHTTPMethodBproppatch AttackLayer7SummaryMitigationProductParamsHTTPMethod = "BPROPPATCH"` - `const AttackLayer7SummaryMitigationProductParamsHTTPMethodCheckin AttackLayer7SummaryMitigationProductParamsHTTPMethod = "CHECKIN"` - `const AttackLayer7SummaryMitigationProductParamsHTTPMethodCheckout AttackLayer7SummaryMitigationProductParamsHTTPMethod = "CHECKOUT"` - `const AttackLayer7SummaryMitigationProductParamsHTTPMethodConnect AttackLayer7SummaryMitigationProductParamsHTTPMethod = "CONNECT"` - `const AttackLayer7SummaryMitigationProductParamsHTTPMethodCopy AttackLayer7SummaryMitigationProductParamsHTTPMethod = "COPY"` - `const AttackLayer7SummaryMitigationProductParamsHTTPMethodLabel AttackLayer7SummaryMitigationProductParamsHTTPMethod = "LABEL"` - `const AttackLayer7SummaryMitigationProductParamsHTTPMethodLock AttackLayer7SummaryMitigationProductParamsHTTPMethod = "LOCK"` - `const AttackLayer7SummaryMitigationProductParamsHTTPMethodMerge AttackLayer7SummaryMitigationProductParamsHTTPMethod = "MERGE"` - `const AttackLayer7SummaryMitigationProductParamsHTTPMethodMkactivity AttackLayer7SummaryMitigationProductParamsHTTPMethod = "MKACTIVITY"` - `const AttackLayer7SummaryMitigationProductParamsHTTPMethodMkworkspace AttackLayer7SummaryMitigationProductParamsHTTPMethod = "MKWORKSPACE"` - `const AttackLayer7SummaryMitigationProductParamsHTTPMethodMove AttackLayer7SummaryMitigationProductParamsHTTPMethod = "MOVE"` - `const AttackLayer7SummaryMitigationProductParamsHTTPMethodNotify AttackLayer7SummaryMitigationProductParamsHTTPMethod = "NOTIFY"` - `const AttackLayer7SummaryMitigationProductParamsHTTPMethodOrderpatch AttackLayer7SummaryMitigationProductParamsHTTPMethod = "ORDERPATCH"` - `const AttackLayer7SummaryMitigationProductParamsHTTPMethodPoll AttackLayer7SummaryMitigationProductParamsHTTPMethod = "POLL"` - `const AttackLayer7SummaryMitigationProductParamsHTTPMethodProppatch AttackLayer7SummaryMitigationProductParamsHTTPMethod = "PROPPATCH"` - `const AttackLayer7SummaryMitigationProductParamsHTTPMethodReport AttackLayer7SummaryMitigationProductParamsHTTPMethod = "REPORT"` - `const AttackLayer7SummaryMitigationProductParamsHTTPMethodSearch AttackLayer7SummaryMitigationProductParamsHTTPMethod = "SEARCH"` - `const AttackLayer7SummaryMitigationProductParamsHTTPMethodSubscribe AttackLayer7SummaryMitigationProductParamsHTTPMethod = "SUBSCRIBE"` - `const AttackLayer7SummaryMitigationProductParamsHTTPMethodTrace AttackLayer7SummaryMitigationProductParamsHTTPMethod = "TRACE"` - `const AttackLayer7SummaryMitigationProductParamsHTTPMethodUncheckout AttackLayer7SummaryMitigationProductParamsHTTPMethod = "UNCHECKOUT"` - `const AttackLayer7SummaryMitigationProductParamsHTTPMethodUnlock AttackLayer7SummaryMitigationProductParamsHTTPMethod = "UNLOCK"` - `const AttackLayer7SummaryMitigationProductParamsHTTPMethodUnsubscribe AttackLayer7SummaryMitigationProductParamsHTTPMethod = "UNSUBSCRIBE"` - `const AttackLayer7SummaryMitigationProductParamsHTTPMethodUpdate AttackLayer7SummaryMitigationProductParamsHTTPMethod = "UPDATE"` - `const AttackLayer7SummaryMitigationProductParamsHTTPMethodVersioncontrol AttackLayer7SummaryMitigationProductParamsHTTPMethod = "VERSIONCONTROL"` - `const AttackLayer7SummaryMitigationProductParamsHTTPMethodBaselinecontrol AttackLayer7SummaryMitigationProductParamsHTTPMethod = "BASELINECONTROL"` - `const AttackLayer7SummaryMitigationProductParamsHTTPMethodXmsenumatts AttackLayer7SummaryMitigationProductParamsHTTPMethod = "XMSENUMATTS"` - `const AttackLayer7SummaryMitigationProductParamsHTTPMethodRpcOutData AttackLayer7SummaryMitigationProductParamsHTTPMethod = "RPC_OUT_DATA"` - `const AttackLayer7SummaryMitigationProductParamsHTTPMethodRpcInData AttackLayer7SummaryMitigationProductParamsHTTPMethod = "RPC_IN_DATA"` - `const AttackLayer7SummaryMitigationProductParamsHTTPMethodJson AttackLayer7SummaryMitigationProductParamsHTTPMethod = "JSON"` - `const AttackLayer7SummaryMitigationProductParamsHTTPMethodCook AttackLayer7SummaryMitigationProductParamsHTTPMethod = "COOK"` - `const AttackLayer7SummaryMitigationProductParamsHTTPMethodTrack AttackLayer7SummaryMitigationProductParamsHTTPMethod = "TRACK"` - `HTTPVersion param.Field[[]AttackLayer7SummaryMitigationProductParamsHTTPVersion]` Filters results by HTTP version. - `const AttackLayer7SummaryMitigationProductParamsHTTPVersionHttPv1 AttackLayer7SummaryMitigationProductParamsHTTPVersion = "HTTPv1"` - `const AttackLayer7SummaryMitigationProductParamsHTTPVersionHttPv2 AttackLayer7SummaryMitigationProductParamsHTTPVersion = "HTTPv2"` - `const AttackLayer7SummaryMitigationProductParamsHTTPVersionHttPv3 AttackLayer7SummaryMitigationProductParamsHTTPVersion = "HTTPv3"` - `IPVersion param.Field[[]AttackLayer7SummaryMitigationProductParamsIPVersion]` Filters results by IP version (Ipv4 vs. IPv6). - `const AttackLayer7SummaryMitigationProductParamsIPVersionIPv4 AttackLayer7SummaryMitigationProductParamsIPVersion = "IPv4"` - `const AttackLayer7SummaryMitigationProductParamsIPVersionIPv6 AttackLayer7SummaryMitigationProductParamsIPVersion = "IPv6"` - `LimitPerGroup param.Field[int64]` 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]` 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]` Array of names used to label the series in the response. ### Returns - `type AttackLayer7SummaryMitigationProductResponse struct{…}` - `Meta AttackLayer7SummaryMitigationProductResponseMeta` Metadata for the results. - `ConfidenceInfo AttackLayer7SummaryMitigationProductResponseMetaConfidenceInfo` - `Annotations []AttackLayer7SummaryMitigationProductResponseMetaConfidenceInfoAnnotation` - `DataSource AttackLayer7SummaryMitigationProductResponseMetaConfidenceInfoAnnotationsDataSource` Data source for annotations. - `const AttackLayer7SummaryMitigationProductResponseMetaConfidenceInfoAnnotationsDataSourceAll AttackLayer7SummaryMitigationProductResponseMetaConfidenceInfoAnnotationsDataSource = "ALL"` - `const AttackLayer7SummaryMitigationProductResponseMetaConfidenceInfoAnnotationsDataSourceAIBots AttackLayer7SummaryMitigationProductResponseMetaConfidenceInfoAnnotationsDataSource = "AI_BOTS"` - `const AttackLayer7SummaryMitigationProductResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway AttackLayer7SummaryMitigationProductResponseMetaConfidenceInfoAnnotationsDataSource = "AI_GATEWAY"` - `const AttackLayer7SummaryMitigationProductResponseMetaConfidenceInfoAnnotationsDataSourceBGP AttackLayer7SummaryMitigationProductResponseMetaConfidenceInfoAnnotationsDataSource = "BGP"` - `const AttackLayer7SummaryMitigationProductResponseMetaConfidenceInfoAnnotationsDataSourceBots AttackLayer7SummaryMitigationProductResponseMetaConfidenceInfoAnnotationsDataSource = "BOTS"` - `const AttackLayer7SummaryMitigationProductResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly AttackLayer7SummaryMitigationProductResponseMetaConfidenceInfoAnnotationsDataSource = "CONNECTION_ANOMALY"` - `const AttackLayer7SummaryMitigationProductResponseMetaConfidenceInfoAnnotationsDataSourceCT AttackLayer7SummaryMitigationProductResponseMetaConfidenceInfoAnnotationsDataSource = "CT"` - `const AttackLayer7SummaryMitigationProductResponseMetaConfidenceInfoAnnotationsDataSourceDNS AttackLayer7SummaryMitigationProductResponseMetaConfidenceInfoAnnotationsDataSource = "DNS"` - `const AttackLayer7SummaryMitigationProductResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude AttackLayer7SummaryMitigationProductResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_MAGNITUDE"` - `const AttackLayer7SummaryMitigationProductResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112 AttackLayer7SummaryMitigationProductResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_AS112"` - `const AttackLayer7SummaryMitigationProductResponseMetaConfidenceInfoAnnotationsDataSourceDos AttackLayer7SummaryMitigationProductResponseMetaConfidenceInfoAnnotationsDataSource = "DOS"` - `const AttackLayer7SummaryMitigationProductResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting AttackLayer7SummaryMitigationProductResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_ROUTING"` - `const AttackLayer7SummaryMitigationProductResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity AttackLayer7SummaryMitigationProductResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_SECURITY"` - `const AttackLayer7SummaryMitigationProductResponseMetaConfidenceInfoAnnotationsDataSourceFw AttackLayer7SummaryMitigationProductResponseMetaConfidenceInfoAnnotationsDataSource = "FW"` - `const AttackLayer7SummaryMitigationProductResponseMetaConfidenceInfoAnnotationsDataSourceFwPg AttackLayer7SummaryMitigationProductResponseMetaConfidenceInfoAnnotationsDataSource = "FW_PG"` - `const AttackLayer7SummaryMitigationProductResponseMetaConfidenceInfoAnnotationsDataSourceHTTP AttackLayer7SummaryMitigationProductResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP"` - `const AttackLayer7SummaryMitigationProductResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl AttackLayer7SummaryMitigationProductResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CONTROL"` - `const AttackLayer7SummaryMitigationProductResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer AttackLayer7SummaryMitigationProductResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CRAWLER_REFERER"` - `const AttackLayer7SummaryMitigationProductResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins AttackLayer7SummaryMitigationProductResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_ORIGINS"` - `const AttackLayer7SummaryMitigationProductResponseMetaConfidenceInfoAnnotationsDataSourceIQI AttackLayer7SummaryMitigationProductResponseMetaConfidenceInfoAnnotationsDataSource = "IQI"` - `const AttackLayer7SummaryMitigationProductResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials AttackLayer7SummaryMitigationProductResponseMetaConfidenceInfoAnnotationsDataSource = "LEAKED_CREDENTIALS"` - `const AttackLayer7SummaryMitigationProductResponseMetaConfidenceInfoAnnotationsDataSourceNet AttackLayer7SummaryMitigationProductResponseMetaConfidenceInfoAnnotationsDataSource = "NET"` - `const AttackLayer7SummaryMitigationProductResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT AttackLayer7SummaryMitigationProductResponseMetaConfidenceInfoAnnotationsDataSource = "ROBOTS_TXT"` - `const AttackLayer7SummaryMitigationProductResponseMetaConfidenceInfoAnnotationsDataSourceSpeed AttackLayer7SummaryMitigationProductResponseMetaConfidenceInfoAnnotationsDataSource = "SPEED"` - `const AttackLayer7SummaryMitigationProductResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI AttackLayer7SummaryMitigationProductResponseMetaConfidenceInfoAnnotationsDataSource = "WORKERS_AI"` - `Description string` - `EndDate Time` - `EventType AttackLayer7SummaryMitigationProductResponseMetaConfidenceInfoAnnotationsEventType` Event type for annotations. - `const AttackLayer7SummaryMitigationProductResponseMetaConfidenceInfoAnnotationsEventTypeEvent AttackLayer7SummaryMitigationProductResponseMetaConfidenceInfoAnnotationsEventType = "EVENT"` - `const AttackLayer7SummaryMitigationProductResponseMetaConfidenceInfoAnnotationsEventTypeGeneral AttackLayer7SummaryMitigationProductResponseMetaConfidenceInfoAnnotationsEventType = "GENERAL"` - `const AttackLayer7SummaryMitigationProductResponseMetaConfidenceInfoAnnotationsEventTypeOutage AttackLayer7SummaryMitigationProductResponseMetaConfidenceInfoAnnotationsEventType = "OUTAGE"` - `const AttackLayer7SummaryMitigationProductResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection AttackLayer7SummaryMitigationProductResponseMetaConfidenceInfoAnnotationsEventType = "PARTIAL_PROJECTION"` - `const AttackLayer7SummaryMitigationProductResponseMetaConfidenceInfoAnnotationsEventTypePipeline AttackLayer7SummaryMitigationProductResponseMetaConfidenceInfoAnnotationsEventType = "PIPELINE"` - `const AttackLayer7SummaryMitigationProductResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly AttackLayer7SummaryMitigationProductResponseMetaConfidenceInfoAnnotationsEventType = "TRAFFIC_ANOMALY"` - `IsInstantaneous bool` Whether event is a single point in time or a time range. - `LinkedURL string` - `StartDate Time` - `Level int64` Provides an indication of how much confidence Cloudflare has in the data. - `DateRange []AttackLayer7SummaryMitigationProductResponseMetaDateRange` - `EndTime Time` Adjusted end of date range. - `StartTime Time` Adjusted start of date range. - `LastUpdated Time` Timestamp of the last dataset update. - `Normalization AttackLayer7SummaryMitigationProductResponseMetaNormalization` Normalization method applied to the results. Refer to [Normalization methods](https://developers.cloudflare.com/radar/concepts/normalization/). - `const AttackLayer7SummaryMitigationProductResponseMetaNormalizationPercentage AttackLayer7SummaryMitigationProductResponseMetaNormalization = "PERCENTAGE"` - `const AttackLayer7SummaryMitigationProductResponseMetaNormalizationMin0Max AttackLayer7SummaryMitigationProductResponseMetaNormalization = "MIN0_MAX"` - `const AttackLayer7SummaryMitigationProductResponseMetaNormalizationMinMax AttackLayer7SummaryMitigationProductResponseMetaNormalization = "MIN_MAX"` - `const AttackLayer7SummaryMitigationProductResponseMetaNormalizationRawValues AttackLayer7SummaryMitigationProductResponseMetaNormalization = "RAW_VALUES"` - `const AttackLayer7SummaryMitigationProductResponseMetaNormalizationPercentageChange AttackLayer7SummaryMitigationProductResponseMetaNormalization = "PERCENTAGE_CHANGE"` - `const AttackLayer7SummaryMitigationProductResponseMetaNormalizationRollingAverage AttackLayer7SummaryMitigationProductResponseMetaNormalization = "ROLLING_AVERAGE"` - `const AttackLayer7SummaryMitigationProductResponseMetaNormalizationOverlappedPercentage AttackLayer7SummaryMitigationProductResponseMetaNormalization = "OVERLAPPED_PERCENTAGE"` - `const AttackLayer7SummaryMitigationProductResponseMetaNormalizationRatio AttackLayer7SummaryMitigationProductResponseMetaNormalization = "RATIO"` - `Units []AttackLayer7SummaryMitigationProductResponseMetaUnit` Measurement units for the results. - `Name string` - `Value string` - `Summary0 map[string, string]` ### Example ```go 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.Layer7.Summary.MitigationProduct(context.TODO(), radar.AttackLayer7SummaryMitigationProductParams{ }) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", response.Meta) } ``` #### Response ```json { "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": { "DDOS": "24.421594", "WAF": "53.213368" } }, "success": true } ``` ## Get layer 7 attacks by targeted industry summary `client.Radar.Attacks.Layer7.Summary.Industry(ctx, query) (*AttackLayer7SummaryIndustryResponse, error)` **get** `/radar/attacks/layer7/summary/industry` Retrieves the distribution of layer 7 attacks by targeted industry. ### Parameters - `query AttackLayer7SummaryIndustryParams` - `ASN param.Field[[]string]` Filters results by Autonomous System. Specify one or more Autonomous System Numbers (ASNs) as a comma-separated list. Prefix with `-` to exclude ASNs from results. For example, `-174, 3356` excludes results from AS174, but includes results from AS3356. - `Continent param.Field[[]string]` 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]` End of the date range (inclusive). - `DateRange param.Field[[]string]` 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]` Start of the date range. - `Format param.Field[AttackLayer7SummaryIndustryParamsFormat]` Format in which results will be returned. - `const AttackLayer7SummaryIndustryParamsFormatJson AttackLayer7SummaryIndustryParamsFormat = "JSON"` - `const AttackLayer7SummaryIndustryParamsFormatCsv AttackLayer7SummaryIndustryParamsFormat = "CSV"` - `HTTPMethod param.Field[[]AttackLayer7SummaryIndustryParamsHTTPMethod]` Filters results by HTTP method. - `const AttackLayer7SummaryIndustryParamsHTTPMethodGet AttackLayer7SummaryIndustryParamsHTTPMethod = "GET"` - `const AttackLayer7SummaryIndustryParamsHTTPMethodPost AttackLayer7SummaryIndustryParamsHTTPMethod = "POST"` - `const AttackLayer7SummaryIndustryParamsHTTPMethodDelete AttackLayer7SummaryIndustryParamsHTTPMethod = "DELETE"` - `const AttackLayer7SummaryIndustryParamsHTTPMethodPut AttackLayer7SummaryIndustryParamsHTTPMethod = "PUT"` - `const AttackLayer7SummaryIndustryParamsHTTPMethodHead AttackLayer7SummaryIndustryParamsHTTPMethod = "HEAD"` - `const AttackLayer7SummaryIndustryParamsHTTPMethodPurge AttackLayer7SummaryIndustryParamsHTTPMethod = "PURGE"` - `const AttackLayer7SummaryIndustryParamsHTTPMethodOptions AttackLayer7SummaryIndustryParamsHTTPMethod = "OPTIONS"` - `const AttackLayer7SummaryIndustryParamsHTTPMethodPropfind AttackLayer7SummaryIndustryParamsHTTPMethod = "PROPFIND"` - `const AttackLayer7SummaryIndustryParamsHTTPMethodMkcol AttackLayer7SummaryIndustryParamsHTTPMethod = "MKCOL"` - `const AttackLayer7SummaryIndustryParamsHTTPMethodPatch AttackLayer7SummaryIndustryParamsHTTPMethod = "PATCH"` - `const AttackLayer7SummaryIndustryParamsHTTPMethodACL AttackLayer7SummaryIndustryParamsHTTPMethod = "ACL"` - `const AttackLayer7SummaryIndustryParamsHTTPMethodBcopy AttackLayer7SummaryIndustryParamsHTTPMethod = "BCOPY"` - `const AttackLayer7SummaryIndustryParamsHTTPMethodBdelete AttackLayer7SummaryIndustryParamsHTTPMethod = "BDELETE"` - `const AttackLayer7SummaryIndustryParamsHTTPMethodBmove AttackLayer7SummaryIndustryParamsHTTPMethod = "BMOVE"` - `const AttackLayer7SummaryIndustryParamsHTTPMethodBpropfind AttackLayer7SummaryIndustryParamsHTTPMethod = "BPROPFIND"` - `const AttackLayer7SummaryIndustryParamsHTTPMethodBproppatch AttackLayer7SummaryIndustryParamsHTTPMethod = "BPROPPATCH"` - `const AttackLayer7SummaryIndustryParamsHTTPMethodCheckin AttackLayer7SummaryIndustryParamsHTTPMethod = "CHECKIN"` - `const AttackLayer7SummaryIndustryParamsHTTPMethodCheckout AttackLayer7SummaryIndustryParamsHTTPMethod = "CHECKOUT"` - `const AttackLayer7SummaryIndustryParamsHTTPMethodConnect AttackLayer7SummaryIndustryParamsHTTPMethod = "CONNECT"` - `const AttackLayer7SummaryIndustryParamsHTTPMethodCopy AttackLayer7SummaryIndustryParamsHTTPMethod = "COPY"` - `const AttackLayer7SummaryIndustryParamsHTTPMethodLabel AttackLayer7SummaryIndustryParamsHTTPMethod = "LABEL"` - `const AttackLayer7SummaryIndustryParamsHTTPMethodLock AttackLayer7SummaryIndustryParamsHTTPMethod = "LOCK"` - `const AttackLayer7SummaryIndustryParamsHTTPMethodMerge AttackLayer7SummaryIndustryParamsHTTPMethod = "MERGE"` - `const AttackLayer7SummaryIndustryParamsHTTPMethodMkactivity AttackLayer7SummaryIndustryParamsHTTPMethod = "MKACTIVITY"` - `const AttackLayer7SummaryIndustryParamsHTTPMethodMkworkspace AttackLayer7SummaryIndustryParamsHTTPMethod = "MKWORKSPACE"` - `const AttackLayer7SummaryIndustryParamsHTTPMethodMove AttackLayer7SummaryIndustryParamsHTTPMethod = "MOVE"` - `const AttackLayer7SummaryIndustryParamsHTTPMethodNotify AttackLayer7SummaryIndustryParamsHTTPMethod = "NOTIFY"` - `const AttackLayer7SummaryIndustryParamsHTTPMethodOrderpatch AttackLayer7SummaryIndustryParamsHTTPMethod = "ORDERPATCH"` - `const AttackLayer7SummaryIndustryParamsHTTPMethodPoll AttackLayer7SummaryIndustryParamsHTTPMethod = "POLL"` - `const AttackLayer7SummaryIndustryParamsHTTPMethodProppatch AttackLayer7SummaryIndustryParamsHTTPMethod = "PROPPATCH"` - `const AttackLayer7SummaryIndustryParamsHTTPMethodReport AttackLayer7SummaryIndustryParamsHTTPMethod = "REPORT"` - `const AttackLayer7SummaryIndustryParamsHTTPMethodSearch AttackLayer7SummaryIndustryParamsHTTPMethod = "SEARCH"` - `const AttackLayer7SummaryIndustryParamsHTTPMethodSubscribe AttackLayer7SummaryIndustryParamsHTTPMethod = "SUBSCRIBE"` - `const AttackLayer7SummaryIndustryParamsHTTPMethodTrace AttackLayer7SummaryIndustryParamsHTTPMethod = "TRACE"` - `const AttackLayer7SummaryIndustryParamsHTTPMethodUncheckout AttackLayer7SummaryIndustryParamsHTTPMethod = "UNCHECKOUT"` - `const AttackLayer7SummaryIndustryParamsHTTPMethodUnlock AttackLayer7SummaryIndustryParamsHTTPMethod = "UNLOCK"` - `const AttackLayer7SummaryIndustryParamsHTTPMethodUnsubscribe AttackLayer7SummaryIndustryParamsHTTPMethod = "UNSUBSCRIBE"` - `const AttackLayer7SummaryIndustryParamsHTTPMethodUpdate AttackLayer7SummaryIndustryParamsHTTPMethod = "UPDATE"` - `const AttackLayer7SummaryIndustryParamsHTTPMethodVersioncontrol AttackLayer7SummaryIndustryParamsHTTPMethod = "VERSIONCONTROL"` - `const AttackLayer7SummaryIndustryParamsHTTPMethodBaselinecontrol AttackLayer7SummaryIndustryParamsHTTPMethod = "BASELINECONTROL"` - `const AttackLayer7SummaryIndustryParamsHTTPMethodXmsenumatts AttackLayer7SummaryIndustryParamsHTTPMethod = "XMSENUMATTS"` - `const AttackLayer7SummaryIndustryParamsHTTPMethodRpcOutData AttackLayer7SummaryIndustryParamsHTTPMethod = "RPC_OUT_DATA"` - `const AttackLayer7SummaryIndustryParamsHTTPMethodRpcInData AttackLayer7SummaryIndustryParamsHTTPMethod = "RPC_IN_DATA"` - `const AttackLayer7SummaryIndustryParamsHTTPMethodJson AttackLayer7SummaryIndustryParamsHTTPMethod = "JSON"` - `const AttackLayer7SummaryIndustryParamsHTTPMethodCook AttackLayer7SummaryIndustryParamsHTTPMethod = "COOK"` - `const AttackLayer7SummaryIndustryParamsHTTPMethodTrack AttackLayer7SummaryIndustryParamsHTTPMethod = "TRACK"` - `HTTPVersion param.Field[[]AttackLayer7SummaryIndustryParamsHTTPVersion]` Filters results by HTTP version. - `const AttackLayer7SummaryIndustryParamsHTTPVersionHttPv1 AttackLayer7SummaryIndustryParamsHTTPVersion = "HTTPv1"` - `const AttackLayer7SummaryIndustryParamsHTTPVersionHttPv2 AttackLayer7SummaryIndustryParamsHTTPVersion = "HTTPv2"` - `const AttackLayer7SummaryIndustryParamsHTTPVersionHttPv3 AttackLayer7SummaryIndustryParamsHTTPVersion = "HTTPv3"` - `IPVersion param.Field[[]AttackLayer7SummaryIndustryParamsIPVersion]` Filters results by IP version (Ipv4 vs. IPv6). - `const AttackLayer7SummaryIndustryParamsIPVersionIPv4 AttackLayer7SummaryIndustryParamsIPVersion = "IPv4"` - `const AttackLayer7SummaryIndustryParamsIPVersionIPv6 AttackLayer7SummaryIndustryParamsIPVersion = "IPv6"` - `LimitPerGroup param.Field[int64]` 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]` 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. - `MitigationProduct param.Field[[]AttackLayer7SummaryIndustryParamsMitigationProduct]` Filters the results by layer 7 mitigation product. - `const AttackLayer7SummaryIndustryParamsMitigationProductDDoS AttackLayer7SummaryIndustryParamsMitigationProduct = "DDOS"` - `const AttackLayer7SummaryIndustryParamsMitigationProductWAF AttackLayer7SummaryIndustryParamsMitigationProduct = "WAF"` - `const AttackLayer7SummaryIndustryParamsMitigationProductBotManagement AttackLayer7SummaryIndustryParamsMitigationProduct = "BOT_MANAGEMENT"` - `const AttackLayer7SummaryIndustryParamsMitigationProductAccessRules AttackLayer7SummaryIndustryParamsMitigationProduct = "ACCESS_RULES"` - `const AttackLayer7SummaryIndustryParamsMitigationProductIPReputation AttackLayer7SummaryIndustryParamsMitigationProduct = "IP_REPUTATION"` - `const AttackLayer7SummaryIndustryParamsMitigationProductAPIShield AttackLayer7SummaryIndustryParamsMitigationProduct = "API_SHIELD"` - `const AttackLayer7SummaryIndustryParamsMitigationProductDataLossPrevention AttackLayer7SummaryIndustryParamsMitigationProduct = "DATA_LOSS_PREVENTION"` - `Name param.Field[[]string]` Array of names used to label the series in the response. ### Returns - `type AttackLayer7SummaryIndustryResponse struct{…}` - `Meta AttackLayer7SummaryIndustryResponseMeta` Metadata for the results. - `ConfidenceInfo AttackLayer7SummaryIndustryResponseMetaConfidenceInfo` - `Annotations []AttackLayer7SummaryIndustryResponseMetaConfidenceInfoAnnotation` - `DataSource AttackLayer7SummaryIndustryResponseMetaConfidenceInfoAnnotationsDataSource` Data source for annotations. - `const AttackLayer7SummaryIndustryResponseMetaConfidenceInfoAnnotationsDataSourceAll AttackLayer7SummaryIndustryResponseMetaConfidenceInfoAnnotationsDataSource = "ALL"` - `const AttackLayer7SummaryIndustryResponseMetaConfidenceInfoAnnotationsDataSourceAIBots AttackLayer7SummaryIndustryResponseMetaConfidenceInfoAnnotationsDataSource = "AI_BOTS"` - `const AttackLayer7SummaryIndustryResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway AttackLayer7SummaryIndustryResponseMetaConfidenceInfoAnnotationsDataSource = "AI_GATEWAY"` - `const AttackLayer7SummaryIndustryResponseMetaConfidenceInfoAnnotationsDataSourceBGP AttackLayer7SummaryIndustryResponseMetaConfidenceInfoAnnotationsDataSource = "BGP"` - `const AttackLayer7SummaryIndustryResponseMetaConfidenceInfoAnnotationsDataSourceBots AttackLayer7SummaryIndustryResponseMetaConfidenceInfoAnnotationsDataSource = "BOTS"` - `const AttackLayer7SummaryIndustryResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly AttackLayer7SummaryIndustryResponseMetaConfidenceInfoAnnotationsDataSource = "CONNECTION_ANOMALY"` - `const AttackLayer7SummaryIndustryResponseMetaConfidenceInfoAnnotationsDataSourceCT AttackLayer7SummaryIndustryResponseMetaConfidenceInfoAnnotationsDataSource = "CT"` - `const AttackLayer7SummaryIndustryResponseMetaConfidenceInfoAnnotationsDataSourceDNS AttackLayer7SummaryIndustryResponseMetaConfidenceInfoAnnotationsDataSource = "DNS"` - `const AttackLayer7SummaryIndustryResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude AttackLayer7SummaryIndustryResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_MAGNITUDE"` - `const AttackLayer7SummaryIndustryResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112 AttackLayer7SummaryIndustryResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_AS112"` - `const AttackLayer7SummaryIndustryResponseMetaConfidenceInfoAnnotationsDataSourceDos AttackLayer7SummaryIndustryResponseMetaConfidenceInfoAnnotationsDataSource = "DOS"` - `const AttackLayer7SummaryIndustryResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting AttackLayer7SummaryIndustryResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_ROUTING"` - `const AttackLayer7SummaryIndustryResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity AttackLayer7SummaryIndustryResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_SECURITY"` - `const AttackLayer7SummaryIndustryResponseMetaConfidenceInfoAnnotationsDataSourceFw AttackLayer7SummaryIndustryResponseMetaConfidenceInfoAnnotationsDataSource = "FW"` - `const AttackLayer7SummaryIndustryResponseMetaConfidenceInfoAnnotationsDataSourceFwPg AttackLayer7SummaryIndustryResponseMetaConfidenceInfoAnnotationsDataSource = "FW_PG"` - `const AttackLayer7SummaryIndustryResponseMetaConfidenceInfoAnnotationsDataSourceHTTP AttackLayer7SummaryIndustryResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP"` - `const AttackLayer7SummaryIndustryResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl AttackLayer7SummaryIndustryResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CONTROL"` - `const AttackLayer7SummaryIndustryResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer AttackLayer7SummaryIndustryResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CRAWLER_REFERER"` - `const AttackLayer7SummaryIndustryResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins AttackLayer7SummaryIndustryResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_ORIGINS"` - `const AttackLayer7SummaryIndustryResponseMetaConfidenceInfoAnnotationsDataSourceIQI AttackLayer7SummaryIndustryResponseMetaConfidenceInfoAnnotationsDataSource = "IQI"` - `const AttackLayer7SummaryIndustryResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials AttackLayer7SummaryIndustryResponseMetaConfidenceInfoAnnotationsDataSource = "LEAKED_CREDENTIALS"` - `const AttackLayer7SummaryIndustryResponseMetaConfidenceInfoAnnotationsDataSourceNet AttackLayer7SummaryIndustryResponseMetaConfidenceInfoAnnotationsDataSource = "NET"` - `const AttackLayer7SummaryIndustryResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT AttackLayer7SummaryIndustryResponseMetaConfidenceInfoAnnotationsDataSource = "ROBOTS_TXT"` - `const AttackLayer7SummaryIndustryResponseMetaConfidenceInfoAnnotationsDataSourceSpeed AttackLayer7SummaryIndustryResponseMetaConfidenceInfoAnnotationsDataSource = "SPEED"` - `const AttackLayer7SummaryIndustryResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI AttackLayer7SummaryIndustryResponseMetaConfidenceInfoAnnotationsDataSource = "WORKERS_AI"` - `Description string` - `EndDate Time` - `EventType AttackLayer7SummaryIndustryResponseMetaConfidenceInfoAnnotationsEventType` Event type for annotations. - `const AttackLayer7SummaryIndustryResponseMetaConfidenceInfoAnnotationsEventTypeEvent AttackLayer7SummaryIndustryResponseMetaConfidenceInfoAnnotationsEventType = "EVENT"` - `const AttackLayer7SummaryIndustryResponseMetaConfidenceInfoAnnotationsEventTypeGeneral AttackLayer7SummaryIndustryResponseMetaConfidenceInfoAnnotationsEventType = "GENERAL"` - `const AttackLayer7SummaryIndustryResponseMetaConfidenceInfoAnnotationsEventTypeOutage AttackLayer7SummaryIndustryResponseMetaConfidenceInfoAnnotationsEventType = "OUTAGE"` - `const AttackLayer7SummaryIndustryResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection AttackLayer7SummaryIndustryResponseMetaConfidenceInfoAnnotationsEventType = "PARTIAL_PROJECTION"` - `const AttackLayer7SummaryIndustryResponseMetaConfidenceInfoAnnotationsEventTypePipeline AttackLayer7SummaryIndustryResponseMetaConfidenceInfoAnnotationsEventType = "PIPELINE"` - `const AttackLayer7SummaryIndustryResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly AttackLayer7SummaryIndustryResponseMetaConfidenceInfoAnnotationsEventType = "TRAFFIC_ANOMALY"` - `IsInstantaneous bool` Whether event is a single point in time or a time range. - `LinkedURL string` - `StartDate Time` - `Level int64` Provides an indication of how much confidence Cloudflare has in the data. - `DateRange []AttackLayer7SummaryIndustryResponseMetaDateRange` - `EndTime Time` Adjusted end of date range. - `StartTime Time` Adjusted start of date range. - `LastUpdated Time` Timestamp of the last dataset update. - `Normalization AttackLayer7SummaryIndustryResponseMetaNormalization` Normalization method applied to the results. Refer to [Normalization methods](https://developers.cloudflare.com/radar/concepts/normalization/). - `const AttackLayer7SummaryIndustryResponseMetaNormalizationPercentage AttackLayer7SummaryIndustryResponseMetaNormalization = "PERCENTAGE"` - `const AttackLayer7SummaryIndustryResponseMetaNormalizationMin0Max AttackLayer7SummaryIndustryResponseMetaNormalization = "MIN0_MAX"` - `const AttackLayer7SummaryIndustryResponseMetaNormalizationMinMax AttackLayer7SummaryIndustryResponseMetaNormalization = "MIN_MAX"` - `const AttackLayer7SummaryIndustryResponseMetaNormalizationRawValues AttackLayer7SummaryIndustryResponseMetaNormalization = "RAW_VALUES"` - `const AttackLayer7SummaryIndustryResponseMetaNormalizationPercentageChange AttackLayer7SummaryIndustryResponseMetaNormalization = "PERCENTAGE_CHANGE"` - `const AttackLayer7SummaryIndustryResponseMetaNormalizationRollingAverage AttackLayer7SummaryIndustryResponseMetaNormalization = "ROLLING_AVERAGE"` - `const AttackLayer7SummaryIndustryResponseMetaNormalizationOverlappedPercentage AttackLayer7SummaryIndustryResponseMetaNormalization = "OVERLAPPED_PERCENTAGE"` - `const AttackLayer7SummaryIndustryResponseMetaNormalizationRatio AttackLayer7SummaryIndustryResponseMetaNormalization = "RATIO"` - `Units []AttackLayer7SummaryIndustryResponseMetaUnit` Measurement units for the results. - `Name string` - `Value string` - `Summary0 map[string, string]` ### Example ```go 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.Layer7.Summary.Industry(context.TODO(), radar.AttackLayer7SummaryIndustryParams{ }) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", response.Meta) } ``` #### Response ```json { "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": { "Computer Software": "65" } }, "success": true } ``` ## Get layer 7 attacks by targeted vertical summary `client.Radar.Attacks.Layer7.Summary.Vertical(ctx, query) (*AttackLayer7SummaryVerticalResponse, error)` **get** `/radar/attacks/layer7/summary/vertical` Retrieves the distribution of layer 7 attacks by targeted vertical. ### Parameters - `query AttackLayer7SummaryVerticalParams` - `ASN param.Field[[]string]` Filters results by Autonomous System. Specify one or more Autonomous System Numbers (ASNs) as a comma-separated list. Prefix with `-` to exclude ASNs from results. For example, `-174, 3356` excludes results from AS174, but includes results from AS3356. - `Continent param.Field[[]string]` 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]` End of the date range (inclusive). - `DateRange param.Field[[]string]` 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]` Start of the date range. - `Format param.Field[AttackLayer7SummaryVerticalParamsFormat]` Format in which results will be returned. - `const AttackLayer7SummaryVerticalParamsFormatJson AttackLayer7SummaryVerticalParamsFormat = "JSON"` - `const AttackLayer7SummaryVerticalParamsFormatCsv AttackLayer7SummaryVerticalParamsFormat = "CSV"` - `HTTPMethod param.Field[[]AttackLayer7SummaryVerticalParamsHTTPMethod]` Filters results by HTTP method. - `const AttackLayer7SummaryVerticalParamsHTTPMethodGet AttackLayer7SummaryVerticalParamsHTTPMethod = "GET"` - `const AttackLayer7SummaryVerticalParamsHTTPMethodPost AttackLayer7SummaryVerticalParamsHTTPMethod = "POST"` - `const AttackLayer7SummaryVerticalParamsHTTPMethodDelete AttackLayer7SummaryVerticalParamsHTTPMethod = "DELETE"` - `const AttackLayer7SummaryVerticalParamsHTTPMethodPut AttackLayer7SummaryVerticalParamsHTTPMethod = "PUT"` - `const AttackLayer7SummaryVerticalParamsHTTPMethodHead AttackLayer7SummaryVerticalParamsHTTPMethod = "HEAD"` - `const AttackLayer7SummaryVerticalParamsHTTPMethodPurge AttackLayer7SummaryVerticalParamsHTTPMethod = "PURGE"` - `const AttackLayer7SummaryVerticalParamsHTTPMethodOptions AttackLayer7SummaryVerticalParamsHTTPMethod = "OPTIONS"` - `const AttackLayer7SummaryVerticalParamsHTTPMethodPropfind AttackLayer7SummaryVerticalParamsHTTPMethod = "PROPFIND"` - `const AttackLayer7SummaryVerticalParamsHTTPMethodMkcol AttackLayer7SummaryVerticalParamsHTTPMethod = "MKCOL"` - `const AttackLayer7SummaryVerticalParamsHTTPMethodPatch AttackLayer7SummaryVerticalParamsHTTPMethod = "PATCH"` - `const AttackLayer7SummaryVerticalParamsHTTPMethodACL AttackLayer7SummaryVerticalParamsHTTPMethod = "ACL"` - `const AttackLayer7SummaryVerticalParamsHTTPMethodBcopy AttackLayer7SummaryVerticalParamsHTTPMethod = "BCOPY"` - `const AttackLayer7SummaryVerticalParamsHTTPMethodBdelete AttackLayer7SummaryVerticalParamsHTTPMethod = "BDELETE"` - `const AttackLayer7SummaryVerticalParamsHTTPMethodBmove AttackLayer7SummaryVerticalParamsHTTPMethod = "BMOVE"` - `const AttackLayer7SummaryVerticalParamsHTTPMethodBpropfind AttackLayer7SummaryVerticalParamsHTTPMethod = "BPROPFIND"` - `const AttackLayer7SummaryVerticalParamsHTTPMethodBproppatch AttackLayer7SummaryVerticalParamsHTTPMethod = "BPROPPATCH"` - `const AttackLayer7SummaryVerticalParamsHTTPMethodCheckin AttackLayer7SummaryVerticalParamsHTTPMethod = "CHECKIN"` - `const AttackLayer7SummaryVerticalParamsHTTPMethodCheckout AttackLayer7SummaryVerticalParamsHTTPMethod = "CHECKOUT"` - `const AttackLayer7SummaryVerticalParamsHTTPMethodConnect AttackLayer7SummaryVerticalParamsHTTPMethod = "CONNECT"` - `const AttackLayer7SummaryVerticalParamsHTTPMethodCopy AttackLayer7SummaryVerticalParamsHTTPMethod = "COPY"` - `const AttackLayer7SummaryVerticalParamsHTTPMethodLabel AttackLayer7SummaryVerticalParamsHTTPMethod = "LABEL"` - `const AttackLayer7SummaryVerticalParamsHTTPMethodLock AttackLayer7SummaryVerticalParamsHTTPMethod = "LOCK"` - `const AttackLayer7SummaryVerticalParamsHTTPMethodMerge AttackLayer7SummaryVerticalParamsHTTPMethod = "MERGE"` - `const AttackLayer7SummaryVerticalParamsHTTPMethodMkactivity AttackLayer7SummaryVerticalParamsHTTPMethod = "MKACTIVITY"` - `const AttackLayer7SummaryVerticalParamsHTTPMethodMkworkspace AttackLayer7SummaryVerticalParamsHTTPMethod = "MKWORKSPACE"` - `const AttackLayer7SummaryVerticalParamsHTTPMethodMove AttackLayer7SummaryVerticalParamsHTTPMethod = "MOVE"` - `const AttackLayer7SummaryVerticalParamsHTTPMethodNotify AttackLayer7SummaryVerticalParamsHTTPMethod = "NOTIFY"` - `const AttackLayer7SummaryVerticalParamsHTTPMethodOrderpatch AttackLayer7SummaryVerticalParamsHTTPMethod = "ORDERPATCH"` - `const AttackLayer7SummaryVerticalParamsHTTPMethodPoll AttackLayer7SummaryVerticalParamsHTTPMethod = "POLL"` - `const AttackLayer7SummaryVerticalParamsHTTPMethodProppatch AttackLayer7SummaryVerticalParamsHTTPMethod = "PROPPATCH"` - `const AttackLayer7SummaryVerticalParamsHTTPMethodReport AttackLayer7SummaryVerticalParamsHTTPMethod = "REPORT"` - `const AttackLayer7SummaryVerticalParamsHTTPMethodSearch AttackLayer7SummaryVerticalParamsHTTPMethod = "SEARCH"` - `const AttackLayer7SummaryVerticalParamsHTTPMethodSubscribe AttackLayer7SummaryVerticalParamsHTTPMethod = "SUBSCRIBE"` - `const AttackLayer7SummaryVerticalParamsHTTPMethodTrace AttackLayer7SummaryVerticalParamsHTTPMethod = "TRACE"` - `const AttackLayer7SummaryVerticalParamsHTTPMethodUncheckout AttackLayer7SummaryVerticalParamsHTTPMethod = "UNCHECKOUT"` - `const AttackLayer7SummaryVerticalParamsHTTPMethodUnlock AttackLayer7SummaryVerticalParamsHTTPMethod = "UNLOCK"` - `const AttackLayer7SummaryVerticalParamsHTTPMethodUnsubscribe AttackLayer7SummaryVerticalParamsHTTPMethod = "UNSUBSCRIBE"` - `const AttackLayer7SummaryVerticalParamsHTTPMethodUpdate AttackLayer7SummaryVerticalParamsHTTPMethod = "UPDATE"` - `const AttackLayer7SummaryVerticalParamsHTTPMethodVersioncontrol AttackLayer7SummaryVerticalParamsHTTPMethod = "VERSIONCONTROL"` - `const AttackLayer7SummaryVerticalParamsHTTPMethodBaselinecontrol AttackLayer7SummaryVerticalParamsHTTPMethod = "BASELINECONTROL"` - `const AttackLayer7SummaryVerticalParamsHTTPMethodXmsenumatts AttackLayer7SummaryVerticalParamsHTTPMethod = "XMSENUMATTS"` - `const AttackLayer7SummaryVerticalParamsHTTPMethodRpcOutData AttackLayer7SummaryVerticalParamsHTTPMethod = "RPC_OUT_DATA"` - `const AttackLayer7SummaryVerticalParamsHTTPMethodRpcInData AttackLayer7SummaryVerticalParamsHTTPMethod = "RPC_IN_DATA"` - `const AttackLayer7SummaryVerticalParamsHTTPMethodJson AttackLayer7SummaryVerticalParamsHTTPMethod = "JSON"` - `const AttackLayer7SummaryVerticalParamsHTTPMethodCook AttackLayer7SummaryVerticalParamsHTTPMethod = "COOK"` - `const AttackLayer7SummaryVerticalParamsHTTPMethodTrack AttackLayer7SummaryVerticalParamsHTTPMethod = "TRACK"` - `HTTPVersion param.Field[[]AttackLayer7SummaryVerticalParamsHTTPVersion]` Filters results by HTTP version. - `const AttackLayer7SummaryVerticalParamsHTTPVersionHttPv1 AttackLayer7SummaryVerticalParamsHTTPVersion = "HTTPv1"` - `const AttackLayer7SummaryVerticalParamsHTTPVersionHttPv2 AttackLayer7SummaryVerticalParamsHTTPVersion = "HTTPv2"` - `const AttackLayer7SummaryVerticalParamsHTTPVersionHttPv3 AttackLayer7SummaryVerticalParamsHTTPVersion = "HTTPv3"` - `IPVersion param.Field[[]AttackLayer7SummaryVerticalParamsIPVersion]` Filters results by IP version (Ipv4 vs. IPv6). - `const AttackLayer7SummaryVerticalParamsIPVersionIPv4 AttackLayer7SummaryVerticalParamsIPVersion = "IPv4"` - `const AttackLayer7SummaryVerticalParamsIPVersionIPv6 AttackLayer7SummaryVerticalParamsIPVersion = "IPv6"` - `LimitPerGroup param.Field[int64]` 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]` 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. - `MitigationProduct param.Field[[]AttackLayer7SummaryVerticalParamsMitigationProduct]` Filters the results by layer 7 mitigation product. - `const AttackLayer7SummaryVerticalParamsMitigationProductDDoS AttackLayer7SummaryVerticalParamsMitigationProduct = "DDOS"` - `const AttackLayer7SummaryVerticalParamsMitigationProductWAF AttackLayer7SummaryVerticalParamsMitigationProduct = "WAF"` - `const AttackLayer7SummaryVerticalParamsMitigationProductBotManagement AttackLayer7SummaryVerticalParamsMitigationProduct = "BOT_MANAGEMENT"` - `const AttackLayer7SummaryVerticalParamsMitigationProductAccessRules AttackLayer7SummaryVerticalParamsMitigationProduct = "ACCESS_RULES"` - `const AttackLayer7SummaryVerticalParamsMitigationProductIPReputation AttackLayer7SummaryVerticalParamsMitigationProduct = "IP_REPUTATION"` - `const AttackLayer7SummaryVerticalParamsMitigationProductAPIShield AttackLayer7SummaryVerticalParamsMitigationProduct = "API_SHIELD"` - `const AttackLayer7SummaryVerticalParamsMitigationProductDataLossPrevention AttackLayer7SummaryVerticalParamsMitigationProduct = "DATA_LOSS_PREVENTION"` - `Name param.Field[[]string]` Array of names used to label the series in the response. ### Returns - `type AttackLayer7SummaryVerticalResponse struct{…}` - `Meta AttackLayer7SummaryVerticalResponseMeta` Metadata for the results. - `ConfidenceInfo AttackLayer7SummaryVerticalResponseMetaConfidenceInfo` - `Annotations []AttackLayer7SummaryVerticalResponseMetaConfidenceInfoAnnotation` - `DataSource AttackLayer7SummaryVerticalResponseMetaConfidenceInfoAnnotationsDataSource` Data source for annotations. - `const AttackLayer7SummaryVerticalResponseMetaConfidenceInfoAnnotationsDataSourceAll AttackLayer7SummaryVerticalResponseMetaConfidenceInfoAnnotationsDataSource = "ALL"` - `const AttackLayer7SummaryVerticalResponseMetaConfidenceInfoAnnotationsDataSourceAIBots AttackLayer7SummaryVerticalResponseMetaConfidenceInfoAnnotationsDataSource = "AI_BOTS"` - `const AttackLayer7SummaryVerticalResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway AttackLayer7SummaryVerticalResponseMetaConfidenceInfoAnnotationsDataSource = "AI_GATEWAY"` - `const AttackLayer7SummaryVerticalResponseMetaConfidenceInfoAnnotationsDataSourceBGP AttackLayer7SummaryVerticalResponseMetaConfidenceInfoAnnotationsDataSource = "BGP"` - `const AttackLayer7SummaryVerticalResponseMetaConfidenceInfoAnnotationsDataSourceBots AttackLayer7SummaryVerticalResponseMetaConfidenceInfoAnnotationsDataSource = "BOTS"` - `const AttackLayer7SummaryVerticalResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly AttackLayer7SummaryVerticalResponseMetaConfidenceInfoAnnotationsDataSource = "CONNECTION_ANOMALY"` - `const AttackLayer7SummaryVerticalResponseMetaConfidenceInfoAnnotationsDataSourceCT AttackLayer7SummaryVerticalResponseMetaConfidenceInfoAnnotationsDataSource = "CT"` - `const AttackLayer7SummaryVerticalResponseMetaConfidenceInfoAnnotationsDataSourceDNS AttackLayer7SummaryVerticalResponseMetaConfidenceInfoAnnotationsDataSource = "DNS"` - `const AttackLayer7SummaryVerticalResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude AttackLayer7SummaryVerticalResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_MAGNITUDE"` - `const AttackLayer7SummaryVerticalResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112 AttackLayer7SummaryVerticalResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_AS112"` - `const AttackLayer7SummaryVerticalResponseMetaConfidenceInfoAnnotationsDataSourceDos AttackLayer7SummaryVerticalResponseMetaConfidenceInfoAnnotationsDataSource = "DOS"` - `const AttackLayer7SummaryVerticalResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting AttackLayer7SummaryVerticalResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_ROUTING"` - `const AttackLayer7SummaryVerticalResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity AttackLayer7SummaryVerticalResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_SECURITY"` - `const AttackLayer7SummaryVerticalResponseMetaConfidenceInfoAnnotationsDataSourceFw AttackLayer7SummaryVerticalResponseMetaConfidenceInfoAnnotationsDataSource = "FW"` - `const AttackLayer7SummaryVerticalResponseMetaConfidenceInfoAnnotationsDataSourceFwPg AttackLayer7SummaryVerticalResponseMetaConfidenceInfoAnnotationsDataSource = "FW_PG"` - `const AttackLayer7SummaryVerticalResponseMetaConfidenceInfoAnnotationsDataSourceHTTP AttackLayer7SummaryVerticalResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP"` - `const AttackLayer7SummaryVerticalResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl AttackLayer7SummaryVerticalResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CONTROL"` - `const AttackLayer7SummaryVerticalResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer AttackLayer7SummaryVerticalResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CRAWLER_REFERER"` - `const AttackLayer7SummaryVerticalResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins AttackLayer7SummaryVerticalResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_ORIGINS"` - `const AttackLayer7SummaryVerticalResponseMetaConfidenceInfoAnnotationsDataSourceIQI AttackLayer7SummaryVerticalResponseMetaConfidenceInfoAnnotationsDataSource = "IQI"` - `const AttackLayer7SummaryVerticalResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials AttackLayer7SummaryVerticalResponseMetaConfidenceInfoAnnotationsDataSource = "LEAKED_CREDENTIALS"` - `const AttackLayer7SummaryVerticalResponseMetaConfidenceInfoAnnotationsDataSourceNet AttackLayer7SummaryVerticalResponseMetaConfidenceInfoAnnotationsDataSource = "NET"` - `const AttackLayer7SummaryVerticalResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT AttackLayer7SummaryVerticalResponseMetaConfidenceInfoAnnotationsDataSource = "ROBOTS_TXT"` - `const AttackLayer7SummaryVerticalResponseMetaConfidenceInfoAnnotationsDataSourceSpeed AttackLayer7SummaryVerticalResponseMetaConfidenceInfoAnnotationsDataSource = "SPEED"` - `const AttackLayer7SummaryVerticalResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI AttackLayer7SummaryVerticalResponseMetaConfidenceInfoAnnotationsDataSource = "WORKERS_AI"` - `Description string` - `EndDate Time` - `EventType AttackLayer7SummaryVerticalResponseMetaConfidenceInfoAnnotationsEventType` Event type for annotations. - `const AttackLayer7SummaryVerticalResponseMetaConfidenceInfoAnnotationsEventTypeEvent AttackLayer7SummaryVerticalResponseMetaConfidenceInfoAnnotationsEventType = "EVENT"` - `const AttackLayer7SummaryVerticalResponseMetaConfidenceInfoAnnotationsEventTypeGeneral AttackLayer7SummaryVerticalResponseMetaConfidenceInfoAnnotationsEventType = "GENERAL"` - `const AttackLayer7SummaryVerticalResponseMetaConfidenceInfoAnnotationsEventTypeOutage AttackLayer7SummaryVerticalResponseMetaConfidenceInfoAnnotationsEventType = "OUTAGE"` - `const AttackLayer7SummaryVerticalResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection AttackLayer7SummaryVerticalResponseMetaConfidenceInfoAnnotationsEventType = "PARTIAL_PROJECTION"` - `const AttackLayer7SummaryVerticalResponseMetaConfidenceInfoAnnotationsEventTypePipeline AttackLayer7SummaryVerticalResponseMetaConfidenceInfoAnnotationsEventType = "PIPELINE"` - `const AttackLayer7SummaryVerticalResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly AttackLayer7SummaryVerticalResponseMetaConfidenceInfoAnnotationsEventType = "TRAFFIC_ANOMALY"` - `IsInstantaneous bool` Whether event is a single point in time or a time range. - `LinkedURL string` - `StartDate Time` - `Level int64` Provides an indication of how much confidence Cloudflare has in the data. - `DateRange []AttackLayer7SummaryVerticalResponseMetaDateRange` - `EndTime Time` Adjusted end of date range. - `StartTime Time` Adjusted start of date range. - `LastUpdated Time` Timestamp of the last dataset update. - `Normalization AttackLayer7SummaryVerticalResponseMetaNormalization` Normalization method applied to the results. Refer to [Normalization methods](https://developers.cloudflare.com/radar/concepts/normalization/). - `const AttackLayer7SummaryVerticalResponseMetaNormalizationPercentage AttackLayer7SummaryVerticalResponseMetaNormalization = "PERCENTAGE"` - `const AttackLayer7SummaryVerticalResponseMetaNormalizationMin0Max AttackLayer7SummaryVerticalResponseMetaNormalization = "MIN0_MAX"` - `const AttackLayer7SummaryVerticalResponseMetaNormalizationMinMax AttackLayer7SummaryVerticalResponseMetaNormalization = "MIN_MAX"` - `const AttackLayer7SummaryVerticalResponseMetaNormalizationRawValues AttackLayer7SummaryVerticalResponseMetaNormalization = "RAW_VALUES"` - `const AttackLayer7SummaryVerticalResponseMetaNormalizationPercentageChange AttackLayer7SummaryVerticalResponseMetaNormalization = "PERCENTAGE_CHANGE"` - `const AttackLayer7SummaryVerticalResponseMetaNormalizationRollingAverage AttackLayer7SummaryVerticalResponseMetaNormalization = "ROLLING_AVERAGE"` - `const AttackLayer7SummaryVerticalResponseMetaNormalizationOverlappedPercentage AttackLayer7SummaryVerticalResponseMetaNormalization = "OVERLAPPED_PERCENTAGE"` - `const AttackLayer7SummaryVerticalResponseMetaNormalizationRatio AttackLayer7SummaryVerticalResponseMetaNormalization = "RATIO"` - `Units []AttackLayer7SummaryVerticalResponseMetaUnit` Measurement units for the results. - `Name string` - `Value string` - `Summary0 map[string, string]` ### Example ```go 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.Layer7.Summary.Vertical(context.TODO(), radar.AttackLayer7SummaryVerticalParams{ }) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", response.Meta) } ``` #### Response ```json { "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": { "Internet and Telecom": "5.519081" } }, "success": true } ``` # Timeseries Groups ## Get layer 7 attacks by target industries time series `client.Radar.Attacks.Layer7.TimeseriesGroups.Industry(ctx, query) (*AttackLayer7TimeseriesGroupIndustryResponse, error)` **get** `/radar/attacks/layer7/timeseries_groups/industry` Retrieves the distribution of layer 7 attacks by targeted industry over time. ### Parameters - `query AttackLayer7TimeseriesGroupIndustryParams` - `AggInterval param.Field[AttackLayer7TimeseriesGroupIndustryParamsAggInterval]` Aggregation interval of the results (e.g., in 15 minutes or 1 hour intervals). Refer to [Aggregation intervals](https://developers.cloudflare.com/radar/concepts/aggregation-intervals/). - `const AttackLayer7TimeseriesGroupIndustryParamsAggInterval15m AttackLayer7TimeseriesGroupIndustryParamsAggInterval = "15m"` - `const AttackLayer7TimeseriesGroupIndustryParamsAggInterval1h AttackLayer7TimeseriesGroupIndustryParamsAggInterval = "1h"` - `const AttackLayer7TimeseriesGroupIndustryParamsAggInterval1d AttackLayer7TimeseriesGroupIndustryParamsAggInterval = "1d"` - `const AttackLayer7TimeseriesGroupIndustryParamsAggInterval1w AttackLayer7TimeseriesGroupIndustryParamsAggInterval = "1w"` - `ASN param.Field[[]string]` Filters results by Autonomous System. Specify one or more Autonomous System Numbers (ASNs) as a comma-separated list. Prefix with `-` to exclude ASNs from results. For example, `-174, 3356` excludes results from AS174, but includes results from AS3356. - `Continent param.Field[[]string]` 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]` End of the date range (inclusive). - `DateRange param.Field[[]string]` 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]` Start of the date range. - `Format param.Field[AttackLayer7TimeseriesGroupIndustryParamsFormat]` Format in which results will be returned. - `const AttackLayer7TimeseriesGroupIndustryParamsFormatJson AttackLayer7TimeseriesGroupIndustryParamsFormat = "JSON"` - `const AttackLayer7TimeseriesGroupIndustryParamsFormatCsv AttackLayer7TimeseriesGroupIndustryParamsFormat = "CSV"` - `HTTPMethod param.Field[[]AttackLayer7TimeseriesGroupIndustryParamsHTTPMethod]` Filters results by HTTP method. - `const AttackLayer7TimeseriesGroupIndustryParamsHTTPMethodGet AttackLayer7TimeseriesGroupIndustryParamsHTTPMethod = "GET"` - `const AttackLayer7TimeseriesGroupIndustryParamsHTTPMethodPost AttackLayer7TimeseriesGroupIndustryParamsHTTPMethod = "POST"` - `const AttackLayer7TimeseriesGroupIndustryParamsHTTPMethodDelete AttackLayer7TimeseriesGroupIndustryParamsHTTPMethod = "DELETE"` - `const AttackLayer7TimeseriesGroupIndustryParamsHTTPMethodPut AttackLayer7TimeseriesGroupIndustryParamsHTTPMethod = "PUT"` - `const AttackLayer7TimeseriesGroupIndustryParamsHTTPMethodHead AttackLayer7TimeseriesGroupIndustryParamsHTTPMethod = "HEAD"` - `const AttackLayer7TimeseriesGroupIndustryParamsHTTPMethodPurge AttackLayer7TimeseriesGroupIndustryParamsHTTPMethod = "PURGE"` - `const AttackLayer7TimeseriesGroupIndustryParamsHTTPMethodOptions AttackLayer7TimeseriesGroupIndustryParamsHTTPMethod = "OPTIONS"` - `const AttackLayer7TimeseriesGroupIndustryParamsHTTPMethodPropfind AttackLayer7TimeseriesGroupIndustryParamsHTTPMethod = "PROPFIND"` - `const AttackLayer7TimeseriesGroupIndustryParamsHTTPMethodMkcol AttackLayer7TimeseriesGroupIndustryParamsHTTPMethod = "MKCOL"` - `const AttackLayer7TimeseriesGroupIndustryParamsHTTPMethodPatch AttackLayer7TimeseriesGroupIndustryParamsHTTPMethod = "PATCH"` - `const AttackLayer7TimeseriesGroupIndustryParamsHTTPMethodACL AttackLayer7TimeseriesGroupIndustryParamsHTTPMethod = "ACL"` - `const AttackLayer7TimeseriesGroupIndustryParamsHTTPMethodBcopy AttackLayer7TimeseriesGroupIndustryParamsHTTPMethod = "BCOPY"` - `const AttackLayer7TimeseriesGroupIndustryParamsHTTPMethodBdelete AttackLayer7TimeseriesGroupIndustryParamsHTTPMethod = "BDELETE"` - `const AttackLayer7TimeseriesGroupIndustryParamsHTTPMethodBmove AttackLayer7TimeseriesGroupIndustryParamsHTTPMethod = "BMOVE"` - `const AttackLayer7TimeseriesGroupIndustryParamsHTTPMethodBpropfind AttackLayer7TimeseriesGroupIndustryParamsHTTPMethod = "BPROPFIND"` - `const AttackLayer7TimeseriesGroupIndustryParamsHTTPMethodBproppatch AttackLayer7TimeseriesGroupIndustryParamsHTTPMethod = "BPROPPATCH"` - `const AttackLayer7TimeseriesGroupIndustryParamsHTTPMethodCheckin AttackLayer7TimeseriesGroupIndustryParamsHTTPMethod = "CHECKIN"` - `const AttackLayer7TimeseriesGroupIndustryParamsHTTPMethodCheckout AttackLayer7TimeseriesGroupIndustryParamsHTTPMethod = "CHECKOUT"` - `const AttackLayer7TimeseriesGroupIndustryParamsHTTPMethodConnect AttackLayer7TimeseriesGroupIndustryParamsHTTPMethod = "CONNECT"` - `const AttackLayer7TimeseriesGroupIndustryParamsHTTPMethodCopy AttackLayer7TimeseriesGroupIndustryParamsHTTPMethod = "COPY"` - `const AttackLayer7TimeseriesGroupIndustryParamsHTTPMethodLabel AttackLayer7TimeseriesGroupIndustryParamsHTTPMethod = "LABEL"` - `const AttackLayer7TimeseriesGroupIndustryParamsHTTPMethodLock AttackLayer7TimeseriesGroupIndustryParamsHTTPMethod = "LOCK"` - `const AttackLayer7TimeseriesGroupIndustryParamsHTTPMethodMerge AttackLayer7TimeseriesGroupIndustryParamsHTTPMethod = "MERGE"` - `const AttackLayer7TimeseriesGroupIndustryParamsHTTPMethodMkactivity AttackLayer7TimeseriesGroupIndustryParamsHTTPMethod = "MKACTIVITY"` - `const AttackLayer7TimeseriesGroupIndustryParamsHTTPMethodMkworkspace AttackLayer7TimeseriesGroupIndustryParamsHTTPMethod = "MKWORKSPACE"` - `const AttackLayer7TimeseriesGroupIndustryParamsHTTPMethodMove AttackLayer7TimeseriesGroupIndustryParamsHTTPMethod = "MOVE"` - `const AttackLayer7TimeseriesGroupIndustryParamsHTTPMethodNotify AttackLayer7TimeseriesGroupIndustryParamsHTTPMethod = "NOTIFY"` - `const AttackLayer7TimeseriesGroupIndustryParamsHTTPMethodOrderpatch AttackLayer7TimeseriesGroupIndustryParamsHTTPMethod = "ORDERPATCH"` - `const AttackLayer7TimeseriesGroupIndustryParamsHTTPMethodPoll AttackLayer7TimeseriesGroupIndustryParamsHTTPMethod = "POLL"` - `const AttackLayer7TimeseriesGroupIndustryParamsHTTPMethodProppatch AttackLayer7TimeseriesGroupIndustryParamsHTTPMethod = "PROPPATCH"` - `const AttackLayer7TimeseriesGroupIndustryParamsHTTPMethodReport AttackLayer7TimeseriesGroupIndustryParamsHTTPMethod = "REPORT"` - `const AttackLayer7TimeseriesGroupIndustryParamsHTTPMethodSearch AttackLayer7TimeseriesGroupIndustryParamsHTTPMethod = "SEARCH"` - `const AttackLayer7TimeseriesGroupIndustryParamsHTTPMethodSubscribe AttackLayer7TimeseriesGroupIndustryParamsHTTPMethod = "SUBSCRIBE"` - `const AttackLayer7TimeseriesGroupIndustryParamsHTTPMethodTrace AttackLayer7TimeseriesGroupIndustryParamsHTTPMethod = "TRACE"` - `const AttackLayer7TimeseriesGroupIndustryParamsHTTPMethodUncheckout AttackLayer7TimeseriesGroupIndustryParamsHTTPMethod = "UNCHECKOUT"` - `const AttackLayer7TimeseriesGroupIndustryParamsHTTPMethodUnlock AttackLayer7TimeseriesGroupIndustryParamsHTTPMethod = "UNLOCK"` - `const AttackLayer7TimeseriesGroupIndustryParamsHTTPMethodUnsubscribe AttackLayer7TimeseriesGroupIndustryParamsHTTPMethod = "UNSUBSCRIBE"` - `const AttackLayer7TimeseriesGroupIndustryParamsHTTPMethodUpdate AttackLayer7TimeseriesGroupIndustryParamsHTTPMethod = "UPDATE"` - `const AttackLayer7TimeseriesGroupIndustryParamsHTTPMethodVersioncontrol AttackLayer7TimeseriesGroupIndustryParamsHTTPMethod = "VERSIONCONTROL"` - `const AttackLayer7TimeseriesGroupIndustryParamsHTTPMethodBaselinecontrol AttackLayer7TimeseriesGroupIndustryParamsHTTPMethod = "BASELINECONTROL"` - `const AttackLayer7TimeseriesGroupIndustryParamsHTTPMethodXmsenumatts AttackLayer7TimeseriesGroupIndustryParamsHTTPMethod = "XMSENUMATTS"` - `const AttackLayer7TimeseriesGroupIndustryParamsHTTPMethodRpcOutData AttackLayer7TimeseriesGroupIndustryParamsHTTPMethod = "RPC_OUT_DATA"` - `const AttackLayer7TimeseriesGroupIndustryParamsHTTPMethodRpcInData AttackLayer7TimeseriesGroupIndustryParamsHTTPMethod = "RPC_IN_DATA"` - `const AttackLayer7TimeseriesGroupIndustryParamsHTTPMethodJson AttackLayer7TimeseriesGroupIndustryParamsHTTPMethod = "JSON"` - `const AttackLayer7TimeseriesGroupIndustryParamsHTTPMethodCook AttackLayer7TimeseriesGroupIndustryParamsHTTPMethod = "COOK"` - `const AttackLayer7TimeseriesGroupIndustryParamsHTTPMethodTrack AttackLayer7TimeseriesGroupIndustryParamsHTTPMethod = "TRACK"` - `HTTPVersion param.Field[[]AttackLayer7TimeseriesGroupIndustryParamsHTTPVersion]` Filters results by HTTP version. - `const AttackLayer7TimeseriesGroupIndustryParamsHTTPVersionHttPv1 AttackLayer7TimeseriesGroupIndustryParamsHTTPVersion = "HTTPv1"` - `const AttackLayer7TimeseriesGroupIndustryParamsHTTPVersionHttPv2 AttackLayer7TimeseriesGroupIndustryParamsHTTPVersion = "HTTPv2"` - `const AttackLayer7TimeseriesGroupIndustryParamsHTTPVersionHttPv3 AttackLayer7TimeseriesGroupIndustryParamsHTTPVersion = "HTTPv3"` - `IPVersion param.Field[[]AttackLayer7TimeseriesGroupIndustryParamsIPVersion]` Filters results by IP version (Ipv4 vs. IPv6). - `const AttackLayer7TimeseriesGroupIndustryParamsIPVersionIPv4 AttackLayer7TimeseriesGroupIndustryParamsIPVersion = "IPv4"` - `const AttackLayer7TimeseriesGroupIndustryParamsIPVersionIPv6 AttackLayer7TimeseriesGroupIndustryParamsIPVersion = "IPv6"` - `LimitPerGroup param.Field[int64]` 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]` 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. - `MitigationProduct param.Field[[]AttackLayer7TimeseriesGroupIndustryParamsMitigationProduct]` Filters the results by layer 7 mitigation product. - `const AttackLayer7TimeseriesGroupIndustryParamsMitigationProductDDoS AttackLayer7TimeseriesGroupIndustryParamsMitigationProduct = "DDOS"` - `const AttackLayer7TimeseriesGroupIndustryParamsMitigationProductWAF AttackLayer7TimeseriesGroupIndustryParamsMitigationProduct = "WAF"` - `const AttackLayer7TimeseriesGroupIndustryParamsMitigationProductBotManagement AttackLayer7TimeseriesGroupIndustryParamsMitigationProduct = "BOT_MANAGEMENT"` - `const AttackLayer7TimeseriesGroupIndustryParamsMitigationProductAccessRules AttackLayer7TimeseriesGroupIndustryParamsMitigationProduct = "ACCESS_RULES"` - `const AttackLayer7TimeseriesGroupIndustryParamsMitigationProductIPReputation AttackLayer7TimeseriesGroupIndustryParamsMitigationProduct = "IP_REPUTATION"` - `const AttackLayer7TimeseriesGroupIndustryParamsMitigationProductAPIShield AttackLayer7TimeseriesGroupIndustryParamsMitigationProduct = "API_SHIELD"` - `const AttackLayer7TimeseriesGroupIndustryParamsMitigationProductDataLossPrevention AttackLayer7TimeseriesGroupIndustryParamsMitigationProduct = "DATA_LOSS_PREVENTION"` - `Name param.Field[[]string]` Array of names used to label the series in the response. - `Normalization param.Field[AttackLayer7TimeseriesGroupIndustryParamsNormalization]` Normalization method applied to the results. Refer to [Normalization methods](https://developers.cloudflare.com/radar/concepts/normalization/). - `const AttackLayer7TimeseriesGroupIndustryParamsNormalizationPercentage AttackLayer7TimeseriesGroupIndustryParamsNormalization = "PERCENTAGE"` - `const AttackLayer7TimeseriesGroupIndustryParamsNormalizationMin0Max AttackLayer7TimeseriesGroupIndustryParamsNormalization = "MIN0_MAX"` ### Returns - `type AttackLayer7TimeseriesGroupIndustryResponse struct{…}` - `Meta AttackLayer7TimeseriesGroupIndustryResponseMeta` Metadata for the results. - `AggInterval AttackLayer7TimeseriesGroupIndustryResponseMetaAggInterval` Aggregation interval of the results (e.g., in 15 minutes or 1 hour intervals). Refer to [Aggregation intervals](https://developers.cloudflare.com/radar/concepts/aggregation-intervals/). - `const AttackLayer7TimeseriesGroupIndustryResponseMetaAggIntervalFifteenMinutes AttackLayer7TimeseriesGroupIndustryResponseMetaAggInterval = "FIFTEEN_MINUTES"` - `const AttackLayer7TimeseriesGroupIndustryResponseMetaAggIntervalOneHour AttackLayer7TimeseriesGroupIndustryResponseMetaAggInterval = "ONE_HOUR"` - `const AttackLayer7TimeseriesGroupIndustryResponseMetaAggIntervalOneDay AttackLayer7TimeseriesGroupIndustryResponseMetaAggInterval = "ONE_DAY"` - `const AttackLayer7TimeseriesGroupIndustryResponseMetaAggIntervalOneWeek AttackLayer7TimeseriesGroupIndustryResponseMetaAggInterval = "ONE_WEEK"` - `const AttackLayer7TimeseriesGroupIndustryResponseMetaAggIntervalOneMonth AttackLayer7TimeseriesGroupIndustryResponseMetaAggInterval = "ONE_MONTH"` - `ConfidenceInfo AttackLayer7TimeseriesGroupIndustryResponseMetaConfidenceInfo` - `Annotations []AttackLayer7TimeseriesGroupIndustryResponseMetaConfidenceInfoAnnotation` - `DataSource AttackLayer7TimeseriesGroupIndustryResponseMetaConfidenceInfoAnnotationsDataSource` Data source for annotations. - `const AttackLayer7TimeseriesGroupIndustryResponseMetaConfidenceInfoAnnotationsDataSourceAll AttackLayer7TimeseriesGroupIndustryResponseMetaConfidenceInfoAnnotationsDataSource = "ALL"` - `const AttackLayer7TimeseriesGroupIndustryResponseMetaConfidenceInfoAnnotationsDataSourceAIBots AttackLayer7TimeseriesGroupIndustryResponseMetaConfidenceInfoAnnotationsDataSource = "AI_BOTS"` - `const AttackLayer7TimeseriesGroupIndustryResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway AttackLayer7TimeseriesGroupIndustryResponseMetaConfidenceInfoAnnotationsDataSource = "AI_GATEWAY"` - `const AttackLayer7TimeseriesGroupIndustryResponseMetaConfidenceInfoAnnotationsDataSourceBGP AttackLayer7TimeseriesGroupIndustryResponseMetaConfidenceInfoAnnotationsDataSource = "BGP"` - `const AttackLayer7TimeseriesGroupIndustryResponseMetaConfidenceInfoAnnotationsDataSourceBots AttackLayer7TimeseriesGroupIndustryResponseMetaConfidenceInfoAnnotationsDataSource = "BOTS"` - `const AttackLayer7TimeseriesGroupIndustryResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly AttackLayer7TimeseriesGroupIndustryResponseMetaConfidenceInfoAnnotationsDataSource = "CONNECTION_ANOMALY"` - `const AttackLayer7TimeseriesGroupIndustryResponseMetaConfidenceInfoAnnotationsDataSourceCT AttackLayer7TimeseriesGroupIndustryResponseMetaConfidenceInfoAnnotationsDataSource = "CT"` - `const AttackLayer7TimeseriesGroupIndustryResponseMetaConfidenceInfoAnnotationsDataSourceDNS AttackLayer7TimeseriesGroupIndustryResponseMetaConfidenceInfoAnnotationsDataSource = "DNS"` - `const AttackLayer7TimeseriesGroupIndustryResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude AttackLayer7TimeseriesGroupIndustryResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_MAGNITUDE"` - `const AttackLayer7TimeseriesGroupIndustryResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112 AttackLayer7TimeseriesGroupIndustryResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_AS112"` - `const AttackLayer7TimeseriesGroupIndustryResponseMetaConfidenceInfoAnnotationsDataSourceDos AttackLayer7TimeseriesGroupIndustryResponseMetaConfidenceInfoAnnotationsDataSource = "DOS"` - `const AttackLayer7TimeseriesGroupIndustryResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting AttackLayer7TimeseriesGroupIndustryResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_ROUTING"` - `const AttackLayer7TimeseriesGroupIndustryResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity AttackLayer7TimeseriesGroupIndustryResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_SECURITY"` - `const AttackLayer7TimeseriesGroupIndustryResponseMetaConfidenceInfoAnnotationsDataSourceFw AttackLayer7TimeseriesGroupIndustryResponseMetaConfidenceInfoAnnotationsDataSource = "FW"` - `const AttackLayer7TimeseriesGroupIndustryResponseMetaConfidenceInfoAnnotationsDataSourceFwPg AttackLayer7TimeseriesGroupIndustryResponseMetaConfidenceInfoAnnotationsDataSource = "FW_PG"` - `const AttackLayer7TimeseriesGroupIndustryResponseMetaConfidenceInfoAnnotationsDataSourceHTTP AttackLayer7TimeseriesGroupIndustryResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP"` - `const AttackLayer7TimeseriesGroupIndustryResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl AttackLayer7TimeseriesGroupIndustryResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CONTROL"` - `const AttackLayer7TimeseriesGroupIndustryResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer AttackLayer7TimeseriesGroupIndustryResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CRAWLER_REFERER"` - `const AttackLayer7TimeseriesGroupIndustryResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins AttackLayer7TimeseriesGroupIndustryResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_ORIGINS"` - `const AttackLayer7TimeseriesGroupIndustryResponseMetaConfidenceInfoAnnotationsDataSourceIQI AttackLayer7TimeseriesGroupIndustryResponseMetaConfidenceInfoAnnotationsDataSource = "IQI"` - `const AttackLayer7TimeseriesGroupIndustryResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials AttackLayer7TimeseriesGroupIndustryResponseMetaConfidenceInfoAnnotationsDataSource = "LEAKED_CREDENTIALS"` - `const AttackLayer7TimeseriesGroupIndustryResponseMetaConfidenceInfoAnnotationsDataSourceNet AttackLayer7TimeseriesGroupIndustryResponseMetaConfidenceInfoAnnotationsDataSource = "NET"` - `const AttackLayer7TimeseriesGroupIndustryResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT AttackLayer7TimeseriesGroupIndustryResponseMetaConfidenceInfoAnnotationsDataSource = "ROBOTS_TXT"` - `const AttackLayer7TimeseriesGroupIndustryResponseMetaConfidenceInfoAnnotationsDataSourceSpeed AttackLayer7TimeseriesGroupIndustryResponseMetaConfidenceInfoAnnotationsDataSource = "SPEED"` - `const AttackLayer7TimeseriesGroupIndustryResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI AttackLayer7TimeseriesGroupIndustryResponseMetaConfidenceInfoAnnotationsDataSource = "WORKERS_AI"` - `Description string` - `EndDate Time` - `EventType AttackLayer7TimeseriesGroupIndustryResponseMetaConfidenceInfoAnnotationsEventType` Event type for annotations. - `const AttackLayer7TimeseriesGroupIndustryResponseMetaConfidenceInfoAnnotationsEventTypeEvent AttackLayer7TimeseriesGroupIndustryResponseMetaConfidenceInfoAnnotationsEventType = "EVENT"` - `const AttackLayer7TimeseriesGroupIndustryResponseMetaConfidenceInfoAnnotationsEventTypeGeneral AttackLayer7TimeseriesGroupIndustryResponseMetaConfidenceInfoAnnotationsEventType = "GENERAL"` - `const AttackLayer7TimeseriesGroupIndustryResponseMetaConfidenceInfoAnnotationsEventTypeOutage AttackLayer7TimeseriesGroupIndustryResponseMetaConfidenceInfoAnnotationsEventType = "OUTAGE"` - `const AttackLayer7TimeseriesGroupIndustryResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection AttackLayer7TimeseriesGroupIndustryResponseMetaConfidenceInfoAnnotationsEventType = "PARTIAL_PROJECTION"` - `const AttackLayer7TimeseriesGroupIndustryResponseMetaConfidenceInfoAnnotationsEventTypePipeline AttackLayer7TimeseriesGroupIndustryResponseMetaConfidenceInfoAnnotationsEventType = "PIPELINE"` - `const AttackLayer7TimeseriesGroupIndustryResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly AttackLayer7TimeseriesGroupIndustryResponseMetaConfidenceInfoAnnotationsEventType = "TRAFFIC_ANOMALY"` - `IsInstantaneous bool` Whether event is a single point in time or a time range. - `LinkedURL string` - `StartDate Time` - `Level int64` Provides an indication of how much confidence Cloudflare has in the data. - `DateRange []AttackLayer7TimeseriesGroupIndustryResponseMetaDateRange` - `EndTime Time` Adjusted end of date range. - `StartTime Time` Adjusted start of date range. - `LastUpdated Time` Timestamp of the last dataset update. - `Normalization AttackLayer7TimeseriesGroupIndustryResponseMetaNormalization` Normalization method applied to the results. Refer to [Normalization methods](https://developers.cloudflare.com/radar/concepts/normalization/). - `const AttackLayer7TimeseriesGroupIndustryResponseMetaNormalizationPercentage AttackLayer7TimeseriesGroupIndustryResponseMetaNormalization = "PERCENTAGE"` - `const AttackLayer7TimeseriesGroupIndustryResponseMetaNormalizationMin0Max AttackLayer7TimeseriesGroupIndustryResponseMetaNormalization = "MIN0_MAX"` - `const AttackLayer7TimeseriesGroupIndustryResponseMetaNormalizationMinMax AttackLayer7TimeseriesGroupIndustryResponseMetaNormalization = "MIN_MAX"` - `const AttackLayer7TimeseriesGroupIndustryResponseMetaNormalizationRawValues AttackLayer7TimeseriesGroupIndustryResponseMetaNormalization = "RAW_VALUES"` - `const AttackLayer7TimeseriesGroupIndustryResponseMetaNormalizationPercentageChange AttackLayer7TimeseriesGroupIndustryResponseMetaNormalization = "PERCENTAGE_CHANGE"` - `const AttackLayer7TimeseriesGroupIndustryResponseMetaNormalizationRollingAverage AttackLayer7TimeseriesGroupIndustryResponseMetaNormalization = "ROLLING_AVERAGE"` - `const AttackLayer7TimeseriesGroupIndustryResponseMetaNormalizationOverlappedPercentage AttackLayer7TimeseriesGroupIndustryResponseMetaNormalization = "OVERLAPPED_PERCENTAGE"` - `const AttackLayer7TimeseriesGroupIndustryResponseMetaNormalizationRatio AttackLayer7TimeseriesGroupIndustryResponseMetaNormalization = "RATIO"` - `Units []AttackLayer7TimeseriesGroupIndustryResponseMetaUnit` Measurement units for the results. - `Name string` - `Value string` - `Serie0 AttackLayer7TimeseriesGroupIndustryResponseSerie0` - `Timestamps []Time` ### Example ```go 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.Layer7.TimeseriesGroups.Industry(context.TODO(), radar.AttackLayer7TimeseriesGroupIndustryParams{ }) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", response.Meta) } ``` #### Response ```json { "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": { "timestamps": [ "2023-08-08T10:15:00Z" ] } }, "success": true } ``` ## Get layer 7 attacks by IP version time series `client.Radar.Attacks.Layer7.TimeseriesGroups.IPVersion(ctx, query) (*AttackLayer7TimeseriesGroupIPVersionResponse, error)` **get** `/radar/attacks/layer7/timeseries_groups/ip_version` Retrieves the distribution of layer 7 attacks by IP version used over time. ### Parameters - `query AttackLayer7TimeseriesGroupIPVersionParams` - `AggInterval param.Field[AttackLayer7TimeseriesGroupIPVersionParamsAggInterval]` Aggregation interval of the results (e.g., in 15 minutes or 1 hour intervals). Refer to [Aggregation intervals](https://developers.cloudflare.com/radar/concepts/aggregation-intervals/). - `const AttackLayer7TimeseriesGroupIPVersionParamsAggInterval15m AttackLayer7TimeseriesGroupIPVersionParamsAggInterval = "15m"` - `const AttackLayer7TimeseriesGroupIPVersionParamsAggInterval1h AttackLayer7TimeseriesGroupIPVersionParamsAggInterval = "1h"` - `const AttackLayer7TimeseriesGroupIPVersionParamsAggInterval1d AttackLayer7TimeseriesGroupIPVersionParamsAggInterval = "1d"` - `const AttackLayer7TimeseriesGroupIPVersionParamsAggInterval1w AttackLayer7TimeseriesGroupIPVersionParamsAggInterval = "1w"` - `ASN param.Field[[]string]` Filters results by Autonomous System. Specify one or more Autonomous System Numbers (ASNs) as a comma-separated list. Prefix with `-` to exclude ASNs from results. For example, `-174, 3356` excludes results from AS174, but includes results from AS3356. - `Continent param.Field[[]string]` 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]` End of the date range (inclusive). - `DateRange param.Field[[]string]` 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]` Start of the date range. - `Format param.Field[AttackLayer7TimeseriesGroupIPVersionParamsFormat]` Format in which results will be returned. - `const AttackLayer7TimeseriesGroupIPVersionParamsFormatJson AttackLayer7TimeseriesGroupIPVersionParamsFormat = "JSON"` - `const AttackLayer7TimeseriesGroupIPVersionParamsFormatCsv AttackLayer7TimeseriesGroupIPVersionParamsFormat = "CSV"` - `HTTPMethod param.Field[[]AttackLayer7TimeseriesGroupIPVersionParamsHTTPMethod]` Filters results by HTTP method. - `const AttackLayer7TimeseriesGroupIPVersionParamsHTTPMethodGet AttackLayer7TimeseriesGroupIPVersionParamsHTTPMethod = "GET"` - `const AttackLayer7TimeseriesGroupIPVersionParamsHTTPMethodPost AttackLayer7TimeseriesGroupIPVersionParamsHTTPMethod = "POST"` - `const AttackLayer7TimeseriesGroupIPVersionParamsHTTPMethodDelete AttackLayer7TimeseriesGroupIPVersionParamsHTTPMethod = "DELETE"` - `const AttackLayer7TimeseriesGroupIPVersionParamsHTTPMethodPut AttackLayer7TimeseriesGroupIPVersionParamsHTTPMethod = "PUT"` - `const AttackLayer7TimeseriesGroupIPVersionParamsHTTPMethodHead AttackLayer7TimeseriesGroupIPVersionParamsHTTPMethod = "HEAD"` - `const AttackLayer7TimeseriesGroupIPVersionParamsHTTPMethodPurge AttackLayer7TimeseriesGroupIPVersionParamsHTTPMethod = "PURGE"` - `const AttackLayer7TimeseriesGroupIPVersionParamsHTTPMethodOptions AttackLayer7TimeseriesGroupIPVersionParamsHTTPMethod = "OPTIONS"` - `const AttackLayer7TimeseriesGroupIPVersionParamsHTTPMethodPropfind AttackLayer7TimeseriesGroupIPVersionParamsHTTPMethod = "PROPFIND"` - `const AttackLayer7TimeseriesGroupIPVersionParamsHTTPMethodMkcol AttackLayer7TimeseriesGroupIPVersionParamsHTTPMethod = "MKCOL"` - `const AttackLayer7TimeseriesGroupIPVersionParamsHTTPMethodPatch AttackLayer7TimeseriesGroupIPVersionParamsHTTPMethod = "PATCH"` - `const AttackLayer7TimeseriesGroupIPVersionParamsHTTPMethodACL AttackLayer7TimeseriesGroupIPVersionParamsHTTPMethod = "ACL"` - `const AttackLayer7TimeseriesGroupIPVersionParamsHTTPMethodBcopy AttackLayer7TimeseriesGroupIPVersionParamsHTTPMethod = "BCOPY"` - `const AttackLayer7TimeseriesGroupIPVersionParamsHTTPMethodBdelete AttackLayer7TimeseriesGroupIPVersionParamsHTTPMethod = "BDELETE"` - `const AttackLayer7TimeseriesGroupIPVersionParamsHTTPMethodBmove AttackLayer7TimeseriesGroupIPVersionParamsHTTPMethod = "BMOVE"` - `const AttackLayer7TimeseriesGroupIPVersionParamsHTTPMethodBpropfind AttackLayer7TimeseriesGroupIPVersionParamsHTTPMethod = "BPROPFIND"` - `const AttackLayer7TimeseriesGroupIPVersionParamsHTTPMethodBproppatch AttackLayer7TimeseriesGroupIPVersionParamsHTTPMethod = "BPROPPATCH"` - `const AttackLayer7TimeseriesGroupIPVersionParamsHTTPMethodCheckin AttackLayer7TimeseriesGroupIPVersionParamsHTTPMethod = "CHECKIN"` - `const AttackLayer7TimeseriesGroupIPVersionParamsHTTPMethodCheckout AttackLayer7TimeseriesGroupIPVersionParamsHTTPMethod = "CHECKOUT"` - `const AttackLayer7TimeseriesGroupIPVersionParamsHTTPMethodConnect AttackLayer7TimeseriesGroupIPVersionParamsHTTPMethod = "CONNECT"` - `const AttackLayer7TimeseriesGroupIPVersionParamsHTTPMethodCopy AttackLayer7TimeseriesGroupIPVersionParamsHTTPMethod = "COPY"` - `const AttackLayer7TimeseriesGroupIPVersionParamsHTTPMethodLabel AttackLayer7TimeseriesGroupIPVersionParamsHTTPMethod = "LABEL"` - `const AttackLayer7TimeseriesGroupIPVersionParamsHTTPMethodLock AttackLayer7TimeseriesGroupIPVersionParamsHTTPMethod = "LOCK"` - `const AttackLayer7TimeseriesGroupIPVersionParamsHTTPMethodMerge AttackLayer7TimeseriesGroupIPVersionParamsHTTPMethod = "MERGE"` - `const AttackLayer7TimeseriesGroupIPVersionParamsHTTPMethodMkactivity AttackLayer7TimeseriesGroupIPVersionParamsHTTPMethod = "MKACTIVITY"` - `const AttackLayer7TimeseriesGroupIPVersionParamsHTTPMethodMkworkspace AttackLayer7TimeseriesGroupIPVersionParamsHTTPMethod = "MKWORKSPACE"` - `const AttackLayer7TimeseriesGroupIPVersionParamsHTTPMethodMove AttackLayer7TimeseriesGroupIPVersionParamsHTTPMethod = "MOVE"` - `const AttackLayer7TimeseriesGroupIPVersionParamsHTTPMethodNotify AttackLayer7TimeseriesGroupIPVersionParamsHTTPMethod = "NOTIFY"` - `const AttackLayer7TimeseriesGroupIPVersionParamsHTTPMethodOrderpatch AttackLayer7TimeseriesGroupIPVersionParamsHTTPMethod = "ORDERPATCH"` - `const AttackLayer7TimeseriesGroupIPVersionParamsHTTPMethodPoll AttackLayer7TimeseriesGroupIPVersionParamsHTTPMethod = "POLL"` - `const AttackLayer7TimeseriesGroupIPVersionParamsHTTPMethodProppatch AttackLayer7TimeseriesGroupIPVersionParamsHTTPMethod = "PROPPATCH"` - `const AttackLayer7TimeseriesGroupIPVersionParamsHTTPMethodReport AttackLayer7TimeseriesGroupIPVersionParamsHTTPMethod = "REPORT"` - `const AttackLayer7TimeseriesGroupIPVersionParamsHTTPMethodSearch AttackLayer7TimeseriesGroupIPVersionParamsHTTPMethod = "SEARCH"` - `const AttackLayer7TimeseriesGroupIPVersionParamsHTTPMethodSubscribe AttackLayer7TimeseriesGroupIPVersionParamsHTTPMethod = "SUBSCRIBE"` - `const AttackLayer7TimeseriesGroupIPVersionParamsHTTPMethodTrace AttackLayer7TimeseriesGroupIPVersionParamsHTTPMethod = "TRACE"` - `const AttackLayer7TimeseriesGroupIPVersionParamsHTTPMethodUncheckout AttackLayer7TimeseriesGroupIPVersionParamsHTTPMethod = "UNCHECKOUT"` - `const AttackLayer7TimeseriesGroupIPVersionParamsHTTPMethodUnlock AttackLayer7TimeseriesGroupIPVersionParamsHTTPMethod = "UNLOCK"` - `const AttackLayer7TimeseriesGroupIPVersionParamsHTTPMethodUnsubscribe AttackLayer7TimeseriesGroupIPVersionParamsHTTPMethod = "UNSUBSCRIBE"` - `const AttackLayer7TimeseriesGroupIPVersionParamsHTTPMethodUpdate AttackLayer7TimeseriesGroupIPVersionParamsHTTPMethod = "UPDATE"` - `const AttackLayer7TimeseriesGroupIPVersionParamsHTTPMethodVersioncontrol AttackLayer7TimeseriesGroupIPVersionParamsHTTPMethod = "VERSIONCONTROL"` - `const AttackLayer7TimeseriesGroupIPVersionParamsHTTPMethodBaselinecontrol AttackLayer7TimeseriesGroupIPVersionParamsHTTPMethod = "BASELINECONTROL"` - `const AttackLayer7TimeseriesGroupIPVersionParamsHTTPMethodXmsenumatts AttackLayer7TimeseriesGroupIPVersionParamsHTTPMethod = "XMSENUMATTS"` - `const AttackLayer7TimeseriesGroupIPVersionParamsHTTPMethodRpcOutData AttackLayer7TimeseriesGroupIPVersionParamsHTTPMethod = "RPC_OUT_DATA"` - `const AttackLayer7TimeseriesGroupIPVersionParamsHTTPMethodRpcInData AttackLayer7TimeseriesGroupIPVersionParamsHTTPMethod = "RPC_IN_DATA"` - `const AttackLayer7TimeseriesGroupIPVersionParamsHTTPMethodJson AttackLayer7TimeseriesGroupIPVersionParamsHTTPMethod = "JSON"` - `const AttackLayer7TimeseriesGroupIPVersionParamsHTTPMethodCook AttackLayer7TimeseriesGroupIPVersionParamsHTTPMethod = "COOK"` - `const AttackLayer7TimeseriesGroupIPVersionParamsHTTPMethodTrack AttackLayer7TimeseriesGroupIPVersionParamsHTTPMethod = "TRACK"` - `HTTPVersion param.Field[[]AttackLayer7TimeseriesGroupIPVersionParamsHTTPVersion]` Filters results by HTTP version. - `const AttackLayer7TimeseriesGroupIPVersionParamsHTTPVersionHttPv1 AttackLayer7TimeseriesGroupIPVersionParamsHTTPVersion = "HTTPv1"` - `const AttackLayer7TimeseriesGroupIPVersionParamsHTTPVersionHttPv2 AttackLayer7TimeseriesGroupIPVersionParamsHTTPVersion = "HTTPv2"` - `const AttackLayer7TimeseriesGroupIPVersionParamsHTTPVersionHttPv3 AttackLayer7TimeseriesGroupIPVersionParamsHTTPVersion = "HTTPv3"` - `Location param.Field[[]string]` 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. - `MitigationProduct param.Field[[]AttackLayer7TimeseriesGroupIPVersionParamsMitigationProduct]` Filters the results by layer 7 mitigation product. - `const AttackLayer7TimeseriesGroupIPVersionParamsMitigationProductDDoS AttackLayer7TimeseriesGroupIPVersionParamsMitigationProduct = "DDOS"` - `const AttackLayer7TimeseriesGroupIPVersionParamsMitigationProductWAF AttackLayer7TimeseriesGroupIPVersionParamsMitigationProduct = "WAF"` - `const AttackLayer7TimeseriesGroupIPVersionParamsMitigationProductBotManagement AttackLayer7TimeseriesGroupIPVersionParamsMitigationProduct = "BOT_MANAGEMENT"` - `const AttackLayer7TimeseriesGroupIPVersionParamsMitigationProductAccessRules AttackLayer7TimeseriesGroupIPVersionParamsMitigationProduct = "ACCESS_RULES"` - `const AttackLayer7TimeseriesGroupIPVersionParamsMitigationProductIPReputation AttackLayer7TimeseriesGroupIPVersionParamsMitigationProduct = "IP_REPUTATION"` - `const AttackLayer7TimeseriesGroupIPVersionParamsMitigationProductAPIShield AttackLayer7TimeseriesGroupIPVersionParamsMitigationProduct = "API_SHIELD"` - `const AttackLayer7TimeseriesGroupIPVersionParamsMitigationProductDataLossPrevention AttackLayer7TimeseriesGroupIPVersionParamsMitigationProduct = "DATA_LOSS_PREVENTION"` - `Name param.Field[[]string]` Array of names used to label the series in the response. - `Normalization param.Field[AttackLayer7TimeseriesGroupIPVersionParamsNormalization]` Normalization method applied to the results. Refer to [Normalization methods](https://developers.cloudflare.com/radar/concepts/normalization/). - `const AttackLayer7TimeseriesGroupIPVersionParamsNormalizationPercentage AttackLayer7TimeseriesGroupIPVersionParamsNormalization = "PERCENTAGE"` - `const AttackLayer7TimeseriesGroupIPVersionParamsNormalizationMin0Max AttackLayer7TimeseriesGroupIPVersionParamsNormalization = "MIN0_MAX"` ### Returns - `type AttackLayer7TimeseriesGroupIPVersionResponse struct{…}` - `Meta AttackLayer7TimeseriesGroupIPVersionResponseMeta` Metadata for the results. - `AggInterval AttackLayer7TimeseriesGroupIPVersionResponseMetaAggInterval` Aggregation interval of the results (e.g., in 15 minutes or 1 hour intervals). Refer to [Aggregation intervals](https://developers.cloudflare.com/radar/concepts/aggregation-intervals/). - `const AttackLayer7TimeseriesGroupIPVersionResponseMetaAggIntervalFifteenMinutes AttackLayer7TimeseriesGroupIPVersionResponseMetaAggInterval = "FIFTEEN_MINUTES"` - `const AttackLayer7TimeseriesGroupIPVersionResponseMetaAggIntervalOneHour AttackLayer7TimeseriesGroupIPVersionResponseMetaAggInterval = "ONE_HOUR"` - `const AttackLayer7TimeseriesGroupIPVersionResponseMetaAggIntervalOneDay AttackLayer7TimeseriesGroupIPVersionResponseMetaAggInterval = "ONE_DAY"` - `const AttackLayer7TimeseriesGroupIPVersionResponseMetaAggIntervalOneWeek AttackLayer7TimeseriesGroupIPVersionResponseMetaAggInterval = "ONE_WEEK"` - `const AttackLayer7TimeseriesGroupIPVersionResponseMetaAggIntervalOneMonth AttackLayer7TimeseriesGroupIPVersionResponseMetaAggInterval = "ONE_MONTH"` - `ConfidenceInfo AttackLayer7TimeseriesGroupIPVersionResponseMetaConfidenceInfo` - `Annotations []AttackLayer7TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotation` - `DataSource AttackLayer7TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSource` Data source for annotations. - `const AttackLayer7TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceAll AttackLayer7TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "ALL"` - `const AttackLayer7TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceAIBots AttackLayer7TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "AI_BOTS"` - `const AttackLayer7TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway AttackLayer7TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "AI_GATEWAY"` - `const AttackLayer7TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceBGP AttackLayer7TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "BGP"` - `const AttackLayer7TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceBots AttackLayer7TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "BOTS"` - `const AttackLayer7TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly AttackLayer7TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "CONNECTION_ANOMALY"` - `const AttackLayer7TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceCT AttackLayer7TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "CT"` - `const AttackLayer7TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceDNS AttackLayer7TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "DNS"` - `const AttackLayer7TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude AttackLayer7TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_MAGNITUDE"` - `const AttackLayer7TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112 AttackLayer7TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_AS112"` - `const AttackLayer7TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceDos AttackLayer7TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "DOS"` - `const AttackLayer7TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting AttackLayer7TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_ROUTING"` - `const AttackLayer7TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity AttackLayer7TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_SECURITY"` - `const AttackLayer7TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceFw AttackLayer7TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "FW"` - `const AttackLayer7TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceFwPg AttackLayer7TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "FW_PG"` - `const AttackLayer7TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceHTTP AttackLayer7TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP"` - `const AttackLayer7TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl AttackLayer7TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CONTROL"` - `const AttackLayer7TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer AttackLayer7TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CRAWLER_REFERER"` - `const AttackLayer7TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins AttackLayer7TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_ORIGINS"` - `const AttackLayer7TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceIQI AttackLayer7TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "IQI"` - `const AttackLayer7TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials AttackLayer7TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "LEAKED_CREDENTIALS"` - `const AttackLayer7TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceNet AttackLayer7TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "NET"` - `const AttackLayer7TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT AttackLayer7TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "ROBOTS_TXT"` - `const AttackLayer7TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceSpeed AttackLayer7TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "SPEED"` - `const AttackLayer7TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI AttackLayer7TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "WORKERS_AI"` - `Description string` - `EndDate Time` - `EventType AttackLayer7TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsEventType` Event type for annotations. - `const AttackLayer7TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsEventTypeEvent AttackLayer7TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsEventType = "EVENT"` - `const AttackLayer7TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsEventTypeGeneral AttackLayer7TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsEventType = "GENERAL"` - `const AttackLayer7TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsEventTypeOutage AttackLayer7TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsEventType = "OUTAGE"` - `const AttackLayer7TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection AttackLayer7TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsEventType = "PARTIAL_PROJECTION"` - `const AttackLayer7TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsEventTypePipeline AttackLayer7TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsEventType = "PIPELINE"` - `const AttackLayer7TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly AttackLayer7TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsEventType = "TRAFFIC_ANOMALY"` - `IsInstantaneous bool` Whether event is a single point in time or a time range. - `LinkedURL string` - `StartDate Time` - `Level int64` Provides an indication of how much confidence Cloudflare has in the data. - `DateRange []AttackLayer7TimeseriesGroupIPVersionResponseMetaDateRange` - `EndTime Time` Adjusted end of date range. - `StartTime Time` Adjusted start of date range. - `LastUpdated Time` Timestamp of the last dataset update. - `Normalization AttackLayer7TimeseriesGroupIPVersionResponseMetaNormalization` Normalization method applied to the results. Refer to [Normalization methods](https://developers.cloudflare.com/radar/concepts/normalization/). - `const AttackLayer7TimeseriesGroupIPVersionResponseMetaNormalizationPercentage AttackLayer7TimeseriesGroupIPVersionResponseMetaNormalization = "PERCENTAGE"` - `const AttackLayer7TimeseriesGroupIPVersionResponseMetaNormalizationMin0Max AttackLayer7TimeseriesGroupIPVersionResponseMetaNormalization = "MIN0_MAX"` - `const AttackLayer7TimeseriesGroupIPVersionResponseMetaNormalizationMinMax AttackLayer7TimeseriesGroupIPVersionResponseMetaNormalization = "MIN_MAX"` - `const AttackLayer7TimeseriesGroupIPVersionResponseMetaNormalizationRawValues AttackLayer7TimeseriesGroupIPVersionResponseMetaNormalization = "RAW_VALUES"` - `const AttackLayer7TimeseriesGroupIPVersionResponseMetaNormalizationPercentageChange AttackLayer7TimeseriesGroupIPVersionResponseMetaNormalization = "PERCENTAGE_CHANGE"` - `const AttackLayer7TimeseriesGroupIPVersionResponseMetaNormalizationRollingAverage AttackLayer7TimeseriesGroupIPVersionResponseMetaNormalization = "ROLLING_AVERAGE"` - `const AttackLayer7TimeseriesGroupIPVersionResponseMetaNormalizationOverlappedPercentage AttackLayer7TimeseriesGroupIPVersionResponseMetaNormalization = "OVERLAPPED_PERCENTAGE"` - `const AttackLayer7TimeseriesGroupIPVersionResponseMetaNormalizationRatio AttackLayer7TimeseriesGroupIPVersionResponseMetaNormalization = "RATIO"` - `Units []AttackLayer7TimeseriesGroupIPVersionResponseMetaUnit` Measurement units for the results. - `Name string` - `Value string` - `Serie0 AttackLayer7TimeseriesGroupIPVersionResponseSerie0` - `IPv4 []string` - `IPv6 []string` - `Timestamps []Time` ### Example ```go 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.Layer7.TimeseriesGroups.IPVersion(context.TODO(), radar.AttackLayer7TimeseriesGroupIPVersionParams{ }) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", response.Meta) } ``` #### Response ```json { "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": { "IPv4": [ "10" ], "IPv6": [ "10" ], "timestamps": [ "2019-12-27T18:11:19.117Z" ] } }, "success": true } ``` ## Get layer 7 attacks by vertical time series `client.Radar.Attacks.Layer7.TimeseriesGroups.Vertical(ctx, query) (*AttackLayer7TimeseriesGroupVerticalResponse, error)` **get** `/radar/attacks/layer7/timeseries_groups/vertical` Retrieves the distribution of layer 7 attacks by targeted vertical over time. ### Parameters - `query AttackLayer7TimeseriesGroupVerticalParams` - `AggInterval param.Field[AttackLayer7TimeseriesGroupVerticalParamsAggInterval]` Aggregation interval of the results (e.g., in 15 minutes or 1 hour intervals). Refer to [Aggregation intervals](https://developers.cloudflare.com/radar/concepts/aggregation-intervals/). - `const AttackLayer7TimeseriesGroupVerticalParamsAggInterval15m AttackLayer7TimeseriesGroupVerticalParamsAggInterval = "15m"` - `const AttackLayer7TimeseriesGroupVerticalParamsAggInterval1h AttackLayer7TimeseriesGroupVerticalParamsAggInterval = "1h"` - `const AttackLayer7TimeseriesGroupVerticalParamsAggInterval1d AttackLayer7TimeseriesGroupVerticalParamsAggInterval = "1d"` - `const AttackLayer7TimeseriesGroupVerticalParamsAggInterval1w AttackLayer7TimeseriesGroupVerticalParamsAggInterval = "1w"` - `ASN param.Field[[]string]` Filters results by Autonomous System. Specify one or more Autonomous System Numbers (ASNs) as a comma-separated list. Prefix with `-` to exclude ASNs from results. For example, `-174, 3356` excludes results from AS174, but includes results from AS3356. - `Continent param.Field[[]string]` 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]` End of the date range (inclusive). - `DateRange param.Field[[]string]` 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]` Start of the date range. - `Format param.Field[AttackLayer7TimeseriesGroupVerticalParamsFormat]` Format in which results will be returned. - `const AttackLayer7TimeseriesGroupVerticalParamsFormatJson AttackLayer7TimeseriesGroupVerticalParamsFormat = "JSON"` - `const AttackLayer7TimeseriesGroupVerticalParamsFormatCsv AttackLayer7TimeseriesGroupVerticalParamsFormat = "CSV"` - `HTTPMethod param.Field[[]AttackLayer7TimeseriesGroupVerticalParamsHTTPMethod]` Filters results by HTTP method. - `const AttackLayer7TimeseriesGroupVerticalParamsHTTPMethodGet AttackLayer7TimeseriesGroupVerticalParamsHTTPMethod = "GET"` - `const AttackLayer7TimeseriesGroupVerticalParamsHTTPMethodPost AttackLayer7TimeseriesGroupVerticalParamsHTTPMethod = "POST"` - `const AttackLayer7TimeseriesGroupVerticalParamsHTTPMethodDelete AttackLayer7TimeseriesGroupVerticalParamsHTTPMethod = "DELETE"` - `const AttackLayer7TimeseriesGroupVerticalParamsHTTPMethodPut AttackLayer7TimeseriesGroupVerticalParamsHTTPMethod = "PUT"` - `const AttackLayer7TimeseriesGroupVerticalParamsHTTPMethodHead AttackLayer7TimeseriesGroupVerticalParamsHTTPMethod = "HEAD"` - `const AttackLayer7TimeseriesGroupVerticalParamsHTTPMethodPurge AttackLayer7TimeseriesGroupVerticalParamsHTTPMethod = "PURGE"` - `const AttackLayer7TimeseriesGroupVerticalParamsHTTPMethodOptions AttackLayer7TimeseriesGroupVerticalParamsHTTPMethod = "OPTIONS"` - `const AttackLayer7TimeseriesGroupVerticalParamsHTTPMethodPropfind AttackLayer7TimeseriesGroupVerticalParamsHTTPMethod = "PROPFIND"` - `const AttackLayer7TimeseriesGroupVerticalParamsHTTPMethodMkcol AttackLayer7TimeseriesGroupVerticalParamsHTTPMethod = "MKCOL"` - `const AttackLayer7TimeseriesGroupVerticalParamsHTTPMethodPatch AttackLayer7TimeseriesGroupVerticalParamsHTTPMethod = "PATCH"` - `const AttackLayer7TimeseriesGroupVerticalParamsHTTPMethodACL AttackLayer7TimeseriesGroupVerticalParamsHTTPMethod = "ACL"` - `const AttackLayer7TimeseriesGroupVerticalParamsHTTPMethodBcopy AttackLayer7TimeseriesGroupVerticalParamsHTTPMethod = "BCOPY"` - `const AttackLayer7TimeseriesGroupVerticalParamsHTTPMethodBdelete AttackLayer7TimeseriesGroupVerticalParamsHTTPMethod = "BDELETE"` - `const AttackLayer7TimeseriesGroupVerticalParamsHTTPMethodBmove AttackLayer7TimeseriesGroupVerticalParamsHTTPMethod = "BMOVE"` - `const AttackLayer7TimeseriesGroupVerticalParamsHTTPMethodBpropfind AttackLayer7TimeseriesGroupVerticalParamsHTTPMethod = "BPROPFIND"` - `const AttackLayer7TimeseriesGroupVerticalParamsHTTPMethodBproppatch AttackLayer7TimeseriesGroupVerticalParamsHTTPMethod = "BPROPPATCH"` - `const AttackLayer7TimeseriesGroupVerticalParamsHTTPMethodCheckin AttackLayer7TimeseriesGroupVerticalParamsHTTPMethod = "CHECKIN"` - `const AttackLayer7TimeseriesGroupVerticalParamsHTTPMethodCheckout AttackLayer7TimeseriesGroupVerticalParamsHTTPMethod = "CHECKOUT"` - `const AttackLayer7TimeseriesGroupVerticalParamsHTTPMethodConnect AttackLayer7TimeseriesGroupVerticalParamsHTTPMethod = "CONNECT"` - `const AttackLayer7TimeseriesGroupVerticalParamsHTTPMethodCopy AttackLayer7TimeseriesGroupVerticalParamsHTTPMethod = "COPY"` - `const AttackLayer7TimeseriesGroupVerticalParamsHTTPMethodLabel AttackLayer7TimeseriesGroupVerticalParamsHTTPMethod = "LABEL"` - `const AttackLayer7TimeseriesGroupVerticalParamsHTTPMethodLock AttackLayer7TimeseriesGroupVerticalParamsHTTPMethod = "LOCK"` - `const AttackLayer7TimeseriesGroupVerticalParamsHTTPMethodMerge AttackLayer7TimeseriesGroupVerticalParamsHTTPMethod = "MERGE"` - `const AttackLayer7TimeseriesGroupVerticalParamsHTTPMethodMkactivity AttackLayer7TimeseriesGroupVerticalParamsHTTPMethod = "MKACTIVITY"` - `const AttackLayer7TimeseriesGroupVerticalParamsHTTPMethodMkworkspace AttackLayer7TimeseriesGroupVerticalParamsHTTPMethod = "MKWORKSPACE"` - `const AttackLayer7TimeseriesGroupVerticalParamsHTTPMethodMove AttackLayer7TimeseriesGroupVerticalParamsHTTPMethod = "MOVE"` - `const AttackLayer7TimeseriesGroupVerticalParamsHTTPMethodNotify AttackLayer7TimeseriesGroupVerticalParamsHTTPMethod = "NOTIFY"` - `const AttackLayer7TimeseriesGroupVerticalParamsHTTPMethodOrderpatch AttackLayer7TimeseriesGroupVerticalParamsHTTPMethod = "ORDERPATCH"` - `const AttackLayer7TimeseriesGroupVerticalParamsHTTPMethodPoll AttackLayer7TimeseriesGroupVerticalParamsHTTPMethod = "POLL"` - `const AttackLayer7TimeseriesGroupVerticalParamsHTTPMethodProppatch AttackLayer7TimeseriesGroupVerticalParamsHTTPMethod = "PROPPATCH"` - `const AttackLayer7TimeseriesGroupVerticalParamsHTTPMethodReport AttackLayer7TimeseriesGroupVerticalParamsHTTPMethod = "REPORT"` - `const AttackLayer7TimeseriesGroupVerticalParamsHTTPMethodSearch AttackLayer7TimeseriesGroupVerticalParamsHTTPMethod = "SEARCH"` - `const AttackLayer7TimeseriesGroupVerticalParamsHTTPMethodSubscribe AttackLayer7TimeseriesGroupVerticalParamsHTTPMethod = "SUBSCRIBE"` - `const AttackLayer7TimeseriesGroupVerticalParamsHTTPMethodTrace AttackLayer7TimeseriesGroupVerticalParamsHTTPMethod = "TRACE"` - `const AttackLayer7TimeseriesGroupVerticalParamsHTTPMethodUncheckout AttackLayer7TimeseriesGroupVerticalParamsHTTPMethod = "UNCHECKOUT"` - `const AttackLayer7TimeseriesGroupVerticalParamsHTTPMethodUnlock AttackLayer7TimeseriesGroupVerticalParamsHTTPMethod = "UNLOCK"` - `const AttackLayer7TimeseriesGroupVerticalParamsHTTPMethodUnsubscribe AttackLayer7TimeseriesGroupVerticalParamsHTTPMethod = "UNSUBSCRIBE"` - `const AttackLayer7TimeseriesGroupVerticalParamsHTTPMethodUpdate AttackLayer7TimeseriesGroupVerticalParamsHTTPMethod = "UPDATE"` - `const AttackLayer7TimeseriesGroupVerticalParamsHTTPMethodVersioncontrol AttackLayer7TimeseriesGroupVerticalParamsHTTPMethod = "VERSIONCONTROL"` - `const AttackLayer7TimeseriesGroupVerticalParamsHTTPMethodBaselinecontrol AttackLayer7TimeseriesGroupVerticalParamsHTTPMethod = "BASELINECONTROL"` - `const AttackLayer7TimeseriesGroupVerticalParamsHTTPMethodXmsenumatts AttackLayer7TimeseriesGroupVerticalParamsHTTPMethod = "XMSENUMATTS"` - `const AttackLayer7TimeseriesGroupVerticalParamsHTTPMethodRpcOutData AttackLayer7TimeseriesGroupVerticalParamsHTTPMethod = "RPC_OUT_DATA"` - `const AttackLayer7TimeseriesGroupVerticalParamsHTTPMethodRpcInData AttackLayer7TimeseriesGroupVerticalParamsHTTPMethod = "RPC_IN_DATA"` - `const AttackLayer7TimeseriesGroupVerticalParamsHTTPMethodJson AttackLayer7TimeseriesGroupVerticalParamsHTTPMethod = "JSON"` - `const AttackLayer7TimeseriesGroupVerticalParamsHTTPMethodCook AttackLayer7TimeseriesGroupVerticalParamsHTTPMethod = "COOK"` - `const AttackLayer7TimeseriesGroupVerticalParamsHTTPMethodTrack AttackLayer7TimeseriesGroupVerticalParamsHTTPMethod = "TRACK"` - `HTTPVersion param.Field[[]AttackLayer7TimeseriesGroupVerticalParamsHTTPVersion]` Filters results by HTTP version. - `const AttackLayer7TimeseriesGroupVerticalParamsHTTPVersionHttPv1 AttackLayer7TimeseriesGroupVerticalParamsHTTPVersion = "HTTPv1"` - `const AttackLayer7TimeseriesGroupVerticalParamsHTTPVersionHttPv2 AttackLayer7TimeseriesGroupVerticalParamsHTTPVersion = "HTTPv2"` - `const AttackLayer7TimeseriesGroupVerticalParamsHTTPVersionHttPv3 AttackLayer7TimeseriesGroupVerticalParamsHTTPVersion = "HTTPv3"` - `IPVersion param.Field[[]AttackLayer7TimeseriesGroupVerticalParamsIPVersion]` Filters results by IP version (Ipv4 vs. IPv6). - `const AttackLayer7TimeseriesGroupVerticalParamsIPVersionIPv4 AttackLayer7TimeseriesGroupVerticalParamsIPVersion = "IPv4"` - `const AttackLayer7TimeseriesGroupVerticalParamsIPVersionIPv6 AttackLayer7TimeseriesGroupVerticalParamsIPVersion = "IPv6"` - `LimitPerGroup param.Field[int64]` 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]` 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. - `MitigationProduct param.Field[[]AttackLayer7TimeseriesGroupVerticalParamsMitigationProduct]` Filters the results by layer 7 mitigation product. - `const AttackLayer7TimeseriesGroupVerticalParamsMitigationProductDDoS AttackLayer7TimeseriesGroupVerticalParamsMitigationProduct = "DDOS"` - `const AttackLayer7TimeseriesGroupVerticalParamsMitigationProductWAF AttackLayer7TimeseriesGroupVerticalParamsMitigationProduct = "WAF"` - `const AttackLayer7TimeseriesGroupVerticalParamsMitigationProductBotManagement AttackLayer7TimeseriesGroupVerticalParamsMitigationProduct = "BOT_MANAGEMENT"` - `const AttackLayer7TimeseriesGroupVerticalParamsMitigationProductAccessRules AttackLayer7TimeseriesGroupVerticalParamsMitigationProduct = "ACCESS_RULES"` - `const AttackLayer7TimeseriesGroupVerticalParamsMitigationProductIPReputation AttackLayer7TimeseriesGroupVerticalParamsMitigationProduct = "IP_REPUTATION"` - `const AttackLayer7TimeseriesGroupVerticalParamsMitigationProductAPIShield AttackLayer7TimeseriesGroupVerticalParamsMitigationProduct = "API_SHIELD"` - `const AttackLayer7TimeseriesGroupVerticalParamsMitigationProductDataLossPrevention AttackLayer7TimeseriesGroupVerticalParamsMitigationProduct = "DATA_LOSS_PREVENTION"` - `Name param.Field[[]string]` Array of names used to label the series in the response. - `Normalization param.Field[AttackLayer7TimeseriesGroupVerticalParamsNormalization]` Normalization method applied to the results. Refer to [Normalization methods](https://developers.cloudflare.com/radar/concepts/normalization/). - `const AttackLayer7TimeseriesGroupVerticalParamsNormalizationPercentage AttackLayer7TimeseriesGroupVerticalParamsNormalization = "PERCENTAGE"` - `const AttackLayer7TimeseriesGroupVerticalParamsNormalizationMin0Max AttackLayer7TimeseriesGroupVerticalParamsNormalization = "MIN0_MAX"` ### Returns - `type AttackLayer7TimeseriesGroupVerticalResponse struct{…}` - `Meta AttackLayer7TimeseriesGroupVerticalResponseMeta` Metadata for the results. - `AggInterval AttackLayer7TimeseriesGroupVerticalResponseMetaAggInterval` Aggregation interval of the results (e.g., in 15 minutes or 1 hour intervals). Refer to [Aggregation intervals](https://developers.cloudflare.com/radar/concepts/aggregation-intervals/). - `const AttackLayer7TimeseriesGroupVerticalResponseMetaAggIntervalFifteenMinutes AttackLayer7TimeseriesGroupVerticalResponseMetaAggInterval = "FIFTEEN_MINUTES"` - `const AttackLayer7TimeseriesGroupVerticalResponseMetaAggIntervalOneHour AttackLayer7TimeseriesGroupVerticalResponseMetaAggInterval = "ONE_HOUR"` - `const AttackLayer7TimeseriesGroupVerticalResponseMetaAggIntervalOneDay AttackLayer7TimeseriesGroupVerticalResponseMetaAggInterval = "ONE_DAY"` - `const AttackLayer7TimeseriesGroupVerticalResponseMetaAggIntervalOneWeek AttackLayer7TimeseriesGroupVerticalResponseMetaAggInterval = "ONE_WEEK"` - `const AttackLayer7TimeseriesGroupVerticalResponseMetaAggIntervalOneMonth AttackLayer7TimeseriesGroupVerticalResponseMetaAggInterval = "ONE_MONTH"` - `ConfidenceInfo AttackLayer7TimeseriesGroupVerticalResponseMetaConfidenceInfo` - `Annotations []AttackLayer7TimeseriesGroupVerticalResponseMetaConfidenceInfoAnnotation` - `DataSource AttackLayer7TimeseriesGroupVerticalResponseMetaConfidenceInfoAnnotationsDataSource` Data source for annotations. - `const AttackLayer7TimeseriesGroupVerticalResponseMetaConfidenceInfoAnnotationsDataSourceAll AttackLayer7TimeseriesGroupVerticalResponseMetaConfidenceInfoAnnotationsDataSource = "ALL"` - `const AttackLayer7TimeseriesGroupVerticalResponseMetaConfidenceInfoAnnotationsDataSourceAIBots AttackLayer7TimeseriesGroupVerticalResponseMetaConfidenceInfoAnnotationsDataSource = "AI_BOTS"` - `const AttackLayer7TimeseriesGroupVerticalResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway AttackLayer7TimeseriesGroupVerticalResponseMetaConfidenceInfoAnnotationsDataSource = "AI_GATEWAY"` - `const AttackLayer7TimeseriesGroupVerticalResponseMetaConfidenceInfoAnnotationsDataSourceBGP AttackLayer7TimeseriesGroupVerticalResponseMetaConfidenceInfoAnnotationsDataSource = "BGP"` - `const AttackLayer7TimeseriesGroupVerticalResponseMetaConfidenceInfoAnnotationsDataSourceBots AttackLayer7TimeseriesGroupVerticalResponseMetaConfidenceInfoAnnotationsDataSource = "BOTS"` - `const AttackLayer7TimeseriesGroupVerticalResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly AttackLayer7TimeseriesGroupVerticalResponseMetaConfidenceInfoAnnotationsDataSource = "CONNECTION_ANOMALY"` - `const AttackLayer7TimeseriesGroupVerticalResponseMetaConfidenceInfoAnnotationsDataSourceCT AttackLayer7TimeseriesGroupVerticalResponseMetaConfidenceInfoAnnotationsDataSource = "CT"` - `const AttackLayer7TimeseriesGroupVerticalResponseMetaConfidenceInfoAnnotationsDataSourceDNS AttackLayer7TimeseriesGroupVerticalResponseMetaConfidenceInfoAnnotationsDataSource = "DNS"` - `const AttackLayer7TimeseriesGroupVerticalResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude AttackLayer7TimeseriesGroupVerticalResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_MAGNITUDE"` - `const AttackLayer7TimeseriesGroupVerticalResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112 AttackLayer7TimeseriesGroupVerticalResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_AS112"` - `const AttackLayer7TimeseriesGroupVerticalResponseMetaConfidenceInfoAnnotationsDataSourceDos AttackLayer7TimeseriesGroupVerticalResponseMetaConfidenceInfoAnnotationsDataSource = "DOS"` - `const AttackLayer7TimeseriesGroupVerticalResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting AttackLayer7TimeseriesGroupVerticalResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_ROUTING"` - `const AttackLayer7TimeseriesGroupVerticalResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity AttackLayer7TimeseriesGroupVerticalResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_SECURITY"` - `const AttackLayer7TimeseriesGroupVerticalResponseMetaConfidenceInfoAnnotationsDataSourceFw AttackLayer7TimeseriesGroupVerticalResponseMetaConfidenceInfoAnnotationsDataSource = "FW"` - `const AttackLayer7TimeseriesGroupVerticalResponseMetaConfidenceInfoAnnotationsDataSourceFwPg AttackLayer7TimeseriesGroupVerticalResponseMetaConfidenceInfoAnnotationsDataSource = "FW_PG"` - `const AttackLayer7TimeseriesGroupVerticalResponseMetaConfidenceInfoAnnotationsDataSourceHTTP AttackLayer7TimeseriesGroupVerticalResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP"` - `const AttackLayer7TimeseriesGroupVerticalResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl AttackLayer7TimeseriesGroupVerticalResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CONTROL"` - `const AttackLayer7TimeseriesGroupVerticalResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer AttackLayer7TimeseriesGroupVerticalResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CRAWLER_REFERER"` - `const AttackLayer7TimeseriesGroupVerticalResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins AttackLayer7TimeseriesGroupVerticalResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_ORIGINS"` - `const AttackLayer7TimeseriesGroupVerticalResponseMetaConfidenceInfoAnnotationsDataSourceIQI AttackLayer7TimeseriesGroupVerticalResponseMetaConfidenceInfoAnnotationsDataSource = "IQI"` - `const AttackLayer7TimeseriesGroupVerticalResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials AttackLayer7TimeseriesGroupVerticalResponseMetaConfidenceInfoAnnotationsDataSource = "LEAKED_CREDENTIALS"` - `const AttackLayer7TimeseriesGroupVerticalResponseMetaConfidenceInfoAnnotationsDataSourceNet AttackLayer7TimeseriesGroupVerticalResponseMetaConfidenceInfoAnnotationsDataSource = "NET"` - `const AttackLayer7TimeseriesGroupVerticalResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT AttackLayer7TimeseriesGroupVerticalResponseMetaConfidenceInfoAnnotationsDataSource = "ROBOTS_TXT"` - `const AttackLayer7TimeseriesGroupVerticalResponseMetaConfidenceInfoAnnotationsDataSourceSpeed AttackLayer7TimeseriesGroupVerticalResponseMetaConfidenceInfoAnnotationsDataSource = "SPEED"` - `const AttackLayer7TimeseriesGroupVerticalResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI AttackLayer7TimeseriesGroupVerticalResponseMetaConfidenceInfoAnnotationsDataSource = "WORKERS_AI"` - `Description string` - `EndDate Time` - `EventType AttackLayer7TimeseriesGroupVerticalResponseMetaConfidenceInfoAnnotationsEventType` Event type for annotations. - `const AttackLayer7TimeseriesGroupVerticalResponseMetaConfidenceInfoAnnotationsEventTypeEvent AttackLayer7TimeseriesGroupVerticalResponseMetaConfidenceInfoAnnotationsEventType = "EVENT"` - `const AttackLayer7TimeseriesGroupVerticalResponseMetaConfidenceInfoAnnotationsEventTypeGeneral AttackLayer7TimeseriesGroupVerticalResponseMetaConfidenceInfoAnnotationsEventType = "GENERAL"` - `const AttackLayer7TimeseriesGroupVerticalResponseMetaConfidenceInfoAnnotationsEventTypeOutage AttackLayer7TimeseriesGroupVerticalResponseMetaConfidenceInfoAnnotationsEventType = "OUTAGE"` - `const AttackLayer7TimeseriesGroupVerticalResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection AttackLayer7TimeseriesGroupVerticalResponseMetaConfidenceInfoAnnotationsEventType = "PARTIAL_PROJECTION"` - `const AttackLayer7TimeseriesGroupVerticalResponseMetaConfidenceInfoAnnotationsEventTypePipeline AttackLayer7TimeseriesGroupVerticalResponseMetaConfidenceInfoAnnotationsEventType = "PIPELINE"` - `const AttackLayer7TimeseriesGroupVerticalResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly AttackLayer7TimeseriesGroupVerticalResponseMetaConfidenceInfoAnnotationsEventType = "TRAFFIC_ANOMALY"` - `IsInstantaneous bool` Whether event is a single point in time or a time range. - `LinkedURL string` - `StartDate Time` - `Level int64` Provides an indication of how much confidence Cloudflare has in the data. - `DateRange []AttackLayer7TimeseriesGroupVerticalResponseMetaDateRange` - `EndTime Time` Adjusted end of date range. - `StartTime Time` Adjusted start of date range. - `LastUpdated Time` Timestamp of the last dataset update. - `Normalization AttackLayer7TimeseriesGroupVerticalResponseMetaNormalization` Normalization method applied to the results. Refer to [Normalization methods](https://developers.cloudflare.com/radar/concepts/normalization/). - `const AttackLayer7TimeseriesGroupVerticalResponseMetaNormalizationPercentage AttackLayer7TimeseriesGroupVerticalResponseMetaNormalization = "PERCENTAGE"` - `const AttackLayer7TimeseriesGroupVerticalResponseMetaNormalizationMin0Max AttackLayer7TimeseriesGroupVerticalResponseMetaNormalization = "MIN0_MAX"` - `const AttackLayer7TimeseriesGroupVerticalResponseMetaNormalizationMinMax AttackLayer7TimeseriesGroupVerticalResponseMetaNormalization = "MIN_MAX"` - `const AttackLayer7TimeseriesGroupVerticalResponseMetaNormalizationRawValues AttackLayer7TimeseriesGroupVerticalResponseMetaNormalization = "RAW_VALUES"` - `const AttackLayer7TimeseriesGroupVerticalResponseMetaNormalizationPercentageChange AttackLayer7TimeseriesGroupVerticalResponseMetaNormalization = "PERCENTAGE_CHANGE"` - `const AttackLayer7TimeseriesGroupVerticalResponseMetaNormalizationRollingAverage AttackLayer7TimeseriesGroupVerticalResponseMetaNormalization = "ROLLING_AVERAGE"` - `const AttackLayer7TimeseriesGroupVerticalResponseMetaNormalizationOverlappedPercentage AttackLayer7TimeseriesGroupVerticalResponseMetaNormalization = "OVERLAPPED_PERCENTAGE"` - `const AttackLayer7TimeseriesGroupVerticalResponseMetaNormalizationRatio AttackLayer7TimeseriesGroupVerticalResponseMetaNormalization = "RATIO"` - `Units []AttackLayer7TimeseriesGroupVerticalResponseMetaUnit` Measurement units for the results. - `Name string` - `Value string` - `Serie0 AttackLayer7TimeseriesGroupVerticalResponseSerie0` - `Timestamps []Time` ### Example ```go 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.Layer7.TimeseriesGroups.Vertical(context.TODO(), radar.AttackLayer7TimeseriesGroupVerticalParams{ }) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", response.Meta) } ``` #### Response ```json { "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": { "timestamps": [ "2023-08-08T10:15:00Z" ] } }, "success": true } ``` ## Get layer 7 attacks by HTTP method time series `client.Radar.Attacks.Layer7.TimeseriesGroups.HTTPMethod(ctx, query) (*AttackLayer7TimeseriesGroupHTTPMethodResponse, error)` **get** `/radar/attacks/layer7/timeseries_groups/http_method` Retrieves the distribution of layer 7 attacks by HTTP method over time. ### Parameters - `query AttackLayer7TimeseriesGroupHTTPMethodParams` - `AggInterval param.Field[AttackLayer7TimeseriesGroupHTTPMethodParamsAggInterval]` Aggregation interval of the results (e.g., in 15 minutes or 1 hour intervals). Refer to [Aggregation intervals](https://developers.cloudflare.com/radar/concepts/aggregation-intervals/). - `const AttackLayer7TimeseriesGroupHTTPMethodParamsAggInterval15m AttackLayer7TimeseriesGroupHTTPMethodParamsAggInterval = "15m"` - `const AttackLayer7TimeseriesGroupHTTPMethodParamsAggInterval1h AttackLayer7TimeseriesGroupHTTPMethodParamsAggInterval = "1h"` - `const AttackLayer7TimeseriesGroupHTTPMethodParamsAggInterval1d AttackLayer7TimeseriesGroupHTTPMethodParamsAggInterval = "1d"` - `const AttackLayer7TimeseriesGroupHTTPMethodParamsAggInterval1w AttackLayer7TimeseriesGroupHTTPMethodParamsAggInterval = "1w"` - `ASN param.Field[[]string]` Filters results by Autonomous System. Specify one or more Autonomous System Numbers (ASNs) as a comma-separated list. Prefix with `-` to exclude ASNs from results. For example, `-174, 3356` excludes results from AS174, but includes results from AS3356. - `Continent param.Field[[]string]` 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]` End of the date range (inclusive). - `DateRange param.Field[[]string]` 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]` Start of the date range. - `Format param.Field[AttackLayer7TimeseriesGroupHTTPMethodParamsFormat]` Format in which results will be returned. - `const AttackLayer7TimeseriesGroupHTTPMethodParamsFormatJson AttackLayer7TimeseriesGroupHTTPMethodParamsFormat = "JSON"` - `const AttackLayer7TimeseriesGroupHTTPMethodParamsFormatCsv AttackLayer7TimeseriesGroupHTTPMethodParamsFormat = "CSV"` - `HTTPVersion param.Field[[]AttackLayer7TimeseriesGroupHTTPMethodParamsHTTPVersion]` Filters results by HTTP version. - `const AttackLayer7TimeseriesGroupHTTPMethodParamsHTTPVersionHttPv1 AttackLayer7TimeseriesGroupHTTPMethodParamsHTTPVersion = "HTTPv1"` - `const AttackLayer7TimeseriesGroupHTTPMethodParamsHTTPVersionHttPv2 AttackLayer7TimeseriesGroupHTTPMethodParamsHTTPVersion = "HTTPv2"` - `const AttackLayer7TimeseriesGroupHTTPMethodParamsHTTPVersionHttPv3 AttackLayer7TimeseriesGroupHTTPMethodParamsHTTPVersion = "HTTPv3"` - `IPVersion param.Field[[]AttackLayer7TimeseriesGroupHTTPMethodParamsIPVersion]` Filters results by IP version (Ipv4 vs. IPv6). - `const AttackLayer7TimeseriesGroupHTTPMethodParamsIPVersionIPv4 AttackLayer7TimeseriesGroupHTTPMethodParamsIPVersion = "IPv4"` - `const AttackLayer7TimeseriesGroupHTTPMethodParamsIPVersionIPv6 AttackLayer7TimeseriesGroupHTTPMethodParamsIPVersion = "IPv6"` - `LimitPerGroup param.Field[int64]` 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]` 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. - `MitigationProduct param.Field[[]AttackLayer7TimeseriesGroupHTTPMethodParamsMitigationProduct]` Filters the results by layer 7 mitigation product. - `const AttackLayer7TimeseriesGroupHTTPMethodParamsMitigationProductDDoS AttackLayer7TimeseriesGroupHTTPMethodParamsMitigationProduct = "DDOS"` - `const AttackLayer7TimeseriesGroupHTTPMethodParamsMitigationProductWAF AttackLayer7TimeseriesGroupHTTPMethodParamsMitigationProduct = "WAF"` - `const AttackLayer7TimeseriesGroupHTTPMethodParamsMitigationProductBotManagement AttackLayer7TimeseriesGroupHTTPMethodParamsMitigationProduct = "BOT_MANAGEMENT"` - `const AttackLayer7TimeseriesGroupHTTPMethodParamsMitigationProductAccessRules AttackLayer7TimeseriesGroupHTTPMethodParamsMitigationProduct = "ACCESS_RULES"` - `const AttackLayer7TimeseriesGroupHTTPMethodParamsMitigationProductIPReputation AttackLayer7TimeseriesGroupHTTPMethodParamsMitigationProduct = "IP_REPUTATION"` - `const AttackLayer7TimeseriesGroupHTTPMethodParamsMitigationProductAPIShield AttackLayer7TimeseriesGroupHTTPMethodParamsMitigationProduct = "API_SHIELD"` - `const AttackLayer7TimeseriesGroupHTTPMethodParamsMitigationProductDataLossPrevention AttackLayer7TimeseriesGroupHTTPMethodParamsMitigationProduct = "DATA_LOSS_PREVENTION"` - `Name param.Field[[]string]` Array of names used to label the series in the response. - `Normalization param.Field[AttackLayer7TimeseriesGroupHTTPMethodParamsNormalization]` Normalization method applied to the results. Refer to [Normalization methods](https://developers.cloudflare.com/radar/concepts/normalization/). - `const AttackLayer7TimeseriesGroupHTTPMethodParamsNormalizationPercentage AttackLayer7TimeseriesGroupHTTPMethodParamsNormalization = "PERCENTAGE"` - `const AttackLayer7TimeseriesGroupHTTPMethodParamsNormalizationMin0Max AttackLayer7TimeseriesGroupHTTPMethodParamsNormalization = "MIN0_MAX"` ### Returns - `type AttackLayer7TimeseriesGroupHTTPMethodResponse struct{…}` - `Meta AttackLayer7TimeseriesGroupHTTPMethodResponseMeta` Metadata for the results. - `AggInterval AttackLayer7TimeseriesGroupHTTPMethodResponseMetaAggInterval` Aggregation interval of the results (e.g., in 15 minutes or 1 hour intervals). Refer to [Aggregation intervals](https://developers.cloudflare.com/radar/concepts/aggregation-intervals/). - `const AttackLayer7TimeseriesGroupHTTPMethodResponseMetaAggIntervalFifteenMinutes AttackLayer7TimeseriesGroupHTTPMethodResponseMetaAggInterval = "FIFTEEN_MINUTES"` - `const AttackLayer7TimeseriesGroupHTTPMethodResponseMetaAggIntervalOneHour AttackLayer7TimeseriesGroupHTTPMethodResponseMetaAggInterval = "ONE_HOUR"` - `const AttackLayer7TimeseriesGroupHTTPMethodResponseMetaAggIntervalOneDay AttackLayer7TimeseriesGroupHTTPMethodResponseMetaAggInterval = "ONE_DAY"` - `const AttackLayer7TimeseriesGroupHTTPMethodResponseMetaAggIntervalOneWeek AttackLayer7TimeseriesGroupHTTPMethodResponseMetaAggInterval = "ONE_WEEK"` - `const AttackLayer7TimeseriesGroupHTTPMethodResponseMetaAggIntervalOneMonth AttackLayer7TimeseriesGroupHTTPMethodResponseMetaAggInterval = "ONE_MONTH"` - `ConfidenceInfo AttackLayer7TimeseriesGroupHTTPMethodResponseMetaConfidenceInfo` - `Annotations []AttackLayer7TimeseriesGroupHTTPMethodResponseMetaConfidenceInfoAnnotation` - `DataSource AttackLayer7TimeseriesGroupHTTPMethodResponseMetaConfidenceInfoAnnotationsDataSource` Data source for annotations. - `const AttackLayer7TimeseriesGroupHTTPMethodResponseMetaConfidenceInfoAnnotationsDataSourceAll AttackLayer7TimeseriesGroupHTTPMethodResponseMetaConfidenceInfoAnnotationsDataSource = "ALL"` - `const AttackLayer7TimeseriesGroupHTTPMethodResponseMetaConfidenceInfoAnnotationsDataSourceAIBots AttackLayer7TimeseriesGroupHTTPMethodResponseMetaConfidenceInfoAnnotationsDataSource = "AI_BOTS"` - `const AttackLayer7TimeseriesGroupHTTPMethodResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway AttackLayer7TimeseriesGroupHTTPMethodResponseMetaConfidenceInfoAnnotationsDataSource = "AI_GATEWAY"` - `const AttackLayer7TimeseriesGroupHTTPMethodResponseMetaConfidenceInfoAnnotationsDataSourceBGP AttackLayer7TimeseriesGroupHTTPMethodResponseMetaConfidenceInfoAnnotationsDataSource = "BGP"` - `const AttackLayer7TimeseriesGroupHTTPMethodResponseMetaConfidenceInfoAnnotationsDataSourceBots AttackLayer7TimeseriesGroupHTTPMethodResponseMetaConfidenceInfoAnnotationsDataSource = "BOTS"` - `const AttackLayer7TimeseriesGroupHTTPMethodResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly AttackLayer7TimeseriesGroupHTTPMethodResponseMetaConfidenceInfoAnnotationsDataSource = "CONNECTION_ANOMALY"` - `const AttackLayer7TimeseriesGroupHTTPMethodResponseMetaConfidenceInfoAnnotationsDataSourceCT AttackLayer7TimeseriesGroupHTTPMethodResponseMetaConfidenceInfoAnnotationsDataSource = "CT"` - `const AttackLayer7TimeseriesGroupHTTPMethodResponseMetaConfidenceInfoAnnotationsDataSourceDNS AttackLayer7TimeseriesGroupHTTPMethodResponseMetaConfidenceInfoAnnotationsDataSource = "DNS"` - `const AttackLayer7TimeseriesGroupHTTPMethodResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude AttackLayer7TimeseriesGroupHTTPMethodResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_MAGNITUDE"` - `const AttackLayer7TimeseriesGroupHTTPMethodResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112 AttackLayer7TimeseriesGroupHTTPMethodResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_AS112"` - `const AttackLayer7TimeseriesGroupHTTPMethodResponseMetaConfidenceInfoAnnotationsDataSourceDos AttackLayer7TimeseriesGroupHTTPMethodResponseMetaConfidenceInfoAnnotationsDataSource = "DOS"` - `const AttackLayer7TimeseriesGroupHTTPMethodResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting AttackLayer7TimeseriesGroupHTTPMethodResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_ROUTING"` - `const AttackLayer7TimeseriesGroupHTTPMethodResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity AttackLayer7TimeseriesGroupHTTPMethodResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_SECURITY"` - `const AttackLayer7TimeseriesGroupHTTPMethodResponseMetaConfidenceInfoAnnotationsDataSourceFw AttackLayer7TimeseriesGroupHTTPMethodResponseMetaConfidenceInfoAnnotationsDataSource = "FW"` - `const AttackLayer7TimeseriesGroupHTTPMethodResponseMetaConfidenceInfoAnnotationsDataSourceFwPg AttackLayer7TimeseriesGroupHTTPMethodResponseMetaConfidenceInfoAnnotationsDataSource = "FW_PG"` - `const AttackLayer7TimeseriesGroupHTTPMethodResponseMetaConfidenceInfoAnnotationsDataSourceHTTP AttackLayer7TimeseriesGroupHTTPMethodResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP"` - `const AttackLayer7TimeseriesGroupHTTPMethodResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl AttackLayer7TimeseriesGroupHTTPMethodResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CONTROL"` - `const AttackLayer7TimeseriesGroupHTTPMethodResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer AttackLayer7TimeseriesGroupHTTPMethodResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CRAWLER_REFERER"` - `const AttackLayer7TimeseriesGroupHTTPMethodResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins AttackLayer7TimeseriesGroupHTTPMethodResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_ORIGINS"` - `const AttackLayer7TimeseriesGroupHTTPMethodResponseMetaConfidenceInfoAnnotationsDataSourceIQI AttackLayer7TimeseriesGroupHTTPMethodResponseMetaConfidenceInfoAnnotationsDataSource = "IQI"` - `const AttackLayer7TimeseriesGroupHTTPMethodResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials AttackLayer7TimeseriesGroupHTTPMethodResponseMetaConfidenceInfoAnnotationsDataSource = "LEAKED_CREDENTIALS"` - `const AttackLayer7TimeseriesGroupHTTPMethodResponseMetaConfidenceInfoAnnotationsDataSourceNet AttackLayer7TimeseriesGroupHTTPMethodResponseMetaConfidenceInfoAnnotationsDataSource = "NET"` - `const AttackLayer7TimeseriesGroupHTTPMethodResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT AttackLayer7TimeseriesGroupHTTPMethodResponseMetaConfidenceInfoAnnotationsDataSource = "ROBOTS_TXT"` - `const AttackLayer7TimeseriesGroupHTTPMethodResponseMetaConfidenceInfoAnnotationsDataSourceSpeed AttackLayer7TimeseriesGroupHTTPMethodResponseMetaConfidenceInfoAnnotationsDataSource = "SPEED"` - `const AttackLayer7TimeseriesGroupHTTPMethodResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI AttackLayer7TimeseriesGroupHTTPMethodResponseMetaConfidenceInfoAnnotationsDataSource = "WORKERS_AI"` - `Description string` - `EndDate Time` - `EventType AttackLayer7TimeseriesGroupHTTPMethodResponseMetaConfidenceInfoAnnotationsEventType` Event type for annotations. - `const AttackLayer7TimeseriesGroupHTTPMethodResponseMetaConfidenceInfoAnnotationsEventTypeEvent AttackLayer7TimeseriesGroupHTTPMethodResponseMetaConfidenceInfoAnnotationsEventType = "EVENT"` - `const AttackLayer7TimeseriesGroupHTTPMethodResponseMetaConfidenceInfoAnnotationsEventTypeGeneral AttackLayer7TimeseriesGroupHTTPMethodResponseMetaConfidenceInfoAnnotationsEventType = "GENERAL"` - `const AttackLayer7TimeseriesGroupHTTPMethodResponseMetaConfidenceInfoAnnotationsEventTypeOutage AttackLayer7TimeseriesGroupHTTPMethodResponseMetaConfidenceInfoAnnotationsEventType = "OUTAGE"` - `const AttackLayer7TimeseriesGroupHTTPMethodResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection AttackLayer7TimeseriesGroupHTTPMethodResponseMetaConfidenceInfoAnnotationsEventType = "PARTIAL_PROJECTION"` - `const AttackLayer7TimeseriesGroupHTTPMethodResponseMetaConfidenceInfoAnnotationsEventTypePipeline AttackLayer7TimeseriesGroupHTTPMethodResponseMetaConfidenceInfoAnnotationsEventType = "PIPELINE"` - `const AttackLayer7TimeseriesGroupHTTPMethodResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly AttackLayer7TimeseriesGroupHTTPMethodResponseMetaConfidenceInfoAnnotationsEventType = "TRAFFIC_ANOMALY"` - `IsInstantaneous bool` Whether event is a single point in time or a time range. - `LinkedURL string` - `StartDate Time` - `Level int64` Provides an indication of how much confidence Cloudflare has in the data. - `DateRange []AttackLayer7TimeseriesGroupHTTPMethodResponseMetaDateRange` - `EndTime Time` Adjusted end of date range. - `StartTime Time` Adjusted start of date range. - `LastUpdated Time` Timestamp of the last dataset update. - `Normalization AttackLayer7TimeseriesGroupHTTPMethodResponseMetaNormalization` Normalization method applied to the results. Refer to [Normalization methods](https://developers.cloudflare.com/radar/concepts/normalization/). - `const AttackLayer7TimeseriesGroupHTTPMethodResponseMetaNormalizationPercentage AttackLayer7TimeseriesGroupHTTPMethodResponseMetaNormalization = "PERCENTAGE"` - `const AttackLayer7TimeseriesGroupHTTPMethodResponseMetaNormalizationMin0Max AttackLayer7TimeseriesGroupHTTPMethodResponseMetaNormalization = "MIN0_MAX"` - `const AttackLayer7TimeseriesGroupHTTPMethodResponseMetaNormalizationMinMax AttackLayer7TimeseriesGroupHTTPMethodResponseMetaNormalization = "MIN_MAX"` - `const AttackLayer7TimeseriesGroupHTTPMethodResponseMetaNormalizationRawValues AttackLayer7TimeseriesGroupHTTPMethodResponseMetaNormalization = "RAW_VALUES"` - `const AttackLayer7TimeseriesGroupHTTPMethodResponseMetaNormalizationPercentageChange AttackLayer7TimeseriesGroupHTTPMethodResponseMetaNormalization = "PERCENTAGE_CHANGE"` - `const AttackLayer7TimeseriesGroupHTTPMethodResponseMetaNormalizationRollingAverage AttackLayer7TimeseriesGroupHTTPMethodResponseMetaNormalization = "ROLLING_AVERAGE"` - `const AttackLayer7TimeseriesGroupHTTPMethodResponseMetaNormalizationOverlappedPercentage AttackLayer7TimeseriesGroupHTTPMethodResponseMetaNormalization = "OVERLAPPED_PERCENTAGE"` - `const AttackLayer7TimeseriesGroupHTTPMethodResponseMetaNormalizationRatio AttackLayer7TimeseriesGroupHTTPMethodResponseMetaNormalization = "RATIO"` - `Units []AttackLayer7TimeseriesGroupHTTPMethodResponseMetaUnit` Measurement units for the results. - `Name string` - `Value string` - `Serie0 AttackLayer7TimeseriesGroupHTTPMethodResponseSerie0` - `Timestamps []Time` ### Example ```go 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.Layer7.TimeseriesGroups.HTTPMethod(context.TODO(), radar.AttackLayer7TimeseriesGroupHTTPMethodParams{ }) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", response.Meta) } ``` #### Response ```json { "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": { "timestamps": [ "2023-08-08T10:15:00Z" ] } }, "success": true } ``` ## Get layer 7 attacks by HTTP version time series `client.Radar.Attacks.Layer7.TimeseriesGroups.HTTPVersion(ctx, query) (*AttackLayer7TimeseriesGroupHTTPVersionResponse, error)` **get** `/radar/attacks/layer7/timeseries_groups/http_version` Retrieves the distribution of layer 7 attacks by HTTP version over time. ### Parameters - `query AttackLayer7TimeseriesGroupHTTPVersionParams` - `AggInterval param.Field[AttackLayer7TimeseriesGroupHTTPVersionParamsAggInterval]` Aggregation interval of the results (e.g., in 15 minutes or 1 hour intervals). Refer to [Aggregation intervals](https://developers.cloudflare.com/radar/concepts/aggregation-intervals/). - `const AttackLayer7TimeseriesGroupHTTPVersionParamsAggInterval15m AttackLayer7TimeseriesGroupHTTPVersionParamsAggInterval = "15m"` - `const AttackLayer7TimeseriesGroupHTTPVersionParamsAggInterval1h AttackLayer7TimeseriesGroupHTTPVersionParamsAggInterval = "1h"` - `const AttackLayer7TimeseriesGroupHTTPVersionParamsAggInterval1d AttackLayer7TimeseriesGroupHTTPVersionParamsAggInterval = "1d"` - `const AttackLayer7TimeseriesGroupHTTPVersionParamsAggInterval1w AttackLayer7TimeseriesGroupHTTPVersionParamsAggInterval = "1w"` - `ASN param.Field[[]string]` Filters results by Autonomous System. Specify one or more Autonomous System Numbers (ASNs) as a comma-separated list. Prefix with `-` to exclude ASNs from results. For example, `-174, 3356` excludes results from AS174, but includes results from AS3356. - `Continent param.Field[[]string]` 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]` End of the date range (inclusive). - `DateRange param.Field[[]string]` 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]` Start of the date range. - `Format param.Field[AttackLayer7TimeseriesGroupHTTPVersionParamsFormat]` Format in which results will be returned. - `const AttackLayer7TimeseriesGroupHTTPVersionParamsFormatJson AttackLayer7TimeseriesGroupHTTPVersionParamsFormat = "JSON"` - `const AttackLayer7TimeseriesGroupHTTPVersionParamsFormatCsv AttackLayer7TimeseriesGroupHTTPVersionParamsFormat = "CSV"` - `HTTPMethod param.Field[[]AttackLayer7TimeseriesGroupHTTPVersionParamsHTTPMethod]` Filters results by HTTP method. - `const AttackLayer7TimeseriesGroupHTTPVersionParamsHTTPMethodGet AttackLayer7TimeseriesGroupHTTPVersionParamsHTTPMethod = "GET"` - `const AttackLayer7TimeseriesGroupHTTPVersionParamsHTTPMethodPost AttackLayer7TimeseriesGroupHTTPVersionParamsHTTPMethod = "POST"` - `const AttackLayer7TimeseriesGroupHTTPVersionParamsHTTPMethodDelete AttackLayer7TimeseriesGroupHTTPVersionParamsHTTPMethod = "DELETE"` - `const AttackLayer7TimeseriesGroupHTTPVersionParamsHTTPMethodPut AttackLayer7TimeseriesGroupHTTPVersionParamsHTTPMethod = "PUT"` - `const AttackLayer7TimeseriesGroupHTTPVersionParamsHTTPMethodHead AttackLayer7TimeseriesGroupHTTPVersionParamsHTTPMethod = "HEAD"` - `const AttackLayer7TimeseriesGroupHTTPVersionParamsHTTPMethodPurge AttackLayer7TimeseriesGroupHTTPVersionParamsHTTPMethod = "PURGE"` - `const AttackLayer7TimeseriesGroupHTTPVersionParamsHTTPMethodOptions AttackLayer7TimeseriesGroupHTTPVersionParamsHTTPMethod = "OPTIONS"` - `const AttackLayer7TimeseriesGroupHTTPVersionParamsHTTPMethodPropfind AttackLayer7TimeseriesGroupHTTPVersionParamsHTTPMethod = "PROPFIND"` - `const AttackLayer7TimeseriesGroupHTTPVersionParamsHTTPMethodMkcol AttackLayer7TimeseriesGroupHTTPVersionParamsHTTPMethod = "MKCOL"` - `const AttackLayer7TimeseriesGroupHTTPVersionParamsHTTPMethodPatch AttackLayer7TimeseriesGroupHTTPVersionParamsHTTPMethod = "PATCH"` - `const AttackLayer7TimeseriesGroupHTTPVersionParamsHTTPMethodACL AttackLayer7TimeseriesGroupHTTPVersionParamsHTTPMethod = "ACL"` - `const AttackLayer7TimeseriesGroupHTTPVersionParamsHTTPMethodBcopy AttackLayer7TimeseriesGroupHTTPVersionParamsHTTPMethod = "BCOPY"` - `const AttackLayer7TimeseriesGroupHTTPVersionParamsHTTPMethodBdelete AttackLayer7TimeseriesGroupHTTPVersionParamsHTTPMethod = "BDELETE"` - `const AttackLayer7TimeseriesGroupHTTPVersionParamsHTTPMethodBmove AttackLayer7TimeseriesGroupHTTPVersionParamsHTTPMethod = "BMOVE"` - `const AttackLayer7TimeseriesGroupHTTPVersionParamsHTTPMethodBpropfind AttackLayer7TimeseriesGroupHTTPVersionParamsHTTPMethod = "BPROPFIND"` - `const AttackLayer7TimeseriesGroupHTTPVersionParamsHTTPMethodBproppatch AttackLayer7TimeseriesGroupHTTPVersionParamsHTTPMethod = "BPROPPATCH"` - `const AttackLayer7TimeseriesGroupHTTPVersionParamsHTTPMethodCheckin AttackLayer7TimeseriesGroupHTTPVersionParamsHTTPMethod = "CHECKIN"` - `const AttackLayer7TimeseriesGroupHTTPVersionParamsHTTPMethodCheckout AttackLayer7TimeseriesGroupHTTPVersionParamsHTTPMethod = "CHECKOUT"` - `const AttackLayer7TimeseriesGroupHTTPVersionParamsHTTPMethodConnect AttackLayer7TimeseriesGroupHTTPVersionParamsHTTPMethod = "CONNECT"` - `const AttackLayer7TimeseriesGroupHTTPVersionParamsHTTPMethodCopy AttackLayer7TimeseriesGroupHTTPVersionParamsHTTPMethod = "COPY"` - `const AttackLayer7TimeseriesGroupHTTPVersionParamsHTTPMethodLabel AttackLayer7TimeseriesGroupHTTPVersionParamsHTTPMethod = "LABEL"` - `const AttackLayer7TimeseriesGroupHTTPVersionParamsHTTPMethodLock AttackLayer7TimeseriesGroupHTTPVersionParamsHTTPMethod = "LOCK"` - `const AttackLayer7TimeseriesGroupHTTPVersionParamsHTTPMethodMerge AttackLayer7TimeseriesGroupHTTPVersionParamsHTTPMethod = "MERGE"` - `const AttackLayer7TimeseriesGroupHTTPVersionParamsHTTPMethodMkactivity AttackLayer7TimeseriesGroupHTTPVersionParamsHTTPMethod = "MKACTIVITY"` - `const AttackLayer7TimeseriesGroupHTTPVersionParamsHTTPMethodMkworkspace AttackLayer7TimeseriesGroupHTTPVersionParamsHTTPMethod = "MKWORKSPACE"` - `const AttackLayer7TimeseriesGroupHTTPVersionParamsHTTPMethodMove AttackLayer7TimeseriesGroupHTTPVersionParamsHTTPMethod = "MOVE"` - `const AttackLayer7TimeseriesGroupHTTPVersionParamsHTTPMethodNotify AttackLayer7TimeseriesGroupHTTPVersionParamsHTTPMethod = "NOTIFY"` - `const AttackLayer7TimeseriesGroupHTTPVersionParamsHTTPMethodOrderpatch AttackLayer7TimeseriesGroupHTTPVersionParamsHTTPMethod = "ORDERPATCH"` - `const AttackLayer7TimeseriesGroupHTTPVersionParamsHTTPMethodPoll AttackLayer7TimeseriesGroupHTTPVersionParamsHTTPMethod = "POLL"` - `const AttackLayer7TimeseriesGroupHTTPVersionParamsHTTPMethodProppatch AttackLayer7TimeseriesGroupHTTPVersionParamsHTTPMethod = "PROPPATCH"` - `const AttackLayer7TimeseriesGroupHTTPVersionParamsHTTPMethodReport AttackLayer7TimeseriesGroupHTTPVersionParamsHTTPMethod = "REPORT"` - `const AttackLayer7TimeseriesGroupHTTPVersionParamsHTTPMethodSearch AttackLayer7TimeseriesGroupHTTPVersionParamsHTTPMethod = "SEARCH"` - `const AttackLayer7TimeseriesGroupHTTPVersionParamsHTTPMethodSubscribe AttackLayer7TimeseriesGroupHTTPVersionParamsHTTPMethod = "SUBSCRIBE"` - `const AttackLayer7TimeseriesGroupHTTPVersionParamsHTTPMethodTrace AttackLayer7TimeseriesGroupHTTPVersionParamsHTTPMethod = "TRACE"` - `const AttackLayer7TimeseriesGroupHTTPVersionParamsHTTPMethodUncheckout AttackLayer7TimeseriesGroupHTTPVersionParamsHTTPMethod = "UNCHECKOUT"` - `const AttackLayer7TimeseriesGroupHTTPVersionParamsHTTPMethodUnlock AttackLayer7TimeseriesGroupHTTPVersionParamsHTTPMethod = "UNLOCK"` - `const AttackLayer7TimeseriesGroupHTTPVersionParamsHTTPMethodUnsubscribe AttackLayer7TimeseriesGroupHTTPVersionParamsHTTPMethod = "UNSUBSCRIBE"` - `const AttackLayer7TimeseriesGroupHTTPVersionParamsHTTPMethodUpdate AttackLayer7TimeseriesGroupHTTPVersionParamsHTTPMethod = "UPDATE"` - `const AttackLayer7TimeseriesGroupHTTPVersionParamsHTTPMethodVersioncontrol AttackLayer7TimeseriesGroupHTTPVersionParamsHTTPMethod = "VERSIONCONTROL"` - `const AttackLayer7TimeseriesGroupHTTPVersionParamsHTTPMethodBaselinecontrol AttackLayer7TimeseriesGroupHTTPVersionParamsHTTPMethod = "BASELINECONTROL"` - `const AttackLayer7TimeseriesGroupHTTPVersionParamsHTTPMethodXmsenumatts AttackLayer7TimeseriesGroupHTTPVersionParamsHTTPMethod = "XMSENUMATTS"` - `const AttackLayer7TimeseriesGroupHTTPVersionParamsHTTPMethodRpcOutData AttackLayer7TimeseriesGroupHTTPVersionParamsHTTPMethod = "RPC_OUT_DATA"` - `const AttackLayer7TimeseriesGroupHTTPVersionParamsHTTPMethodRpcInData AttackLayer7TimeseriesGroupHTTPVersionParamsHTTPMethod = "RPC_IN_DATA"` - `const AttackLayer7TimeseriesGroupHTTPVersionParamsHTTPMethodJson AttackLayer7TimeseriesGroupHTTPVersionParamsHTTPMethod = "JSON"` - `const AttackLayer7TimeseriesGroupHTTPVersionParamsHTTPMethodCook AttackLayer7TimeseriesGroupHTTPVersionParamsHTTPMethod = "COOK"` - `const AttackLayer7TimeseriesGroupHTTPVersionParamsHTTPMethodTrack AttackLayer7TimeseriesGroupHTTPVersionParamsHTTPMethod = "TRACK"` - `IPVersion param.Field[[]AttackLayer7TimeseriesGroupHTTPVersionParamsIPVersion]` Filters results by IP version (Ipv4 vs. IPv6). - `const AttackLayer7TimeseriesGroupHTTPVersionParamsIPVersionIPv4 AttackLayer7TimeseriesGroupHTTPVersionParamsIPVersion = "IPv4"` - `const AttackLayer7TimeseriesGroupHTTPVersionParamsIPVersionIPv6 AttackLayer7TimeseriesGroupHTTPVersionParamsIPVersion = "IPv6"` - `Location param.Field[[]string]` 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. - `MitigationProduct param.Field[[]AttackLayer7TimeseriesGroupHTTPVersionParamsMitigationProduct]` Filters the results by layer 7 mitigation product. - `const AttackLayer7TimeseriesGroupHTTPVersionParamsMitigationProductDDoS AttackLayer7TimeseriesGroupHTTPVersionParamsMitigationProduct = "DDOS"` - `const AttackLayer7TimeseriesGroupHTTPVersionParamsMitigationProductWAF AttackLayer7TimeseriesGroupHTTPVersionParamsMitigationProduct = "WAF"` - `const AttackLayer7TimeseriesGroupHTTPVersionParamsMitigationProductBotManagement AttackLayer7TimeseriesGroupHTTPVersionParamsMitigationProduct = "BOT_MANAGEMENT"` - `const AttackLayer7TimeseriesGroupHTTPVersionParamsMitigationProductAccessRules AttackLayer7TimeseriesGroupHTTPVersionParamsMitigationProduct = "ACCESS_RULES"` - `const AttackLayer7TimeseriesGroupHTTPVersionParamsMitigationProductIPReputation AttackLayer7TimeseriesGroupHTTPVersionParamsMitigationProduct = "IP_REPUTATION"` - `const AttackLayer7TimeseriesGroupHTTPVersionParamsMitigationProductAPIShield AttackLayer7TimeseriesGroupHTTPVersionParamsMitigationProduct = "API_SHIELD"` - `const AttackLayer7TimeseriesGroupHTTPVersionParamsMitigationProductDataLossPrevention AttackLayer7TimeseriesGroupHTTPVersionParamsMitigationProduct = "DATA_LOSS_PREVENTION"` - `Name param.Field[[]string]` Array of names used to label the series in the response. - `Normalization param.Field[AttackLayer7TimeseriesGroupHTTPVersionParamsNormalization]` Normalization method applied to the results. Refer to [Normalization methods](https://developers.cloudflare.com/radar/concepts/normalization/). - `const AttackLayer7TimeseriesGroupHTTPVersionParamsNormalizationPercentage AttackLayer7TimeseriesGroupHTTPVersionParamsNormalization = "PERCENTAGE"` - `const AttackLayer7TimeseriesGroupHTTPVersionParamsNormalizationMin0Max AttackLayer7TimeseriesGroupHTTPVersionParamsNormalization = "MIN0_MAX"` ### Returns - `type AttackLayer7TimeseriesGroupHTTPVersionResponse struct{…}` - `Meta AttackLayer7TimeseriesGroupHTTPVersionResponseMeta` Metadata for the results. - `AggInterval AttackLayer7TimeseriesGroupHTTPVersionResponseMetaAggInterval` Aggregation interval of the results (e.g., in 15 minutes or 1 hour intervals). Refer to [Aggregation intervals](https://developers.cloudflare.com/radar/concepts/aggregation-intervals/). - `const AttackLayer7TimeseriesGroupHTTPVersionResponseMetaAggIntervalFifteenMinutes AttackLayer7TimeseriesGroupHTTPVersionResponseMetaAggInterval = "FIFTEEN_MINUTES"` - `const AttackLayer7TimeseriesGroupHTTPVersionResponseMetaAggIntervalOneHour AttackLayer7TimeseriesGroupHTTPVersionResponseMetaAggInterval = "ONE_HOUR"` - `const AttackLayer7TimeseriesGroupHTTPVersionResponseMetaAggIntervalOneDay AttackLayer7TimeseriesGroupHTTPVersionResponseMetaAggInterval = "ONE_DAY"` - `const AttackLayer7TimeseriesGroupHTTPVersionResponseMetaAggIntervalOneWeek AttackLayer7TimeseriesGroupHTTPVersionResponseMetaAggInterval = "ONE_WEEK"` - `const AttackLayer7TimeseriesGroupHTTPVersionResponseMetaAggIntervalOneMonth AttackLayer7TimeseriesGroupHTTPVersionResponseMetaAggInterval = "ONE_MONTH"` - `ConfidenceInfo AttackLayer7TimeseriesGroupHTTPVersionResponseMetaConfidenceInfo` - `Annotations []AttackLayer7TimeseriesGroupHTTPVersionResponseMetaConfidenceInfoAnnotation` - `DataSource AttackLayer7TimeseriesGroupHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSource` Data source for annotations. - `const AttackLayer7TimeseriesGroupHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSourceAll AttackLayer7TimeseriesGroupHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "ALL"` - `const AttackLayer7TimeseriesGroupHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSourceAIBots AttackLayer7TimeseriesGroupHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "AI_BOTS"` - `const AttackLayer7TimeseriesGroupHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway AttackLayer7TimeseriesGroupHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "AI_GATEWAY"` - `const AttackLayer7TimeseriesGroupHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSourceBGP AttackLayer7TimeseriesGroupHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "BGP"` - `const AttackLayer7TimeseriesGroupHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSourceBots AttackLayer7TimeseriesGroupHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "BOTS"` - `const AttackLayer7TimeseriesGroupHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly AttackLayer7TimeseriesGroupHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "CONNECTION_ANOMALY"` - `const AttackLayer7TimeseriesGroupHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSourceCT AttackLayer7TimeseriesGroupHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "CT"` - `const AttackLayer7TimeseriesGroupHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSourceDNS AttackLayer7TimeseriesGroupHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "DNS"` - `const AttackLayer7TimeseriesGroupHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude AttackLayer7TimeseriesGroupHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_MAGNITUDE"` - `const AttackLayer7TimeseriesGroupHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112 AttackLayer7TimeseriesGroupHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_AS112"` - `const AttackLayer7TimeseriesGroupHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSourceDos AttackLayer7TimeseriesGroupHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "DOS"` - `const AttackLayer7TimeseriesGroupHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting AttackLayer7TimeseriesGroupHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_ROUTING"` - `const AttackLayer7TimeseriesGroupHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity AttackLayer7TimeseriesGroupHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_SECURITY"` - `const AttackLayer7TimeseriesGroupHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSourceFw AttackLayer7TimeseriesGroupHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "FW"` - `const AttackLayer7TimeseriesGroupHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSourceFwPg AttackLayer7TimeseriesGroupHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "FW_PG"` - `const AttackLayer7TimeseriesGroupHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSourceHTTP AttackLayer7TimeseriesGroupHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP"` - `const AttackLayer7TimeseriesGroupHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl AttackLayer7TimeseriesGroupHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CONTROL"` - `const AttackLayer7TimeseriesGroupHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer AttackLayer7TimeseriesGroupHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CRAWLER_REFERER"` - `const AttackLayer7TimeseriesGroupHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins AttackLayer7TimeseriesGroupHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_ORIGINS"` - `const AttackLayer7TimeseriesGroupHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSourceIQI AttackLayer7TimeseriesGroupHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "IQI"` - `const AttackLayer7TimeseriesGroupHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials AttackLayer7TimeseriesGroupHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "LEAKED_CREDENTIALS"` - `const AttackLayer7TimeseriesGroupHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSourceNet AttackLayer7TimeseriesGroupHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "NET"` - `const AttackLayer7TimeseriesGroupHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT AttackLayer7TimeseriesGroupHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "ROBOTS_TXT"` - `const AttackLayer7TimeseriesGroupHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSourceSpeed AttackLayer7TimeseriesGroupHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "SPEED"` - `const AttackLayer7TimeseriesGroupHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI AttackLayer7TimeseriesGroupHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "WORKERS_AI"` - `Description string` - `EndDate Time` - `EventType AttackLayer7TimeseriesGroupHTTPVersionResponseMetaConfidenceInfoAnnotationsEventType` Event type for annotations. - `const AttackLayer7TimeseriesGroupHTTPVersionResponseMetaConfidenceInfoAnnotationsEventTypeEvent AttackLayer7TimeseriesGroupHTTPVersionResponseMetaConfidenceInfoAnnotationsEventType = "EVENT"` - `const AttackLayer7TimeseriesGroupHTTPVersionResponseMetaConfidenceInfoAnnotationsEventTypeGeneral AttackLayer7TimeseriesGroupHTTPVersionResponseMetaConfidenceInfoAnnotationsEventType = "GENERAL"` - `const AttackLayer7TimeseriesGroupHTTPVersionResponseMetaConfidenceInfoAnnotationsEventTypeOutage AttackLayer7TimeseriesGroupHTTPVersionResponseMetaConfidenceInfoAnnotationsEventType = "OUTAGE"` - `const AttackLayer7TimeseriesGroupHTTPVersionResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection AttackLayer7TimeseriesGroupHTTPVersionResponseMetaConfidenceInfoAnnotationsEventType = "PARTIAL_PROJECTION"` - `const AttackLayer7TimeseriesGroupHTTPVersionResponseMetaConfidenceInfoAnnotationsEventTypePipeline AttackLayer7TimeseriesGroupHTTPVersionResponseMetaConfidenceInfoAnnotationsEventType = "PIPELINE"` - `const AttackLayer7TimeseriesGroupHTTPVersionResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly AttackLayer7TimeseriesGroupHTTPVersionResponseMetaConfidenceInfoAnnotationsEventType = "TRAFFIC_ANOMALY"` - `IsInstantaneous bool` Whether event is a single point in time or a time range. - `LinkedURL string` - `StartDate Time` - `Level int64` Provides an indication of how much confidence Cloudflare has in the data. - `DateRange []AttackLayer7TimeseriesGroupHTTPVersionResponseMetaDateRange` - `EndTime Time` Adjusted end of date range. - `StartTime Time` Adjusted start of date range. - `LastUpdated Time` Timestamp of the last dataset update. - `Normalization AttackLayer7TimeseriesGroupHTTPVersionResponseMetaNormalization` Normalization method applied to the results. Refer to [Normalization methods](https://developers.cloudflare.com/radar/concepts/normalization/). - `const AttackLayer7TimeseriesGroupHTTPVersionResponseMetaNormalizationPercentage AttackLayer7TimeseriesGroupHTTPVersionResponseMetaNormalization = "PERCENTAGE"` - `const AttackLayer7TimeseriesGroupHTTPVersionResponseMetaNormalizationMin0Max AttackLayer7TimeseriesGroupHTTPVersionResponseMetaNormalization = "MIN0_MAX"` - `const AttackLayer7TimeseriesGroupHTTPVersionResponseMetaNormalizationMinMax AttackLayer7TimeseriesGroupHTTPVersionResponseMetaNormalization = "MIN_MAX"` - `const AttackLayer7TimeseriesGroupHTTPVersionResponseMetaNormalizationRawValues AttackLayer7TimeseriesGroupHTTPVersionResponseMetaNormalization = "RAW_VALUES"` - `const AttackLayer7TimeseriesGroupHTTPVersionResponseMetaNormalizationPercentageChange AttackLayer7TimeseriesGroupHTTPVersionResponseMetaNormalization = "PERCENTAGE_CHANGE"` - `const AttackLayer7TimeseriesGroupHTTPVersionResponseMetaNormalizationRollingAverage AttackLayer7TimeseriesGroupHTTPVersionResponseMetaNormalization = "ROLLING_AVERAGE"` - `const AttackLayer7TimeseriesGroupHTTPVersionResponseMetaNormalizationOverlappedPercentage AttackLayer7TimeseriesGroupHTTPVersionResponseMetaNormalization = "OVERLAPPED_PERCENTAGE"` - `const AttackLayer7TimeseriesGroupHTTPVersionResponseMetaNormalizationRatio AttackLayer7TimeseriesGroupHTTPVersionResponseMetaNormalization = "RATIO"` - `Units []AttackLayer7TimeseriesGroupHTTPVersionResponseMetaUnit` Measurement units for the results. - `Name string` - `Value string` - `Serie0 AttackLayer7TimeseriesGroupHTTPVersionResponseSerie0` - `HTTP1X []string` - `HTTP2 []string` - `HTTP3 []string` - `Timestamps []Time` ### Example ```go 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.Layer7.TimeseriesGroups.HTTPVersion(context.TODO(), radar.AttackLayer7TimeseriesGroupHTTPVersionParams{ }) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", response.Meta) } ``` #### Response ```json { "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": { "HTTP/1.x": [ "50.338734" ], "HTTP/2": [ "48.661266" ], "HTTP/3": [ "1.22108" ], "timestamps": [ "2023-10-01T00:00:00Z" ] } }, "success": true } ``` ## Get layer 7 attacks by managed rules time series `client.Radar.Attacks.Layer7.TimeseriesGroups.ManagedRules(ctx, query) (*AttackLayer7TimeseriesGroupManagedRulesResponse, error)` **get** `/radar/attacks/layer7/timeseries_groups/managed_rules` Retrieves the distribution of layer 7 attacks by managed rules over time. ### Parameters - `query AttackLayer7TimeseriesGroupManagedRulesParams` - `AggInterval param.Field[AttackLayer7TimeseriesGroupManagedRulesParamsAggInterval]` Aggregation interval of the results (e.g., in 15 minutes or 1 hour intervals). Refer to [Aggregation intervals](https://developers.cloudflare.com/radar/concepts/aggregation-intervals/). - `const AttackLayer7TimeseriesGroupManagedRulesParamsAggInterval15m AttackLayer7TimeseriesGroupManagedRulesParamsAggInterval = "15m"` - `const AttackLayer7TimeseriesGroupManagedRulesParamsAggInterval1h AttackLayer7TimeseriesGroupManagedRulesParamsAggInterval = "1h"` - `const AttackLayer7TimeseriesGroupManagedRulesParamsAggInterval1d AttackLayer7TimeseriesGroupManagedRulesParamsAggInterval = "1d"` - `const AttackLayer7TimeseriesGroupManagedRulesParamsAggInterval1w AttackLayer7TimeseriesGroupManagedRulesParamsAggInterval = "1w"` - `ASN param.Field[[]string]` Filters results by Autonomous System. Specify one or more Autonomous System Numbers (ASNs) as a comma-separated list. Prefix with `-` to exclude ASNs from results. For example, `-174, 3356` excludes results from AS174, but includes results from AS3356. - `Continent param.Field[[]string]` 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]` End of the date range (inclusive). - `DateRange param.Field[[]string]` 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]` Start of the date range. - `Format param.Field[AttackLayer7TimeseriesGroupManagedRulesParamsFormat]` Format in which results will be returned. - `const AttackLayer7TimeseriesGroupManagedRulesParamsFormatJson AttackLayer7TimeseriesGroupManagedRulesParamsFormat = "JSON"` - `const AttackLayer7TimeseriesGroupManagedRulesParamsFormatCsv AttackLayer7TimeseriesGroupManagedRulesParamsFormat = "CSV"` - `HTTPMethod param.Field[[]AttackLayer7TimeseriesGroupManagedRulesParamsHTTPMethod]` Filters results by HTTP method. - `const AttackLayer7TimeseriesGroupManagedRulesParamsHTTPMethodGet AttackLayer7TimeseriesGroupManagedRulesParamsHTTPMethod = "GET"` - `const AttackLayer7TimeseriesGroupManagedRulesParamsHTTPMethodPost AttackLayer7TimeseriesGroupManagedRulesParamsHTTPMethod = "POST"` - `const AttackLayer7TimeseriesGroupManagedRulesParamsHTTPMethodDelete AttackLayer7TimeseriesGroupManagedRulesParamsHTTPMethod = "DELETE"` - `const AttackLayer7TimeseriesGroupManagedRulesParamsHTTPMethodPut AttackLayer7TimeseriesGroupManagedRulesParamsHTTPMethod = "PUT"` - `const AttackLayer7TimeseriesGroupManagedRulesParamsHTTPMethodHead AttackLayer7TimeseriesGroupManagedRulesParamsHTTPMethod = "HEAD"` - `const AttackLayer7TimeseriesGroupManagedRulesParamsHTTPMethodPurge AttackLayer7TimeseriesGroupManagedRulesParamsHTTPMethod = "PURGE"` - `const AttackLayer7TimeseriesGroupManagedRulesParamsHTTPMethodOptions AttackLayer7TimeseriesGroupManagedRulesParamsHTTPMethod = "OPTIONS"` - `const AttackLayer7TimeseriesGroupManagedRulesParamsHTTPMethodPropfind AttackLayer7TimeseriesGroupManagedRulesParamsHTTPMethod = "PROPFIND"` - `const AttackLayer7TimeseriesGroupManagedRulesParamsHTTPMethodMkcol AttackLayer7TimeseriesGroupManagedRulesParamsHTTPMethod = "MKCOL"` - `const AttackLayer7TimeseriesGroupManagedRulesParamsHTTPMethodPatch AttackLayer7TimeseriesGroupManagedRulesParamsHTTPMethod = "PATCH"` - `const AttackLayer7TimeseriesGroupManagedRulesParamsHTTPMethodACL AttackLayer7TimeseriesGroupManagedRulesParamsHTTPMethod = "ACL"` - `const AttackLayer7TimeseriesGroupManagedRulesParamsHTTPMethodBcopy AttackLayer7TimeseriesGroupManagedRulesParamsHTTPMethod = "BCOPY"` - `const AttackLayer7TimeseriesGroupManagedRulesParamsHTTPMethodBdelete AttackLayer7TimeseriesGroupManagedRulesParamsHTTPMethod = "BDELETE"` - `const AttackLayer7TimeseriesGroupManagedRulesParamsHTTPMethodBmove AttackLayer7TimeseriesGroupManagedRulesParamsHTTPMethod = "BMOVE"` - `const AttackLayer7TimeseriesGroupManagedRulesParamsHTTPMethodBpropfind AttackLayer7TimeseriesGroupManagedRulesParamsHTTPMethod = "BPROPFIND"` - `const AttackLayer7TimeseriesGroupManagedRulesParamsHTTPMethodBproppatch AttackLayer7TimeseriesGroupManagedRulesParamsHTTPMethod = "BPROPPATCH"` - `const AttackLayer7TimeseriesGroupManagedRulesParamsHTTPMethodCheckin AttackLayer7TimeseriesGroupManagedRulesParamsHTTPMethod = "CHECKIN"` - `const AttackLayer7TimeseriesGroupManagedRulesParamsHTTPMethodCheckout AttackLayer7TimeseriesGroupManagedRulesParamsHTTPMethod = "CHECKOUT"` - `const AttackLayer7TimeseriesGroupManagedRulesParamsHTTPMethodConnect AttackLayer7TimeseriesGroupManagedRulesParamsHTTPMethod = "CONNECT"` - `const AttackLayer7TimeseriesGroupManagedRulesParamsHTTPMethodCopy AttackLayer7TimeseriesGroupManagedRulesParamsHTTPMethod = "COPY"` - `const AttackLayer7TimeseriesGroupManagedRulesParamsHTTPMethodLabel AttackLayer7TimeseriesGroupManagedRulesParamsHTTPMethod = "LABEL"` - `const AttackLayer7TimeseriesGroupManagedRulesParamsHTTPMethodLock AttackLayer7TimeseriesGroupManagedRulesParamsHTTPMethod = "LOCK"` - `const AttackLayer7TimeseriesGroupManagedRulesParamsHTTPMethodMerge AttackLayer7TimeseriesGroupManagedRulesParamsHTTPMethod = "MERGE"` - `const AttackLayer7TimeseriesGroupManagedRulesParamsHTTPMethodMkactivity AttackLayer7TimeseriesGroupManagedRulesParamsHTTPMethod = "MKACTIVITY"` - `const AttackLayer7TimeseriesGroupManagedRulesParamsHTTPMethodMkworkspace AttackLayer7TimeseriesGroupManagedRulesParamsHTTPMethod = "MKWORKSPACE"` - `const AttackLayer7TimeseriesGroupManagedRulesParamsHTTPMethodMove AttackLayer7TimeseriesGroupManagedRulesParamsHTTPMethod = "MOVE"` - `const AttackLayer7TimeseriesGroupManagedRulesParamsHTTPMethodNotify AttackLayer7TimeseriesGroupManagedRulesParamsHTTPMethod = "NOTIFY"` - `const AttackLayer7TimeseriesGroupManagedRulesParamsHTTPMethodOrderpatch AttackLayer7TimeseriesGroupManagedRulesParamsHTTPMethod = "ORDERPATCH"` - `const AttackLayer7TimeseriesGroupManagedRulesParamsHTTPMethodPoll AttackLayer7TimeseriesGroupManagedRulesParamsHTTPMethod = "POLL"` - `const AttackLayer7TimeseriesGroupManagedRulesParamsHTTPMethodProppatch AttackLayer7TimeseriesGroupManagedRulesParamsHTTPMethod = "PROPPATCH"` - `const AttackLayer7TimeseriesGroupManagedRulesParamsHTTPMethodReport AttackLayer7TimeseriesGroupManagedRulesParamsHTTPMethod = "REPORT"` - `const AttackLayer7TimeseriesGroupManagedRulesParamsHTTPMethodSearch AttackLayer7TimeseriesGroupManagedRulesParamsHTTPMethod = "SEARCH"` - `const AttackLayer7TimeseriesGroupManagedRulesParamsHTTPMethodSubscribe AttackLayer7TimeseriesGroupManagedRulesParamsHTTPMethod = "SUBSCRIBE"` - `const AttackLayer7TimeseriesGroupManagedRulesParamsHTTPMethodTrace AttackLayer7TimeseriesGroupManagedRulesParamsHTTPMethod = "TRACE"` - `const AttackLayer7TimeseriesGroupManagedRulesParamsHTTPMethodUncheckout AttackLayer7TimeseriesGroupManagedRulesParamsHTTPMethod = "UNCHECKOUT"` - `const AttackLayer7TimeseriesGroupManagedRulesParamsHTTPMethodUnlock AttackLayer7TimeseriesGroupManagedRulesParamsHTTPMethod = "UNLOCK"` - `const AttackLayer7TimeseriesGroupManagedRulesParamsHTTPMethodUnsubscribe AttackLayer7TimeseriesGroupManagedRulesParamsHTTPMethod = "UNSUBSCRIBE"` - `const AttackLayer7TimeseriesGroupManagedRulesParamsHTTPMethodUpdate AttackLayer7TimeseriesGroupManagedRulesParamsHTTPMethod = "UPDATE"` - `const AttackLayer7TimeseriesGroupManagedRulesParamsHTTPMethodVersioncontrol AttackLayer7TimeseriesGroupManagedRulesParamsHTTPMethod = "VERSIONCONTROL"` - `const AttackLayer7TimeseriesGroupManagedRulesParamsHTTPMethodBaselinecontrol AttackLayer7TimeseriesGroupManagedRulesParamsHTTPMethod = "BASELINECONTROL"` - `const AttackLayer7TimeseriesGroupManagedRulesParamsHTTPMethodXmsenumatts AttackLayer7TimeseriesGroupManagedRulesParamsHTTPMethod = "XMSENUMATTS"` - `const AttackLayer7TimeseriesGroupManagedRulesParamsHTTPMethodRpcOutData AttackLayer7TimeseriesGroupManagedRulesParamsHTTPMethod = "RPC_OUT_DATA"` - `const AttackLayer7TimeseriesGroupManagedRulesParamsHTTPMethodRpcInData AttackLayer7TimeseriesGroupManagedRulesParamsHTTPMethod = "RPC_IN_DATA"` - `const AttackLayer7TimeseriesGroupManagedRulesParamsHTTPMethodJson AttackLayer7TimeseriesGroupManagedRulesParamsHTTPMethod = "JSON"` - `const AttackLayer7TimeseriesGroupManagedRulesParamsHTTPMethodCook AttackLayer7TimeseriesGroupManagedRulesParamsHTTPMethod = "COOK"` - `const AttackLayer7TimeseriesGroupManagedRulesParamsHTTPMethodTrack AttackLayer7TimeseriesGroupManagedRulesParamsHTTPMethod = "TRACK"` - `HTTPVersion param.Field[[]AttackLayer7TimeseriesGroupManagedRulesParamsHTTPVersion]` Filters results by HTTP version. - `const AttackLayer7TimeseriesGroupManagedRulesParamsHTTPVersionHttPv1 AttackLayer7TimeseriesGroupManagedRulesParamsHTTPVersion = "HTTPv1"` - `const AttackLayer7TimeseriesGroupManagedRulesParamsHTTPVersionHttPv2 AttackLayer7TimeseriesGroupManagedRulesParamsHTTPVersion = "HTTPv2"` - `const AttackLayer7TimeseriesGroupManagedRulesParamsHTTPVersionHttPv3 AttackLayer7TimeseriesGroupManagedRulesParamsHTTPVersion = "HTTPv3"` - `IPVersion param.Field[[]AttackLayer7TimeseriesGroupManagedRulesParamsIPVersion]` Filters results by IP version (Ipv4 vs. IPv6). - `const AttackLayer7TimeseriesGroupManagedRulesParamsIPVersionIPv4 AttackLayer7TimeseriesGroupManagedRulesParamsIPVersion = "IPv4"` - `const AttackLayer7TimeseriesGroupManagedRulesParamsIPVersionIPv6 AttackLayer7TimeseriesGroupManagedRulesParamsIPVersion = "IPv6"` - `LimitPerGroup param.Field[int64]` 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]` 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. - `MitigationProduct param.Field[[]AttackLayer7TimeseriesGroupManagedRulesParamsMitigationProduct]` Filters the results by layer 7 mitigation product. - `const AttackLayer7TimeseriesGroupManagedRulesParamsMitigationProductDDoS AttackLayer7TimeseriesGroupManagedRulesParamsMitigationProduct = "DDOS"` - `const AttackLayer7TimeseriesGroupManagedRulesParamsMitigationProductWAF AttackLayer7TimeseriesGroupManagedRulesParamsMitigationProduct = "WAF"` - `const AttackLayer7TimeseriesGroupManagedRulesParamsMitigationProductBotManagement AttackLayer7TimeseriesGroupManagedRulesParamsMitigationProduct = "BOT_MANAGEMENT"` - `const AttackLayer7TimeseriesGroupManagedRulesParamsMitigationProductAccessRules AttackLayer7TimeseriesGroupManagedRulesParamsMitigationProduct = "ACCESS_RULES"` - `const AttackLayer7TimeseriesGroupManagedRulesParamsMitigationProductIPReputation AttackLayer7TimeseriesGroupManagedRulesParamsMitigationProduct = "IP_REPUTATION"` - `const AttackLayer7TimeseriesGroupManagedRulesParamsMitigationProductAPIShield AttackLayer7TimeseriesGroupManagedRulesParamsMitigationProduct = "API_SHIELD"` - `const AttackLayer7TimeseriesGroupManagedRulesParamsMitigationProductDataLossPrevention AttackLayer7TimeseriesGroupManagedRulesParamsMitigationProduct = "DATA_LOSS_PREVENTION"` - `Name param.Field[[]string]` Array of names used to label the series in the response. - `Normalization param.Field[AttackLayer7TimeseriesGroupManagedRulesParamsNormalization]` Normalization method applied to the results. Refer to [Normalization methods](https://developers.cloudflare.com/radar/concepts/normalization/). - `const AttackLayer7TimeseriesGroupManagedRulesParamsNormalizationPercentage AttackLayer7TimeseriesGroupManagedRulesParamsNormalization = "PERCENTAGE"` - `const AttackLayer7TimeseriesGroupManagedRulesParamsNormalizationMin0Max AttackLayer7TimeseriesGroupManagedRulesParamsNormalization = "MIN0_MAX"` ### Returns - `type AttackLayer7TimeseriesGroupManagedRulesResponse struct{…}` - `Meta AttackLayer7TimeseriesGroupManagedRulesResponseMeta` Metadata for the results. - `AggInterval AttackLayer7TimeseriesGroupManagedRulesResponseMetaAggInterval` Aggregation interval of the results (e.g., in 15 minutes or 1 hour intervals). Refer to [Aggregation intervals](https://developers.cloudflare.com/radar/concepts/aggregation-intervals/). - `const AttackLayer7TimeseriesGroupManagedRulesResponseMetaAggIntervalFifteenMinutes AttackLayer7TimeseriesGroupManagedRulesResponseMetaAggInterval = "FIFTEEN_MINUTES"` - `const AttackLayer7TimeseriesGroupManagedRulesResponseMetaAggIntervalOneHour AttackLayer7TimeseriesGroupManagedRulesResponseMetaAggInterval = "ONE_HOUR"` - `const AttackLayer7TimeseriesGroupManagedRulesResponseMetaAggIntervalOneDay AttackLayer7TimeseriesGroupManagedRulesResponseMetaAggInterval = "ONE_DAY"` - `const AttackLayer7TimeseriesGroupManagedRulesResponseMetaAggIntervalOneWeek AttackLayer7TimeseriesGroupManagedRulesResponseMetaAggInterval = "ONE_WEEK"` - `const AttackLayer7TimeseriesGroupManagedRulesResponseMetaAggIntervalOneMonth AttackLayer7TimeseriesGroupManagedRulesResponseMetaAggInterval = "ONE_MONTH"` - `ConfidenceInfo AttackLayer7TimeseriesGroupManagedRulesResponseMetaConfidenceInfo` - `Annotations []AttackLayer7TimeseriesGroupManagedRulesResponseMetaConfidenceInfoAnnotation` - `DataSource AttackLayer7TimeseriesGroupManagedRulesResponseMetaConfidenceInfoAnnotationsDataSource` Data source for annotations. - `const AttackLayer7TimeseriesGroupManagedRulesResponseMetaConfidenceInfoAnnotationsDataSourceAll AttackLayer7TimeseriesGroupManagedRulesResponseMetaConfidenceInfoAnnotationsDataSource = "ALL"` - `const AttackLayer7TimeseriesGroupManagedRulesResponseMetaConfidenceInfoAnnotationsDataSourceAIBots AttackLayer7TimeseriesGroupManagedRulesResponseMetaConfidenceInfoAnnotationsDataSource = "AI_BOTS"` - `const AttackLayer7TimeseriesGroupManagedRulesResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway AttackLayer7TimeseriesGroupManagedRulesResponseMetaConfidenceInfoAnnotationsDataSource = "AI_GATEWAY"` - `const AttackLayer7TimeseriesGroupManagedRulesResponseMetaConfidenceInfoAnnotationsDataSourceBGP AttackLayer7TimeseriesGroupManagedRulesResponseMetaConfidenceInfoAnnotationsDataSource = "BGP"` - `const AttackLayer7TimeseriesGroupManagedRulesResponseMetaConfidenceInfoAnnotationsDataSourceBots AttackLayer7TimeseriesGroupManagedRulesResponseMetaConfidenceInfoAnnotationsDataSource = "BOTS"` - `const AttackLayer7TimeseriesGroupManagedRulesResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly AttackLayer7TimeseriesGroupManagedRulesResponseMetaConfidenceInfoAnnotationsDataSource = "CONNECTION_ANOMALY"` - `const AttackLayer7TimeseriesGroupManagedRulesResponseMetaConfidenceInfoAnnotationsDataSourceCT AttackLayer7TimeseriesGroupManagedRulesResponseMetaConfidenceInfoAnnotationsDataSource = "CT"` - `const AttackLayer7TimeseriesGroupManagedRulesResponseMetaConfidenceInfoAnnotationsDataSourceDNS AttackLayer7TimeseriesGroupManagedRulesResponseMetaConfidenceInfoAnnotationsDataSource = "DNS"` - `const AttackLayer7TimeseriesGroupManagedRulesResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude AttackLayer7TimeseriesGroupManagedRulesResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_MAGNITUDE"` - `const AttackLayer7TimeseriesGroupManagedRulesResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112 AttackLayer7TimeseriesGroupManagedRulesResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_AS112"` - `const AttackLayer7TimeseriesGroupManagedRulesResponseMetaConfidenceInfoAnnotationsDataSourceDos AttackLayer7TimeseriesGroupManagedRulesResponseMetaConfidenceInfoAnnotationsDataSource = "DOS"` - `const AttackLayer7TimeseriesGroupManagedRulesResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting AttackLayer7TimeseriesGroupManagedRulesResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_ROUTING"` - `const AttackLayer7TimeseriesGroupManagedRulesResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity AttackLayer7TimeseriesGroupManagedRulesResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_SECURITY"` - `const AttackLayer7TimeseriesGroupManagedRulesResponseMetaConfidenceInfoAnnotationsDataSourceFw AttackLayer7TimeseriesGroupManagedRulesResponseMetaConfidenceInfoAnnotationsDataSource = "FW"` - `const AttackLayer7TimeseriesGroupManagedRulesResponseMetaConfidenceInfoAnnotationsDataSourceFwPg AttackLayer7TimeseriesGroupManagedRulesResponseMetaConfidenceInfoAnnotationsDataSource = "FW_PG"` - `const AttackLayer7TimeseriesGroupManagedRulesResponseMetaConfidenceInfoAnnotationsDataSourceHTTP AttackLayer7TimeseriesGroupManagedRulesResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP"` - `const AttackLayer7TimeseriesGroupManagedRulesResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl AttackLayer7TimeseriesGroupManagedRulesResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CONTROL"` - `const AttackLayer7TimeseriesGroupManagedRulesResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer AttackLayer7TimeseriesGroupManagedRulesResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CRAWLER_REFERER"` - `const AttackLayer7TimeseriesGroupManagedRulesResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins AttackLayer7TimeseriesGroupManagedRulesResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_ORIGINS"` - `const AttackLayer7TimeseriesGroupManagedRulesResponseMetaConfidenceInfoAnnotationsDataSourceIQI AttackLayer7TimeseriesGroupManagedRulesResponseMetaConfidenceInfoAnnotationsDataSource = "IQI"` - `const AttackLayer7TimeseriesGroupManagedRulesResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials AttackLayer7TimeseriesGroupManagedRulesResponseMetaConfidenceInfoAnnotationsDataSource = "LEAKED_CREDENTIALS"` - `const AttackLayer7TimeseriesGroupManagedRulesResponseMetaConfidenceInfoAnnotationsDataSourceNet AttackLayer7TimeseriesGroupManagedRulesResponseMetaConfidenceInfoAnnotationsDataSource = "NET"` - `const AttackLayer7TimeseriesGroupManagedRulesResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT AttackLayer7TimeseriesGroupManagedRulesResponseMetaConfidenceInfoAnnotationsDataSource = "ROBOTS_TXT"` - `const AttackLayer7TimeseriesGroupManagedRulesResponseMetaConfidenceInfoAnnotationsDataSourceSpeed AttackLayer7TimeseriesGroupManagedRulesResponseMetaConfidenceInfoAnnotationsDataSource = "SPEED"` - `const AttackLayer7TimeseriesGroupManagedRulesResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI AttackLayer7TimeseriesGroupManagedRulesResponseMetaConfidenceInfoAnnotationsDataSource = "WORKERS_AI"` - `Description string` - `EndDate Time` - `EventType AttackLayer7TimeseriesGroupManagedRulesResponseMetaConfidenceInfoAnnotationsEventType` Event type for annotations. - `const AttackLayer7TimeseriesGroupManagedRulesResponseMetaConfidenceInfoAnnotationsEventTypeEvent AttackLayer7TimeseriesGroupManagedRulesResponseMetaConfidenceInfoAnnotationsEventType = "EVENT"` - `const AttackLayer7TimeseriesGroupManagedRulesResponseMetaConfidenceInfoAnnotationsEventTypeGeneral AttackLayer7TimeseriesGroupManagedRulesResponseMetaConfidenceInfoAnnotationsEventType = "GENERAL"` - `const AttackLayer7TimeseriesGroupManagedRulesResponseMetaConfidenceInfoAnnotationsEventTypeOutage AttackLayer7TimeseriesGroupManagedRulesResponseMetaConfidenceInfoAnnotationsEventType = "OUTAGE"` - `const AttackLayer7TimeseriesGroupManagedRulesResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection AttackLayer7TimeseriesGroupManagedRulesResponseMetaConfidenceInfoAnnotationsEventType = "PARTIAL_PROJECTION"` - `const AttackLayer7TimeseriesGroupManagedRulesResponseMetaConfidenceInfoAnnotationsEventTypePipeline AttackLayer7TimeseriesGroupManagedRulesResponseMetaConfidenceInfoAnnotationsEventType = "PIPELINE"` - `const AttackLayer7TimeseriesGroupManagedRulesResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly AttackLayer7TimeseriesGroupManagedRulesResponseMetaConfidenceInfoAnnotationsEventType = "TRAFFIC_ANOMALY"` - `IsInstantaneous bool` Whether event is a single point in time or a time range. - `LinkedURL string` - `StartDate Time` - `Level int64` Provides an indication of how much confidence Cloudflare has in the data. - `DateRange []AttackLayer7TimeseriesGroupManagedRulesResponseMetaDateRange` - `EndTime Time` Adjusted end of date range. - `StartTime Time` Adjusted start of date range. - `LastUpdated Time` Timestamp of the last dataset update. - `Normalization AttackLayer7TimeseriesGroupManagedRulesResponseMetaNormalization` Normalization method applied to the results. Refer to [Normalization methods](https://developers.cloudflare.com/radar/concepts/normalization/). - `const AttackLayer7TimeseriesGroupManagedRulesResponseMetaNormalizationPercentage AttackLayer7TimeseriesGroupManagedRulesResponseMetaNormalization = "PERCENTAGE"` - `const AttackLayer7TimeseriesGroupManagedRulesResponseMetaNormalizationMin0Max AttackLayer7TimeseriesGroupManagedRulesResponseMetaNormalization = "MIN0_MAX"` - `const AttackLayer7TimeseriesGroupManagedRulesResponseMetaNormalizationMinMax AttackLayer7TimeseriesGroupManagedRulesResponseMetaNormalization = "MIN_MAX"` - `const AttackLayer7TimeseriesGroupManagedRulesResponseMetaNormalizationRawValues AttackLayer7TimeseriesGroupManagedRulesResponseMetaNormalization = "RAW_VALUES"` - `const AttackLayer7TimeseriesGroupManagedRulesResponseMetaNormalizationPercentageChange AttackLayer7TimeseriesGroupManagedRulesResponseMetaNormalization = "PERCENTAGE_CHANGE"` - `const AttackLayer7TimeseriesGroupManagedRulesResponseMetaNormalizationRollingAverage AttackLayer7TimeseriesGroupManagedRulesResponseMetaNormalization = "ROLLING_AVERAGE"` - `const AttackLayer7TimeseriesGroupManagedRulesResponseMetaNormalizationOverlappedPercentage AttackLayer7TimeseriesGroupManagedRulesResponseMetaNormalization = "OVERLAPPED_PERCENTAGE"` - `const AttackLayer7TimeseriesGroupManagedRulesResponseMetaNormalizationRatio AttackLayer7TimeseriesGroupManagedRulesResponseMetaNormalization = "RATIO"` - `Units []AttackLayer7TimeseriesGroupManagedRulesResponseMetaUnit` Measurement units for the results. - `Name string` - `Value string` - `Serie0 AttackLayer7TimeseriesGroupManagedRulesResponseSerie0` - `Timestamps []Time` ### Example ```go 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.Layer7.TimeseriesGroups.ManagedRules(context.TODO(), radar.AttackLayer7TimeseriesGroupManagedRulesParams{ }) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", response.Meta) } ``` #### Response ```json { "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": { "timestamps": [ "2023-08-08T10:15:00Z" ] } }, "success": true } ``` ## Get layer 7 attacks by mitigation product time series `client.Radar.Attacks.Layer7.TimeseriesGroups.MitigationProduct(ctx, query) (*AttackLayer7TimeseriesGroupMitigationProductResponse, error)` **get** `/radar/attacks/layer7/timeseries_groups/mitigation_product` Retrieves the distribution of layer 7 attacks by mitigation product over time. ### Parameters - `query AttackLayer7TimeseriesGroupMitigationProductParams` - `AggInterval param.Field[AttackLayer7TimeseriesGroupMitigationProductParamsAggInterval]` Aggregation interval of the results (e.g., in 15 minutes or 1 hour intervals). Refer to [Aggregation intervals](https://developers.cloudflare.com/radar/concepts/aggregation-intervals/). - `const AttackLayer7TimeseriesGroupMitigationProductParamsAggInterval15m AttackLayer7TimeseriesGroupMitigationProductParamsAggInterval = "15m"` - `const AttackLayer7TimeseriesGroupMitigationProductParamsAggInterval1h AttackLayer7TimeseriesGroupMitigationProductParamsAggInterval = "1h"` - `const AttackLayer7TimeseriesGroupMitigationProductParamsAggInterval1d AttackLayer7TimeseriesGroupMitigationProductParamsAggInterval = "1d"` - `const AttackLayer7TimeseriesGroupMitigationProductParamsAggInterval1w AttackLayer7TimeseriesGroupMitigationProductParamsAggInterval = "1w"` - `ASN param.Field[[]string]` Filters results by Autonomous System. Specify one or more Autonomous System Numbers (ASNs) as a comma-separated list. Prefix with `-` to exclude ASNs from results. For example, `-174, 3356` excludes results from AS174, but includes results from AS3356. - `Continent param.Field[[]string]` 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]` End of the date range (inclusive). - `DateRange param.Field[[]string]` 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]` Start of the date range. - `Format param.Field[AttackLayer7TimeseriesGroupMitigationProductParamsFormat]` Format in which results will be returned. - `const AttackLayer7TimeseriesGroupMitigationProductParamsFormatJson AttackLayer7TimeseriesGroupMitigationProductParamsFormat = "JSON"` - `const AttackLayer7TimeseriesGroupMitigationProductParamsFormatCsv AttackLayer7TimeseriesGroupMitigationProductParamsFormat = "CSV"` - `HTTPMethod param.Field[[]AttackLayer7TimeseriesGroupMitigationProductParamsHTTPMethod]` Filters results by HTTP method. - `const AttackLayer7TimeseriesGroupMitigationProductParamsHTTPMethodGet AttackLayer7TimeseriesGroupMitigationProductParamsHTTPMethod = "GET"` - `const AttackLayer7TimeseriesGroupMitigationProductParamsHTTPMethodPost AttackLayer7TimeseriesGroupMitigationProductParamsHTTPMethod = "POST"` - `const AttackLayer7TimeseriesGroupMitigationProductParamsHTTPMethodDelete AttackLayer7TimeseriesGroupMitigationProductParamsHTTPMethod = "DELETE"` - `const AttackLayer7TimeseriesGroupMitigationProductParamsHTTPMethodPut AttackLayer7TimeseriesGroupMitigationProductParamsHTTPMethod = "PUT"` - `const AttackLayer7TimeseriesGroupMitigationProductParamsHTTPMethodHead AttackLayer7TimeseriesGroupMitigationProductParamsHTTPMethod = "HEAD"` - `const AttackLayer7TimeseriesGroupMitigationProductParamsHTTPMethodPurge AttackLayer7TimeseriesGroupMitigationProductParamsHTTPMethod = "PURGE"` - `const AttackLayer7TimeseriesGroupMitigationProductParamsHTTPMethodOptions AttackLayer7TimeseriesGroupMitigationProductParamsHTTPMethod = "OPTIONS"` - `const AttackLayer7TimeseriesGroupMitigationProductParamsHTTPMethodPropfind AttackLayer7TimeseriesGroupMitigationProductParamsHTTPMethod = "PROPFIND"` - `const AttackLayer7TimeseriesGroupMitigationProductParamsHTTPMethodMkcol AttackLayer7TimeseriesGroupMitigationProductParamsHTTPMethod = "MKCOL"` - `const AttackLayer7TimeseriesGroupMitigationProductParamsHTTPMethodPatch AttackLayer7TimeseriesGroupMitigationProductParamsHTTPMethod = "PATCH"` - `const AttackLayer7TimeseriesGroupMitigationProductParamsHTTPMethodACL AttackLayer7TimeseriesGroupMitigationProductParamsHTTPMethod = "ACL"` - `const AttackLayer7TimeseriesGroupMitigationProductParamsHTTPMethodBcopy AttackLayer7TimeseriesGroupMitigationProductParamsHTTPMethod = "BCOPY"` - `const AttackLayer7TimeseriesGroupMitigationProductParamsHTTPMethodBdelete AttackLayer7TimeseriesGroupMitigationProductParamsHTTPMethod = "BDELETE"` - `const AttackLayer7TimeseriesGroupMitigationProductParamsHTTPMethodBmove AttackLayer7TimeseriesGroupMitigationProductParamsHTTPMethod = "BMOVE"` - `const AttackLayer7TimeseriesGroupMitigationProductParamsHTTPMethodBpropfind AttackLayer7TimeseriesGroupMitigationProductParamsHTTPMethod = "BPROPFIND"` - `const AttackLayer7TimeseriesGroupMitigationProductParamsHTTPMethodBproppatch AttackLayer7TimeseriesGroupMitigationProductParamsHTTPMethod = "BPROPPATCH"` - `const AttackLayer7TimeseriesGroupMitigationProductParamsHTTPMethodCheckin AttackLayer7TimeseriesGroupMitigationProductParamsHTTPMethod = "CHECKIN"` - `const AttackLayer7TimeseriesGroupMitigationProductParamsHTTPMethodCheckout AttackLayer7TimeseriesGroupMitigationProductParamsHTTPMethod = "CHECKOUT"` - `const AttackLayer7TimeseriesGroupMitigationProductParamsHTTPMethodConnect AttackLayer7TimeseriesGroupMitigationProductParamsHTTPMethod = "CONNECT"` - `const AttackLayer7TimeseriesGroupMitigationProductParamsHTTPMethodCopy AttackLayer7TimeseriesGroupMitigationProductParamsHTTPMethod = "COPY"` - `const AttackLayer7TimeseriesGroupMitigationProductParamsHTTPMethodLabel AttackLayer7TimeseriesGroupMitigationProductParamsHTTPMethod = "LABEL"` - `const AttackLayer7TimeseriesGroupMitigationProductParamsHTTPMethodLock AttackLayer7TimeseriesGroupMitigationProductParamsHTTPMethod = "LOCK"` - `const AttackLayer7TimeseriesGroupMitigationProductParamsHTTPMethodMerge AttackLayer7TimeseriesGroupMitigationProductParamsHTTPMethod = "MERGE"` - `const AttackLayer7TimeseriesGroupMitigationProductParamsHTTPMethodMkactivity AttackLayer7TimeseriesGroupMitigationProductParamsHTTPMethod = "MKACTIVITY"` - `const AttackLayer7TimeseriesGroupMitigationProductParamsHTTPMethodMkworkspace AttackLayer7TimeseriesGroupMitigationProductParamsHTTPMethod = "MKWORKSPACE"` - `const AttackLayer7TimeseriesGroupMitigationProductParamsHTTPMethodMove AttackLayer7TimeseriesGroupMitigationProductParamsHTTPMethod = "MOVE"` - `const AttackLayer7TimeseriesGroupMitigationProductParamsHTTPMethodNotify AttackLayer7TimeseriesGroupMitigationProductParamsHTTPMethod = "NOTIFY"` - `const AttackLayer7TimeseriesGroupMitigationProductParamsHTTPMethodOrderpatch AttackLayer7TimeseriesGroupMitigationProductParamsHTTPMethod = "ORDERPATCH"` - `const AttackLayer7TimeseriesGroupMitigationProductParamsHTTPMethodPoll AttackLayer7TimeseriesGroupMitigationProductParamsHTTPMethod = "POLL"` - `const AttackLayer7TimeseriesGroupMitigationProductParamsHTTPMethodProppatch AttackLayer7TimeseriesGroupMitigationProductParamsHTTPMethod = "PROPPATCH"` - `const AttackLayer7TimeseriesGroupMitigationProductParamsHTTPMethodReport AttackLayer7TimeseriesGroupMitigationProductParamsHTTPMethod = "REPORT"` - `const AttackLayer7TimeseriesGroupMitigationProductParamsHTTPMethodSearch AttackLayer7TimeseriesGroupMitigationProductParamsHTTPMethod = "SEARCH"` - `const AttackLayer7TimeseriesGroupMitigationProductParamsHTTPMethodSubscribe AttackLayer7TimeseriesGroupMitigationProductParamsHTTPMethod = "SUBSCRIBE"` - `const AttackLayer7TimeseriesGroupMitigationProductParamsHTTPMethodTrace AttackLayer7TimeseriesGroupMitigationProductParamsHTTPMethod = "TRACE"` - `const AttackLayer7TimeseriesGroupMitigationProductParamsHTTPMethodUncheckout AttackLayer7TimeseriesGroupMitigationProductParamsHTTPMethod = "UNCHECKOUT"` - `const AttackLayer7TimeseriesGroupMitigationProductParamsHTTPMethodUnlock AttackLayer7TimeseriesGroupMitigationProductParamsHTTPMethod = "UNLOCK"` - `const AttackLayer7TimeseriesGroupMitigationProductParamsHTTPMethodUnsubscribe AttackLayer7TimeseriesGroupMitigationProductParamsHTTPMethod = "UNSUBSCRIBE"` - `const AttackLayer7TimeseriesGroupMitigationProductParamsHTTPMethodUpdate AttackLayer7TimeseriesGroupMitigationProductParamsHTTPMethod = "UPDATE"` - `const AttackLayer7TimeseriesGroupMitigationProductParamsHTTPMethodVersioncontrol AttackLayer7TimeseriesGroupMitigationProductParamsHTTPMethod = "VERSIONCONTROL"` - `const AttackLayer7TimeseriesGroupMitigationProductParamsHTTPMethodBaselinecontrol AttackLayer7TimeseriesGroupMitigationProductParamsHTTPMethod = "BASELINECONTROL"` - `const AttackLayer7TimeseriesGroupMitigationProductParamsHTTPMethodXmsenumatts AttackLayer7TimeseriesGroupMitigationProductParamsHTTPMethod = "XMSENUMATTS"` - `const AttackLayer7TimeseriesGroupMitigationProductParamsHTTPMethodRpcOutData AttackLayer7TimeseriesGroupMitigationProductParamsHTTPMethod = "RPC_OUT_DATA"` - `const AttackLayer7TimeseriesGroupMitigationProductParamsHTTPMethodRpcInData AttackLayer7TimeseriesGroupMitigationProductParamsHTTPMethod = "RPC_IN_DATA"` - `const AttackLayer7TimeseriesGroupMitigationProductParamsHTTPMethodJson AttackLayer7TimeseriesGroupMitigationProductParamsHTTPMethod = "JSON"` - `const AttackLayer7TimeseriesGroupMitigationProductParamsHTTPMethodCook AttackLayer7TimeseriesGroupMitigationProductParamsHTTPMethod = "COOK"` - `const AttackLayer7TimeseriesGroupMitigationProductParamsHTTPMethodTrack AttackLayer7TimeseriesGroupMitigationProductParamsHTTPMethod = "TRACK"` - `HTTPVersion param.Field[[]AttackLayer7TimeseriesGroupMitigationProductParamsHTTPVersion]` Filters results by HTTP version. - `const AttackLayer7TimeseriesGroupMitigationProductParamsHTTPVersionHttPv1 AttackLayer7TimeseriesGroupMitigationProductParamsHTTPVersion = "HTTPv1"` - `const AttackLayer7TimeseriesGroupMitigationProductParamsHTTPVersionHttPv2 AttackLayer7TimeseriesGroupMitigationProductParamsHTTPVersion = "HTTPv2"` - `const AttackLayer7TimeseriesGroupMitigationProductParamsHTTPVersionHttPv3 AttackLayer7TimeseriesGroupMitigationProductParamsHTTPVersion = "HTTPv3"` - `IPVersion param.Field[[]AttackLayer7TimeseriesGroupMitigationProductParamsIPVersion]` Filters results by IP version (Ipv4 vs. IPv6). - `const AttackLayer7TimeseriesGroupMitigationProductParamsIPVersionIPv4 AttackLayer7TimeseriesGroupMitigationProductParamsIPVersion = "IPv4"` - `const AttackLayer7TimeseriesGroupMitigationProductParamsIPVersionIPv6 AttackLayer7TimeseriesGroupMitigationProductParamsIPVersion = "IPv6"` - `LimitPerGroup param.Field[int64]` 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]` 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]` Array of names used to label the series in the response. - `Normalization param.Field[AttackLayer7TimeseriesGroupMitigationProductParamsNormalization]` Normalization method applied to the results. Refer to [Normalization methods](https://developers.cloudflare.com/radar/concepts/normalization/). - `const AttackLayer7TimeseriesGroupMitigationProductParamsNormalizationPercentage AttackLayer7TimeseriesGroupMitigationProductParamsNormalization = "PERCENTAGE"` - `const AttackLayer7TimeseriesGroupMitigationProductParamsNormalizationMin0Max AttackLayer7TimeseriesGroupMitigationProductParamsNormalization = "MIN0_MAX"` ### Returns - `type AttackLayer7TimeseriesGroupMitigationProductResponse struct{…}` - `Meta AttackLayer7TimeseriesGroupMitigationProductResponseMeta` Metadata for the results. - `AggInterval AttackLayer7TimeseriesGroupMitigationProductResponseMetaAggInterval` Aggregation interval of the results (e.g., in 15 minutes or 1 hour intervals). Refer to [Aggregation intervals](https://developers.cloudflare.com/radar/concepts/aggregation-intervals/). - `const AttackLayer7TimeseriesGroupMitigationProductResponseMetaAggIntervalFifteenMinutes AttackLayer7TimeseriesGroupMitigationProductResponseMetaAggInterval = "FIFTEEN_MINUTES"` - `const AttackLayer7TimeseriesGroupMitigationProductResponseMetaAggIntervalOneHour AttackLayer7TimeseriesGroupMitigationProductResponseMetaAggInterval = "ONE_HOUR"` - `const AttackLayer7TimeseriesGroupMitigationProductResponseMetaAggIntervalOneDay AttackLayer7TimeseriesGroupMitigationProductResponseMetaAggInterval = "ONE_DAY"` - `const AttackLayer7TimeseriesGroupMitigationProductResponseMetaAggIntervalOneWeek AttackLayer7TimeseriesGroupMitigationProductResponseMetaAggInterval = "ONE_WEEK"` - `const AttackLayer7TimeseriesGroupMitigationProductResponseMetaAggIntervalOneMonth AttackLayer7TimeseriesGroupMitigationProductResponseMetaAggInterval = "ONE_MONTH"` - `ConfidenceInfo AttackLayer7TimeseriesGroupMitigationProductResponseMetaConfidenceInfo` - `Annotations []AttackLayer7TimeseriesGroupMitigationProductResponseMetaConfidenceInfoAnnotation` - `DataSource AttackLayer7TimeseriesGroupMitigationProductResponseMetaConfidenceInfoAnnotationsDataSource` Data source for annotations. - `const AttackLayer7TimeseriesGroupMitigationProductResponseMetaConfidenceInfoAnnotationsDataSourceAll AttackLayer7TimeseriesGroupMitigationProductResponseMetaConfidenceInfoAnnotationsDataSource = "ALL"` - `const AttackLayer7TimeseriesGroupMitigationProductResponseMetaConfidenceInfoAnnotationsDataSourceAIBots AttackLayer7TimeseriesGroupMitigationProductResponseMetaConfidenceInfoAnnotationsDataSource = "AI_BOTS"` - `const AttackLayer7TimeseriesGroupMitigationProductResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway AttackLayer7TimeseriesGroupMitigationProductResponseMetaConfidenceInfoAnnotationsDataSource = "AI_GATEWAY"` - `const AttackLayer7TimeseriesGroupMitigationProductResponseMetaConfidenceInfoAnnotationsDataSourceBGP AttackLayer7TimeseriesGroupMitigationProductResponseMetaConfidenceInfoAnnotationsDataSource = "BGP"` - `const AttackLayer7TimeseriesGroupMitigationProductResponseMetaConfidenceInfoAnnotationsDataSourceBots AttackLayer7TimeseriesGroupMitigationProductResponseMetaConfidenceInfoAnnotationsDataSource = "BOTS"` - `const AttackLayer7TimeseriesGroupMitigationProductResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly AttackLayer7TimeseriesGroupMitigationProductResponseMetaConfidenceInfoAnnotationsDataSource = "CONNECTION_ANOMALY"` - `const AttackLayer7TimeseriesGroupMitigationProductResponseMetaConfidenceInfoAnnotationsDataSourceCT AttackLayer7TimeseriesGroupMitigationProductResponseMetaConfidenceInfoAnnotationsDataSource = "CT"` - `const AttackLayer7TimeseriesGroupMitigationProductResponseMetaConfidenceInfoAnnotationsDataSourceDNS AttackLayer7TimeseriesGroupMitigationProductResponseMetaConfidenceInfoAnnotationsDataSource = "DNS"` - `const AttackLayer7TimeseriesGroupMitigationProductResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude AttackLayer7TimeseriesGroupMitigationProductResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_MAGNITUDE"` - `const AttackLayer7TimeseriesGroupMitigationProductResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112 AttackLayer7TimeseriesGroupMitigationProductResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_AS112"` - `const AttackLayer7TimeseriesGroupMitigationProductResponseMetaConfidenceInfoAnnotationsDataSourceDos AttackLayer7TimeseriesGroupMitigationProductResponseMetaConfidenceInfoAnnotationsDataSource = "DOS"` - `const AttackLayer7TimeseriesGroupMitigationProductResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting AttackLayer7TimeseriesGroupMitigationProductResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_ROUTING"` - `const AttackLayer7TimeseriesGroupMitigationProductResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity AttackLayer7TimeseriesGroupMitigationProductResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_SECURITY"` - `const AttackLayer7TimeseriesGroupMitigationProductResponseMetaConfidenceInfoAnnotationsDataSourceFw AttackLayer7TimeseriesGroupMitigationProductResponseMetaConfidenceInfoAnnotationsDataSource = "FW"` - `const AttackLayer7TimeseriesGroupMitigationProductResponseMetaConfidenceInfoAnnotationsDataSourceFwPg AttackLayer7TimeseriesGroupMitigationProductResponseMetaConfidenceInfoAnnotationsDataSource = "FW_PG"` - `const AttackLayer7TimeseriesGroupMitigationProductResponseMetaConfidenceInfoAnnotationsDataSourceHTTP AttackLayer7TimeseriesGroupMitigationProductResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP"` - `const AttackLayer7TimeseriesGroupMitigationProductResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl AttackLayer7TimeseriesGroupMitigationProductResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CONTROL"` - `const AttackLayer7TimeseriesGroupMitigationProductResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer AttackLayer7TimeseriesGroupMitigationProductResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CRAWLER_REFERER"` - `const AttackLayer7TimeseriesGroupMitigationProductResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins AttackLayer7TimeseriesGroupMitigationProductResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_ORIGINS"` - `const AttackLayer7TimeseriesGroupMitigationProductResponseMetaConfidenceInfoAnnotationsDataSourceIQI AttackLayer7TimeseriesGroupMitigationProductResponseMetaConfidenceInfoAnnotationsDataSource = "IQI"` - `const AttackLayer7TimeseriesGroupMitigationProductResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials AttackLayer7TimeseriesGroupMitigationProductResponseMetaConfidenceInfoAnnotationsDataSource = "LEAKED_CREDENTIALS"` - `const AttackLayer7TimeseriesGroupMitigationProductResponseMetaConfidenceInfoAnnotationsDataSourceNet AttackLayer7TimeseriesGroupMitigationProductResponseMetaConfidenceInfoAnnotationsDataSource = "NET"` - `const AttackLayer7TimeseriesGroupMitigationProductResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT AttackLayer7TimeseriesGroupMitigationProductResponseMetaConfidenceInfoAnnotationsDataSource = "ROBOTS_TXT"` - `const AttackLayer7TimeseriesGroupMitigationProductResponseMetaConfidenceInfoAnnotationsDataSourceSpeed AttackLayer7TimeseriesGroupMitigationProductResponseMetaConfidenceInfoAnnotationsDataSource = "SPEED"` - `const AttackLayer7TimeseriesGroupMitigationProductResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI AttackLayer7TimeseriesGroupMitigationProductResponseMetaConfidenceInfoAnnotationsDataSource = "WORKERS_AI"` - `Description string` - `EndDate Time` - `EventType AttackLayer7TimeseriesGroupMitigationProductResponseMetaConfidenceInfoAnnotationsEventType` Event type for annotations. - `const AttackLayer7TimeseriesGroupMitigationProductResponseMetaConfidenceInfoAnnotationsEventTypeEvent AttackLayer7TimeseriesGroupMitigationProductResponseMetaConfidenceInfoAnnotationsEventType = "EVENT"` - `const AttackLayer7TimeseriesGroupMitigationProductResponseMetaConfidenceInfoAnnotationsEventTypeGeneral AttackLayer7TimeseriesGroupMitigationProductResponseMetaConfidenceInfoAnnotationsEventType = "GENERAL"` - `const AttackLayer7TimeseriesGroupMitigationProductResponseMetaConfidenceInfoAnnotationsEventTypeOutage AttackLayer7TimeseriesGroupMitigationProductResponseMetaConfidenceInfoAnnotationsEventType = "OUTAGE"` - `const AttackLayer7TimeseriesGroupMitigationProductResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection AttackLayer7TimeseriesGroupMitigationProductResponseMetaConfidenceInfoAnnotationsEventType = "PARTIAL_PROJECTION"` - `const AttackLayer7TimeseriesGroupMitigationProductResponseMetaConfidenceInfoAnnotationsEventTypePipeline AttackLayer7TimeseriesGroupMitigationProductResponseMetaConfidenceInfoAnnotationsEventType = "PIPELINE"` - `const AttackLayer7TimeseriesGroupMitigationProductResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly AttackLayer7TimeseriesGroupMitigationProductResponseMetaConfidenceInfoAnnotationsEventType = "TRAFFIC_ANOMALY"` - `IsInstantaneous bool` Whether event is a single point in time or a time range. - `LinkedURL string` - `StartDate Time` - `Level int64` Provides an indication of how much confidence Cloudflare has in the data. - `DateRange []AttackLayer7TimeseriesGroupMitigationProductResponseMetaDateRange` - `EndTime Time` Adjusted end of date range. - `StartTime Time` Adjusted start of date range. - `LastUpdated Time` Timestamp of the last dataset update. - `Normalization AttackLayer7TimeseriesGroupMitigationProductResponseMetaNormalization` Normalization method applied to the results. Refer to [Normalization methods](https://developers.cloudflare.com/radar/concepts/normalization/). - `const AttackLayer7TimeseriesGroupMitigationProductResponseMetaNormalizationPercentage AttackLayer7TimeseriesGroupMitigationProductResponseMetaNormalization = "PERCENTAGE"` - `const AttackLayer7TimeseriesGroupMitigationProductResponseMetaNormalizationMin0Max AttackLayer7TimeseriesGroupMitigationProductResponseMetaNormalization = "MIN0_MAX"` - `const AttackLayer7TimeseriesGroupMitigationProductResponseMetaNormalizationMinMax AttackLayer7TimeseriesGroupMitigationProductResponseMetaNormalization = "MIN_MAX"` - `const AttackLayer7TimeseriesGroupMitigationProductResponseMetaNormalizationRawValues AttackLayer7TimeseriesGroupMitigationProductResponseMetaNormalization = "RAW_VALUES"` - `const AttackLayer7TimeseriesGroupMitigationProductResponseMetaNormalizationPercentageChange AttackLayer7TimeseriesGroupMitigationProductResponseMetaNormalization = "PERCENTAGE_CHANGE"` - `const AttackLayer7TimeseriesGroupMitigationProductResponseMetaNormalizationRollingAverage AttackLayer7TimeseriesGroupMitigationProductResponseMetaNormalization = "ROLLING_AVERAGE"` - `const AttackLayer7TimeseriesGroupMitigationProductResponseMetaNormalizationOverlappedPercentage AttackLayer7TimeseriesGroupMitigationProductResponseMetaNormalization = "OVERLAPPED_PERCENTAGE"` - `const AttackLayer7TimeseriesGroupMitigationProductResponseMetaNormalizationRatio AttackLayer7TimeseriesGroupMitigationProductResponseMetaNormalization = "RATIO"` - `Units []AttackLayer7TimeseriesGroupMitigationProductResponseMetaUnit` Measurement units for the results. - `Name string` - `Value string` - `Serie0 AttackLayer7TimeseriesGroupMitigationProductResponseSerie0` - `Timestamps []Time` ### Example ```go 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.Layer7.TimeseriesGroups.MitigationProduct(context.TODO(), radar.AttackLayer7TimeseriesGroupMitigationProductParams{ }) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", response.Meta) } ``` #### Response ```json { "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": { "timestamps": [ "2023-08-08T10:15:00Z" ] } }, "success": true } ``` # Top ## Get top layer 7 attack pairs (origin and target locations) `client.Radar.Attacks.Layer7.Top.Attacks(ctx, query) (*AttackLayer7TopAttacksResponse, error)` **get** `/radar/attacks/layer7/top/attacks` Retrieves the top attacks from origin to target location. Values are percentages of the total layer 7 attacks (with billing country). The attack magnitude can be defined by the number of mitigated requests or by the number of zones affected. You can optionally limit the number of attacks by origin/target location (useful if all the top attacks are from or to the same location). ### Parameters - `query AttackLayer7TopAttacksParams` - `ASN param.Field[[]string]` Filters results by Autonomous System. Specify one or more Autonomous System Numbers (ASNs) as a comma-separated list. Prefix with `-` to exclude ASNs from results. For example, `-174, 3356` excludes results from AS174, but includes results from AS3356. - `Continent param.Field[[]string]` 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]` End of the date range (inclusive). - `DateRange param.Field[[]string]` 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]` Start of the date range. - `Format param.Field[AttackLayer7TopAttacksParamsFormat]` Format in which results will be returned. - `const AttackLayer7TopAttacksParamsFormatJson AttackLayer7TopAttacksParamsFormat = "JSON"` - `const AttackLayer7TopAttacksParamsFormatCsv AttackLayer7TopAttacksParamsFormat = "CSV"` - `Limit param.Field[int64]` Limits the number of objects returned in the response. - `LimitDirection param.Field[AttackLayer7TopAttacksParamsLimitDirection]` Specifies whether the `limitPerLocation` applies to the source or target location. - `const AttackLayer7TopAttacksParamsLimitDirectionOrigin AttackLayer7TopAttacksParamsLimitDirection = "ORIGIN"` - `const AttackLayer7TopAttacksParamsLimitDirectionTarget AttackLayer7TopAttacksParamsLimitDirection = "TARGET"` - `LimitPerLocation param.Field[int64]` Limits the number of attacks per origin/target (refer to `limitDirection` parameter) location. - `Location param.Field[[]string]` 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. - `MitigationProduct param.Field[[]AttackLayer7TopAttacksParamsMitigationProduct]` Filters the results by layer 7 mitigation product. - `const AttackLayer7TopAttacksParamsMitigationProductDDoS AttackLayer7TopAttacksParamsMitigationProduct = "DDOS"` - `const AttackLayer7TopAttacksParamsMitigationProductWAF AttackLayer7TopAttacksParamsMitigationProduct = "WAF"` - `const AttackLayer7TopAttacksParamsMitigationProductBotManagement AttackLayer7TopAttacksParamsMitigationProduct = "BOT_MANAGEMENT"` - `const AttackLayer7TopAttacksParamsMitigationProductAccessRules AttackLayer7TopAttacksParamsMitigationProduct = "ACCESS_RULES"` - `const AttackLayer7TopAttacksParamsMitigationProductIPReputation AttackLayer7TopAttacksParamsMitigationProduct = "IP_REPUTATION"` - `const AttackLayer7TopAttacksParamsMitigationProductAPIShield AttackLayer7TopAttacksParamsMitigationProduct = "API_SHIELD"` - `const AttackLayer7TopAttacksParamsMitigationProductDataLossPrevention AttackLayer7TopAttacksParamsMitigationProduct = "DATA_LOSS_PREVENTION"` - `Name param.Field[[]string]` Array of names used to label the series in the response. - `Normalization param.Field[AttackLayer7TopAttacksParamsNormalization]` Normalization method applied to the results. Refer to [Normalization methods](https://developers.cloudflare.com/radar/concepts/normalization/). - `const AttackLayer7TopAttacksParamsNormalizationPercentage AttackLayer7TopAttacksParamsNormalization = "PERCENTAGE"` - `const AttackLayer7TopAttacksParamsNormalizationMinMax AttackLayer7TopAttacksParamsNormalization = "MIN_MAX"` ### Returns - `type AttackLayer7TopAttacksResponse struct{…}` - `Meta AttackLayer7TopAttacksResponseMeta` Metadata for the results. - `ConfidenceInfo AttackLayer7TopAttacksResponseMetaConfidenceInfo` - `Annotations []AttackLayer7TopAttacksResponseMetaConfidenceInfoAnnotation` - `DataSource AttackLayer7TopAttacksResponseMetaConfidenceInfoAnnotationsDataSource` Data source for annotations. - `const AttackLayer7TopAttacksResponseMetaConfidenceInfoAnnotationsDataSourceAll AttackLayer7TopAttacksResponseMetaConfidenceInfoAnnotationsDataSource = "ALL"` - `const AttackLayer7TopAttacksResponseMetaConfidenceInfoAnnotationsDataSourceAIBots AttackLayer7TopAttacksResponseMetaConfidenceInfoAnnotationsDataSource = "AI_BOTS"` - `const AttackLayer7TopAttacksResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway AttackLayer7TopAttacksResponseMetaConfidenceInfoAnnotationsDataSource = "AI_GATEWAY"` - `const AttackLayer7TopAttacksResponseMetaConfidenceInfoAnnotationsDataSourceBGP AttackLayer7TopAttacksResponseMetaConfidenceInfoAnnotationsDataSource = "BGP"` - `const AttackLayer7TopAttacksResponseMetaConfidenceInfoAnnotationsDataSourceBots AttackLayer7TopAttacksResponseMetaConfidenceInfoAnnotationsDataSource = "BOTS"` - `const AttackLayer7TopAttacksResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly AttackLayer7TopAttacksResponseMetaConfidenceInfoAnnotationsDataSource = "CONNECTION_ANOMALY"` - `const AttackLayer7TopAttacksResponseMetaConfidenceInfoAnnotationsDataSourceCT AttackLayer7TopAttacksResponseMetaConfidenceInfoAnnotationsDataSource = "CT"` - `const AttackLayer7TopAttacksResponseMetaConfidenceInfoAnnotationsDataSourceDNS AttackLayer7TopAttacksResponseMetaConfidenceInfoAnnotationsDataSource = "DNS"` - `const AttackLayer7TopAttacksResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude AttackLayer7TopAttacksResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_MAGNITUDE"` - `const AttackLayer7TopAttacksResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112 AttackLayer7TopAttacksResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_AS112"` - `const AttackLayer7TopAttacksResponseMetaConfidenceInfoAnnotationsDataSourceDos AttackLayer7TopAttacksResponseMetaConfidenceInfoAnnotationsDataSource = "DOS"` - `const AttackLayer7TopAttacksResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting AttackLayer7TopAttacksResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_ROUTING"` - `const AttackLayer7TopAttacksResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity AttackLayer7TopAttacksResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_SECURITY"` - `const AttackLayer7TopAttacksResponseMetaConfidenceInfoAnnotationsDataSourceFw AttackLayer7TopAttacksResponseMetaConfidenceInfoAnnotationsDataSource = "FW"` - `const AttackLayer7TopAttacksResponseMetaConfidenceInfoAnnotationsDataSourceFwPg AttackLayer7TopAttacksResponseMetaConfidenceInfoAnnotationsDataSource = "FW_PG"` - `const AttackLayer7TopAttacksResponseMetaConfidenceInfoAnnotationsDataSourceHTTP AttackLayer7TopAttacksResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP"` - `const AttackLayer7TopAttacksResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl AttackLayer7TopAttacksResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CONTROL"` - `const AttackLayer7TopAttacksResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer AttackLayer7TopAttacksResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CRAWLER_REFERER"` - `const AttackLayer7TopAttacksResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins AttackLayer7TopAttacksResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_ORIGINS"` - `const AttackLayer7TopAttacksResponseMetaConfidenceInfoAnnotationsDataSourceIQI AttackLayer7TopAttacksResponseMetaConfidenceInfoAnnotationsDataSource = "IQI"` - `const AttackLayer7TopAttacksResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials AttackLayer7TopAttacksResponseMetaConfidenceInfoAnnotationsDataSource = "LEAKED_CREDENTIALS"` - `const AttackLayer7TopAttacksResponseMetaConfidenceInfoAnnotationsDataSourceNet AttackLayer7TopAttacksResponseMetaConfidenceInfoAnnotationsDataSource = "NET"` - `const AttackLayer7TopAttacksResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT AttackLayer7TopAttacksResponseMetaConfidenceInfoAnnotationsDataSource = "ROBOTS_TXT"` - `const AttackLayer7TopAttacksResponseMetaConfidenceInfoAnnotationsDataSourceSpeed AttackLayer7TopAttacksResponseMetaConfidenceInfoAnnotationsDataSource = "SPEED"` - `const AttackLayer7TopAttacksResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI AttackLayer7TopAttacksResponseMetaConfidenceInfoAnnotationsDataSource = "WORKERS_AI"` - `Description string` - `EndDate Time` - `EventType AttackLayer7TopAttacksResponseMetaConfidenceInfoAnnotationsEventType` Event type for annotations. - `const AttackLayer7TopAttacksResponseMetaConfidenceInfoAnnotationsEventTypeEvent AttackLayer7TopAttacksResponseMetaConfidenceInfoAnnotationsEventType = "EVENT"` - `const AttackLayer7TopAttacksResponseMetaConfidenceInfoAnnotationsEventTypeGeneral AttackLayer7TopAttacksResponseMetaConfidenceInfoAnnotationsEventType = "GENERAL"` - `const AttackLayer7TopAttacksResponseMetaConfidenceInfoAnnotationsEventTypeOutage AttackLayer7TopAttacksResponseMetaConfidenceInfoAnnotationsEventType = "OUTAGE"` - `const AttackLayer7TopAttacksResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection AttackLayer7TopAttacksResponseMetaConfidenceInfoAnnotationsEventType = "PARTIAL_PROJECTION"` - `const AttackLayer7TopAttacksResponseMetaConfidenceInfoAnnotationsEventTypePipeline AttackLayer7TopAttacksResponseMetaConfidenceInfoAnnotationsEventType = "PIPELINE"` - `const AttackLayer7TopAttacksResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly AttackLayer7TopAttacksResponseMetaConfidenceInfoAnnotationsEventType = "TRAFFIC_ANOMALY"` - `IsInstantaneous bool` Whether event is a single point in time or a time range. - `LinkedURL string` - `StartDate Time` - `Level int64` Provides an indication of how much confidence Cloudflare has in the data. - `DateRange []AttackLayer7TopAttacksResponseMetaDateRange` - `EndTime Time` Adjusted end of date range. - `StartTime Time` Adjusted start of date range. - `LastUpdated Time` Timestamp of the last dataset update. - `Normalization AttackLayer7TopAttacksResponseMetaNormalization` Normalization method applied to the results. Refer to [Normalization methods](https://developers.cloudflare.com/radar/concepts/normalization/). - `const AttackLayer7TopAttacksResponseMetaNormalizationPercentage AttackLayer7TopAttacksResponseMetaNormalization = "PERCENTAGE"` - `const AttackLayer7TopAttacksResponseMetaNormalizationMin0Max AttackLayer7TopAttacksResponseMetaNormalization = "MIN0_MAX"` - `const AttackLayer7TopAttacksResponseMetaNormalizationMinMax AttackLayer7TopAttacksResponseMetaNormalization = "MIN_MAX"` - `const AttackLayer7TopAttacksResponseMetaNormalizationRawValues AttackLayer7TopAttacksResponseMetaNormalization = "RAW_VALUES"` - `const AttackLayer7TopAttacksResponseMetaNormalizationPercentageChange AttackLayer7TopAttacksResponseMetaNormalization = "PERCENTAGE_CHANGE"` - `const AttackLayer7TopAttacksResponseMetaNormalizationRollingAverage AttackLayer7TopAttacksResponseMetaNormalization = "ROLLING_AVERAGE"` - `const AttackLayer7TopAttacksResponseMetaNormalizationOverlappedPercentage AttackLayer7TopAttacksResponseMetaNormalization = "OVERLAPPED_PERCENTAGE"` - `const AttackLayer7TopAttacksResponseMetaNormalizationRatio AttackLayer7TopAttacksResponseMetaNormalization = "RATIO"` - `Units []AttackLayer7TopAttacksResponseMetaUnit` Measurement units for the results. - `Name string` - `Value string` - `Top0 []AttackLayer7TopAttacksResponseTop0` - `OriginCountryAlpha2 string` - `OriginCountryName string` - `TargetCountryAlpha2 string` - `TargetCountryName string` - `Value string` ### Example ```go 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.Layer7.Top.Attacks(context.TODO(), radar.AttackLayer7TopAttacksParams{ }) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", response.Meta) } ``` #### Response ```json { "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" } ] }, "top_0": [ { "originCountryAlpha2": "US", "originCountryName": "United States", "targetCountryAlpha2": "FR", "targetCountryName": "France", "value": "4.323214" } ] }, "success": true } ``` ## Get top industries targeted by layer 7 attacks `client.Radar.Attacks.Layer7.Top.Industry(ctx, query) (*AttackLayer7TopIndustryResponse, error)` **get** `/radar/attacks/layer7/top/industry` This endpoint is deprecated. To continue getting this data, switch to the summary by industry endpoint. ### Parameters - `query AttackLayer7TopIndustryParams` - `ASN param.Field[[]string]` Filters results by Autonomous System. Specify one or more Autonomous System Numbers (ASNs) as a comma-separated list. Prefix with `-` to exclude ASNs from results. For example, `-174, 3356` excludes results from AS174, but includes results from AS3356. - `Continent param.Field[[]string]` 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]` End of the date range (inclusive). - `DateRange param.Field[[]string]` 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]` Start of the date range. - `Format param.Field[AttackLayer7TopIndustryParamsFormat]` Format in which results will be returned. - `const AttackLayer7TopIndustryParamsFormatJson AttackLayer7TopIndustryParamsFormat = "JSON"` - `const AttackLayer7TopIndustryParamsFormatCsv AttackLayer7TopIndustryParamsFormat = "CSV"` - `HTTPMethod param.Field[[]AttackLayer7TopIndustryParamsHTTPMethod]` Filters results by HTTP method. - `const AttackLayer7TopIndustryParamsHTTPMethodGet AttackLayer7TopIndustryParamsHTTPMethod = "GET"` - `const AttackLayer7TopIndustryParamsHTTPMethodPost AttackLayer7TopIndustryParamsHTTPMethod = "POST"` - `const AttackLayer7TopIndustryParamsHTTPMethodDelete AttackLayer7TopIndustryParamsHTTPMethod = "DELETE"` - `const AttackLayer7TopIndustryParamsHTTPMethodPut AttackLayer7TopIndustryParamsHTTPMethod = "PUT"` - `const AttackLayer7TopIndustryParamsHTTPMethodHead AttackLayer7TopIndustryParamsHTTPMethod = "HEAD"` - `const AttackLayer7TopIndustryParamsHTTPMethodPurge AttackLayer7TopIndustryParamsHTTPMethod = "PURGE"` - `const AttackLayer7TopIndustryParamsHTTPMethodOptions AttackLayer7TopIndustryParamsHTTPMethod = "OPTIONS"` - `const AttackLayer7TopIndustryParamsHTTPMethodPropfind AttackLayer7TopIndustryParamsHTTPMethod = "PROPFIND"` - `const AttackLayer7TopIndustryParamsHTTPMethodMkcol AttackLayer7TopIndustryParamsHTTPMethod = "MKCOL"` - `const AttackLayer7TopIndustryParamsHTTPMethodPatch AttackLayer7TopIndustryParamsHTTPMethod = "PATCH"` - `const AttackLayer7TopIndustryParamsHTTPMethodACL AttackLayer7TopIndustryParamsHTTPMethod = "ACL"` - `const AttackLayer7TopIndustryParamsHTTPMethodBcopy AttackLayer7TopIndustryParamsHTTPMethod = "BCOPY"` - `const AttackLayer7TopIndustryParamsHTTPMethodBdelete AttackLayer7TopIndustryParamsHTTPMethod = "BDELETE"` - `const AttackLayer7TopIndustryParamsHTTPMethodBmove AttackLayer7TopIndustryParamsHTTPMethod = "BMOVE"` - `const AttackLayer7TopIndustryParamsHTTPMethodBpropfind AttackLayer7TopIndustryParamsHTTPMethod = "BPROPFIND"` - `const AttackLayer7TopIndustryParamsHTTPMethodBproppatch AttackLayer7TopIndustryParamsHTTPMethod = "BPROPPATCH"` - `const AttackLayer7TopIndustryParamsHTTPMethodCheckin AttackLayer7TopIndustryParamsHTTPMethod = "CHECKIN"` - `const AttackLayer7TopIndustryParamsHTTPMethodCheckout AttackLayer7TopIndustryParamsHTTPMethod = "CHECKOUT"` - `const AttackLayer7TopIndustryParamsHTTPMethodConnect AttackLayer7TopIndustryParamsHTTPMethod = "CONNECT"` - `const AttackLayer7TopIndustryParamsHTTPMethodCopy AttackLayer7TopIndustryParamsHTTPMethod = "COPY"` - `const AttackLayer7TopIndustryParamsHTTPMethodLabel AttackLayer7TopIndustryParamsHTTPMethod = "LABEL"` - `const AttackLayer7TopIndustryParamsHTTPMethodLock AttackLayer7TopIndustryParamsHTTPMethod = "LOCK"` - `const AttackLayer7TopIndustryParamsHTTPMethodMerge AttackLayer7TopIndustryParamsHTTPMethod = "MERGE"` - `const AttackLayer7TopIndustryParamsHTTPMethodMkactivity AttackLayer7TopIndustryParamsHTTPMethod = "MKACTIVITY"` - `const AttackLayer7TopIndustryParamsHTTPMethodMkworkspace AttackLayer7TopIndustryParamsHTTPMethod = "MKWORKSPACE"` - `const AttackLayer7TopIndustryParamsHTTPMethodMove AttackLayer7TopIndustryParamsHTTPMethod = "MOVE"` - `const AttackLayer7TopIndustryParamsHTTPMethodNotify AttackLayer7TopIndustryParamsHTTPMethod = "NOTIFY"` - `const AttackLayer7TopIndustryParamsHTTPMethodOrderpatch AttackLayer7TopIndustryParamsHTTPMethod = "ORDERPATCH"` - `const AttackLayer7TopIndustryParamsHTTPMethodPoll AttackLayer7TopIndustryParamsHTTPMethod = "POLL"` - `const AttackLayer7TopIndustryParamsHTTPMethodProppatch AttackLayer7TopIndustryParamsHTTPMethod = "PROPPATCH"` - `const AttackLayer7TopIndustryParamsHTTPMethodReport AttackLayer7TopIndustryParamsHTTPMethod = "REPORT"` - `const AttackLayer7TopIndustryParamsHTTPMethodSearch AttackLayer7TopIndustryParamsHTTPMethod = "SEARCH"` - `const AttackLayer7TopIndustryParamsHTTPMethodSubscribe AttackLayer7TopIndustryParamsHTTPMethod = "SUBSCRIBE"` - `const AttackLayer7TopIndustryParamsHTTPMethodTrace AttackLayer7TopIndustryParamsHTTPMethod = "TRACE"` - `const AttackLayer7TopIndustryParamsHTTPMethodUncheckout AttackLayer7TopIndustryParamsHTTPMethod = "UNCHECKOUT"` - `const AttackLayer7TopIndustryParamsHTTPMethodUnlock AttackLayer7TopIndustryParamsHTTPMethod = "UNLOCK"` - `const AttackLayer7TopIndustryParamsHTTPMethodUnsubscribe AttackLayer7TopIndustryParamsHTTPMethod = "UNSUBSCRIBE"` - `const AttackLayer7TopIndustryParamsHTTPMethodUpdate AttackLayer7TopIndustryParamsHTTPMethod = "UPDATE"` - `const AttackLayer7TopIndustryParamsHTTPMethodVersioncontrol AttackLayer7TopIndustryParamsHTTPMethod = "VERSIONCONTROL"` - `const AttackLayer7TopIndustryParamsHTTPMethodBaselinecontrol AttackLayer7TopIndustryParamsHTTPMethod = "BASELINECONTROL"` - `const AttackLayer7TopIndustryParamsHTTPMethodXmsenumatts AttackLayer7TopIndustryParamsHTTPMethod = "XMSENUMATTS"` - `const AttackLayer7TopIndustryParamsHTTPMethodRpcOutData AttackLayer7TopIndustryParamsHTTPMethod = "RPC_OUT_DATA"` - `const AttackLayer7TopIndustryParamsHTTPMethodRpcInData AttackLayer7TopIndustryParamsHTTPMethod = "RPC_IN_DATA"` - `const AttackLayer7TopIndustryParamsHTTPMethodJson AttackLayer7TopIndustryParamsHTTPMethod = "JSON"` - `const AttackLayer7TopIndustryParamsHTTPMethodCook AttackLayer7TopIndustryParamsHTTPMethod = "COOK"` - `const AttackLayer7TopIndustryParamsHTTPMethodTrack AttackLayer7TopIndustryParamsHTTPMethod = "TRACK"` - `HTTPVersion param.Field[[]AttackLayer7TopIndustryParamsHTTPVersion]` Filters results by HTTP version. - `const AttackLayer7TopIndustryParamsHTTPVersionHttPv1 AttackLayer7TopIndustryParamsHTTPVersion = "HTTPv1"` - `const AttackLayer7TopIndustryParamsHTTPVersionHttPv2 AttackLayer7TopIndustryParamsHTTPVersion = "HTTPv2"` - `const AttackLayer7TopIndustryParamsHTTPVersionHttPv3 AttackLayer7TopIndustryParamsHTTPVersion = "HTTPv3"` - `IPVersion param.Field[[]AttackLayer7TopIndustryParamsIPVersion]` Filters results by IP version (Ipv4 vs. IPv6). - `const AttackLayer7TopIndustryParamsIPVersionIPv4 AttackLayer7TopIndustryParamsIPVersion = "IPv4"` - `const AttackLayer7TopIndustryParamsIPVersionIPv6 AttackLayer7TopIndustryParamsIPVersion = "IPv6"` - `Limit param.Field[int64]` Limits the number of objects returned in the response. - `Location param.Field[[]string]` 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. - `MitigationProduct param.Field[[]AttackLayer7TopIndustryParamsMitigationProduct]` Filters the results by layer 7 mitigation product. - `const AttackLayer7TopIndustryParamsMitigationProductDDoS AttackLayer7TopIndustryParamsMitigationProduct = "DDOS"` - `const AttackLayer7TopIndustryParamsMitigationProductWAF AttackLayer7TopIndustryParamsMitigationProduct = "WAF"` - `const AttackLayer7TopIndustryParamsMitigationProductBotManagement AttackLayer7TopIndustryParamsMitigationProduct = "BOT_MANAGEMENT"` - `const AttackLayer7TopIndustryParamsMitigationProductAccessRules AttackLayer7TopIndustryParamsMitigationProduct = "ACCESS_RULES"` - `const AttackLayer7TopIndustryParamsMitigationProductIPReputation AttackLayer7TopIndustryParamsMitigationProduct = "IP_REPUTATION"` - `const AttackLayer7TopIndustryParamsMitigationProductAPIShield AttackLayer7TopIndustryParamsMitigationProduct = "API_SHIELD"` - `const AttackLayer7TopIndustryParamsMitigationProductDataLossPrevention AttackLayer7TopIndustryParamsMitigationProduct = "DATA_LOSS_PREVENTION"` - `Name param.Field[[]string]` Array of names used to label the series in the response. ### Returns - `type AttackLayer7TopIndustryResponse struct{…}` - `Meta AttackLayer7TopIndustryResponseMeta` Metadata for the results. - `ConfidenceInfo AttackLayer7TopIndustryResponseMetaConfidenceInfo` - `Annotations []AttackLayer7TopIndustryResponseMetaConfidenceInfoAnnotation` - `DataSource AttackLayer7TopIndustryResponseMetaConfidenceInfoAnnotationsDataSource` Data source for annotations. - `const AttackLayer7TopIndustryResponseMetaConfidenceInfoAnnotationsDataSourceAll AttackLayer7TopIndustryResponseMetaConfidenceInfoAnnotationsDataSource = "ALL"` - `const AttackLayer7TopIndustryResponseMetaConfidenceInfoAnnotationsDataSourceAIBots AttackLayer7TopIndustryResponseMetaConfidenceInfoAnnotationsDataSource = "AI_BOTS"` - `const AttackLayer7TopIndustryResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway AttackLayer7TopIndustryResponseMetaConfidenceInfoAnnotationsDataSource = "AI_GATEWAY"` - `const AttackLayer7TopIndustryResponseMetaConfidenceInfoAnnotationsDataSourceBGP AttackLayer7TopIndustryResponseMetaConfidenceInfoAnnotationsDataSource = "BGP"` - `const AttackLayer7TopIndustryResponseMetaConfidenceInfoAnnotationsDataSourceBots AttackLayer7TopIndustryResponseMetaConfidenceInfoAnnotationsDataSource = "BOTS"` - `const AttackLayer7TopIndustryResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly AttackLayer7TopIndustryResponseMetaConfidenceInfoAnnotationsDataSource = "CONNECTION_ANOMALY"` - `const AttackLayer7TopIndustryResponseMetaConfidenceInfoAnnotationsDataSourceCT AttackLayer7TopIndustryResponseMetaConfidenceInfoAnnotationsDataSource = "CT"` - `const AttackLayer7TopIndustryResponseMetaConfidenceInfoAnnotationsDataSourceDNS AttackLayer7TopIndustryResponseMetaConfidenceInfoAnnotationsDataSource = "DNS"` - `const AttackLayer7TopIndustryResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude AttackLayer7TopIndustryResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_MAGNITUDE"` - `const AttackLayer7TopIndustryResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112 AttackLayer7TopIndustryResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_AS112"` - `const AttackLayer7TopIndustryResponseMetaConfidenceInfoAnnotationsDataSourceDos AttackLayer7TopIndustryResponseMetaConfidenceInfoAnnotationsDataSource = "DOS"` - `const AttackLayer7TopIndustryResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting AttackLayer7TopIndustryResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_ROUTING"` - `const AttackLayer7TopIndustryResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity AttackLayer7TopIndustryResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_SECURITY"` - `const AttackLayer7TopIndustryResponseMetaConfidenceInfoAnnotationsDataSourceFw AttackLayer7TopIndustryResponseMetaConfidenceInfoAnnotationsDataSource = "FW"` - `const AttackLayer7TopIndustryResponseMetaConfidenceInfoAnnotationsDataSourceFwPg AttackLayer7TopIndustryResponseMetaConfidenceInfoAnnotationsDataSource = "FW_PG"` - `const AttackLayer7TopIndustryResponseMetaConfidenceInfoAnnotationsDataSourceHTTP AttackLayer7TopIndustryResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP"` - `const AttackLayer7TopIndustryResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl AttackLayer7TopIndustryResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CONTROL"` - `const AttackLayer7TopIndustryResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer AttackLayer7TopIndustryResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CRAWLER_REFERER"` - `const AttackLayer7TopIndustryResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins AttackLayer7TopIndustryResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_ORIGINS"` - `const AttackLayer7TopIndustryResponseMetaConfidenceInfoAnnotationsDataSourceIQI AttackLayer7TopIndustryResponseMetaConfidenceInfoAnnotationsDataSource = "IQI"` - `const AttackLayer7TopIndustryResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials AttackLayer7TopIndustryResponseMetaConfidenceInfoAnnotationsDataSource = "LEAKED_CREDENTIALS"` - `const AttackLayer7TopIndustryResponseMetaConfidenceInfoAnnotationsDataSourceNet AttackLayer7TopIndustryResponseMetaConfidenceInfoAnnotationsDataSource = "NET"` - `const AttackLayer7TopIndustryResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT AttackLayer7TopIndustryResponseMetaConfidenceInfoAnnotationsDataSource = "ROBOTS_TXT"` - `const AttackLayer7TopIndustryResponseMetaConfidenceInfoAnnotationsDataSourceSpeed AttackLayer7TopIndustryResponseMetaConfidenceInfoAnnotationsDataSource = "SPEED"` - `const AttackLayer7TopIndustryResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI AttackLayer7TopIndustryResponseMetaConfidenceInfoAnnotationsDataSource = "WORKERS_AI"` - `Description string` - `EndDate Time` - `EventType AttackLayer7TopIndustryResponseMetaConfidenceInfoAnnotationsEventType` Event type for annotations. - `const AttackLayer7TopIndustryResponseMetaConfidenceInfoAnnotationsEventTypeEvent AttackLayer7TopIndustryResponseMetaConfidenceInfoAnnotationsEventType = "EVENT"` - `const AttackLayer7TopIndustryResponseMetaConfidenceInfoAnnotationsEventTypeGeneral AttackLayer7TopIndustryResponseMetaConfidenceInfoAnnotationsEventType = "GENERAL"` - `const AttackLayer7TopIndustryResponseMetaConfidenceInfoAnnotationsEventTypeOutage AttackLayer7TopIndustryResponseMetaConfidenceInfoAnnotationsEventType = "OUTAGE"` - `const AttackLayer7TopIndustryResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection AttackLayer7TopIndustryResponseMetaConfidenceInfoAnnotationsEventType = "PARTIAL_PROJECTION"` - `const AttackLayer7TopIndustryResponseMetaConfidenceInfoAnnotationsEventTypePipeline AttackLayer7TopIndustryResponseMetaConfidenceInfoAnnotationsEventType = "PIPELINE"` - `const AttackLayer7TopIndustryResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly AttackLayer7TopIndustryResponseMetaConfidenceInfoAnnotationsEventType = "TRAFFIC_ANOMALY"` - `IsInstantaneous bool` Whether event is a single point in time or a time range. - `LinkedURL string` - `StartDate Time` - `Level int64` Provides an indication of how much confidence Cloudflare has in the data. - `DateRange []AttackLayer7TopIndustryResponseMetaDateRange` - `EndTime Time` Adjusted end of date range. - `StartTime Time` Adjusted start of date range. - `LastUpdated Time` Timestamp of the last dataset update. - `Normalization AttackLayer7TopIndustryResponseMetaNormalization` Normalization method applied to the results. Refer to [Normalization methods](https://developers.cloudflare.com/radar/concepts/normalization/). - `const AttackLayer7TopIndustryResponseMetaNormalizationPercentage AttackLayer7TopIndustryResponseMetaNormalization = "PERCENTAGE"` - `const AttackLayer7TopIndustryResponseMetaNormalizationMin0Max AttackLayer7TopIndustryResponseMetaNormalization = "MIN0_MAX"` - `const AttackLayer7TopIndustryResponseMetaNormalizationMinMax AttackLayer7TopIndustryResponseMetaNormalization = "MIN_MAX"` - `const AttackLayer7TopIndustryResponseMetaNormalizationRawValues AttackLayer7TopIndustryResponseMetaNormalization = "RAW_VALUES"` - `const AttackLayer7TopIndustryResponseMetaNormalizationPercentageChange AttackLayer7TopIndustryResponseMetaNormalization = "PERCENTAGE_CHANGE"` - `const AttackLayer7TopIndustryResponseMetaNormalizationRollingAverage AttackLayer7TopIndustryResponseMetaNormalization = "ROLLING_AVERAGE"` - `const AttackLayer7TopIndustryResponseMetaNormalizationOverlappedPercentage AttackLayer7TopIndustryResponseMetaNormalization = "OVERLAPPED_PERCENTAGE"` - `const AttackLayer7TopIndustryResponseMetaNormalizationRatio AttackLayer7TopIndustryResponseMetaNormalization = "RATIO"` - `Units []AttackLayer7TopIndustryResponseMetaUnit` Measurement units for the results. - `Name string` - `Value string` - `Top0 []AttackLayer7TopIndustryResponseTop0` - `Name string` - `Value string` ### Example ```go 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.Layer7.Top.Industry(context.TODO(), radar.AttackLayer7TopIndustryParams{ }) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", response.Meta) } ``` #### Response ```json { "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" } ] }, "top_0": [ { "name": "Computer Software", "value": "65" } ] }, "success": true } ``` ## Get top verticals targeted by layer 7 attacks `client.Radar.Attacks.Layer7.Top.Vertical(ctx, query) (*AttackLayer7TopVerticalResponse, error)` **get** `/radar/attacks/layer7/top/vertical` This endpoint is deprecated. To continue getting this data, switch to the summary by vertical endpoint. ### Parameters - `query AttackLayer7TopVerticalParams` - `ASN param.Field[[]string]` Filters results by Autonomous System. Specify one or more Autonomous System Numbers (ASNs) as a comma-separated list. Prefix with `-` to exclude ASNs from results. For example, `-174, 3356` excludes results from AS174, but includes results from AS3356. - `Continent param.Field[[]string]` 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]` End of the date range (inclusive). - `DateRange param.Field[[]string]` 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]` Start of the date range. - `Format param.Field[AttackLayer7TopVerticalParamsFormat]` Format in which results will be returned. - `const AttackLayer7TopVerticalParamsFormatJson AttackLayer7TopVerticalParamsFormat = "JSON"` - `const AttackLayer7TopVerticalParamsFormatCsv AttackLayer7TopVerticalParamsFormat = "CSV"` - `HTTPMethod param.Field[[]AttackLayer7TopVerticalParamsHTTPMethod]` Filters results by HTTP method. - `const AttackLayer7TopVerticalParamsHTTPMethodGet AttackLayer7TopVerticalParamsHTTPMethod = "GET"` - `const AttackLayer7TopVerticalParamsHTTPMethodPost AttackLayer7TopVerticalParamsHTTPMethod = "POST"` - `const AttackLayer7TopVerticalParamsHTTPMethodDelete AttackLayer7TopVerticalParamsHTTPMethod = "DELETE"` - `const AttackLayer7TopVerticalParamsHTTPMethodPut AttackLayer7TopVerticalParamsHTTPMethod = "PUT"` - `const AttackLayer7TopVerticalParamsHTTPMethodHead AttackLayer7TopVerticalParamsHTTPMethod = "HEAD"` - `const AttackLayer7TopVerticalParamsHTTPMethodPurge AttackLayer7TopVerticalParamsHTTPMethod = "PURGE"` - `const AttackLayer7TopVerticalParamsHTTPMethodOptions AttackLayer7TopVerticalParamsHTTPMethod = "OPTIONS"` - `const AttackLayer7TopVerticalParamsHTTPMethodPropfind AttackLayer7TopVerticalParamsHTTPMethod = "PROPFIND"` - `const AttackLayer7TopVerticalParamsHTTPMethodMkcol AttackLayer7TopVerticalParamsHTTPMethod = "MKCOL"` - `const AttackLayer7TopVerticalParamsHTTPMethodPatch AttackLayer7TopVerticalParamsHTTPMethod = "PATCH"` - `const AttackLayer7TopVerticalParamsHTTPMethodACL AttackLayer7TopVerticalParamsHTTPMethod = "ACL"` - `const AttackLayer7TopVerticalParamsHTTPMethodBcopy AttackLayer7TopVerticalParamsHTTPMethod = "BCOPY"` - `const AttackLayer7TopVerticalParamsHTTPMethodBdelete AttackLayer7TopVerticalParamsHTTPMethod = "BDELETE"` - `const AttackLayer7TopVerticalParamsHTTPMethodBmove AttackLayer7TopVerticalParamsHTTPMethod = "BMOVE"` - `const AttackLayer7TopVerticalParamsHTTPMethodBpropfind AttackLayer7TopVerticalParamsHTTPMethod = "BPROPFIND"` - `const AttackLayer7TopVerticalParamsHTTPMethodBproppatch AttackLayer7TopVerticalParamsHTTPMethod = "BPROPPATCH"` - `const AttackLayer7TopVerticalParamsHTTPMethodCheckin AttackLayer7TopVerticalParamsHTTPMethod = "CHECKIN"` - `const AttackLayer7TopVerticalParamsHTTPMethodCheckout AttackLayer7TopVerticalParamsHTTPMethod = "CHECKOUT"` - `const AttackLayer7TopVerticalParamsHTTPMethodConnect AttackLayer7TopVerticalParamsHTTPMethod = "CONNECT"` - `const AttackLayer7TopVerticalParamsHTTPMethodCopy AttackLayer7TopVerticalParamsHTTPMethod = "COPY"` - `const AttackLayer7TopVerticalParamsHTTPMethodLabel AttackLayer7TopVerticalParamsHTTPMethod = "LABEL"` - `const AttackLayer7TopVerticalParamsHTTPMethodLock AttackLayer7TopVerticalParamsHTTPMethod = "LOCK"` - `const AttackLayer7TopVerticalParamsHTTPMethodMerge AttackLayer7TopVerticalParamsHTTPMethod = "MERGE"` - `const AttackLayer7TopVerticalParamsHTTPMethodMkactivity AttackLayer7TopVerticalParamsHTTPMethod = "MKACTIVITY"` - `const AttackLayer7TopVerticalParamsHTTPMethodMkworkspace AttackLayer7TopVerticalParamsHTTPMethod = "MKWORKSPACE"` - `const AttackLayer7TopVerticalParamsHTTPMethodMove AttackLayer7TopVerticalParamsHTTPMethod = "MOVE"` - `const AttackLayer7TopVerticalParamsHTTPMethodNotify AttackLayer7TopVerticalParamsHTTPMethod = "NOTIFY"` - `const AttackLayer7TopVerticalParamsHTTPMethodOrderpatch AttackLayer7TopVerticalParamsHTTPMethod = "ORDERPATCH"` - `const AttackLayer7TopVerticalParamsHTTPMethodPoll AttackLayer7TopVerticalParamsHTTPMethod = "POLL"` - `const AttackLayer7TopVerticalParamsHTTPMethodProppatch AttackLayer7TopVerticalParamsHTTPMethod = "PROPPATCH"` - `const AttackLayer7TopVerticalParamsHTTPMethodReport AttackLayer7TopVerticalParamsHTTPMethod = "REPORT"` - `const AttackLayer7TopVerticalParamsHTTPMethodSearch AttackLayer7TopVerticalParamsHTTPMethod = "SEARCH"` - `const AttackLayer7TopVerticalParamsHTTPMethodSubscribe AttackLayer7TopVerticalParamsHTTPMethod = "SUBSCRIBE"` - `const AttackLayer7TopVerticalParamsHTTPMethodTrace AttackLayer7TopVerticalParamsHTTPMethod = "TRACE"` - `const AttackLayer7TopVerticalParamsHTTPMethodUncheckout AttackLayer7TopVerticalParamsHTTPMethod = "UNCHECKOUT"` - `const AttackLayer7TopVerticalParamsHTTPMethodUnlock AttackLayer7TopVerticalParamsHTTPMethod = "UNLOCK"` - `const AttackLayer7TopVerticalParamsHTTPMethodUnsubscribe AttackLayer7TopVerticalParamsHTTPMethod = "UNSUBSCRIBE"` - `const AttackLayer7TopVerticalParamsHTTPMethodUpdate AttackLayer7TopVerticalParamsHTTPMethod = "UPDATE"` - `const AttackLayer7TopVerticalParamsHTTPMethodVersioncontrol AttackLayer7TopVerticalParamsHTTPMethod = "VERSIONCONTROL"` - `const AttackLayer7TopVerticalParamsHTTPMethodBaselinecontrol AttackLayer7TopVerticalParamsHTTPMethod = "BASELINECONTROL"` - `const AttackLayer7TopVerticalParamsHTTPMethodXmsenumatts AttackLayer7TopVerticalParamsHTTPMethod = "XMSENUMATTS"` - `const AttackLayer7TopVerticalParamsHTTPMethodRpcOutData AttackLayer7TopVerticalParamsHTTPMethod = "RPC_OUT_DATA"` - `const AttackLayer7TopVerticalParamsHTTPMethodRpcInData AttackLayer7TopVerticalParamsHTTPMethod = "RPC_IN_DATA"` - `const AttackLayer7TopVerticalParamsHTTPMethodJson AttackLayer7TopVerticalParamsHTTPMethod = "JSON"` - `const AttackLayer7TopVerticalParamsHTTPMethodCook AttackLayer7TopVerticalParamsHTTPMethod = "COOK"` - `const AttackLayer7TopVerticalParamsHTTPMethodTrack AttackLayer7TopVerticalParamsHTTPMethod = "TRACK"` - `HTTPVersion param.Field[[]AttackLayer7TopVerticalParamsHTTPVersion]` Filters results by HTTP version. - `const AttackLayer7TopVerticalParamsHTTPVersionHttPv1 AttackLayer7TopVerticalParamsHTTPVersion = "HTTPv1"` - `const AttackLayer7TopVerticalParamsHTTPVersionHttPv2 AttackLayer7TopVerticalParamsHTTPVersion = "HTTPv2"` - `const AttackLayer7TopVerticalParamsHTTPVersionHttPv3 AttackLayer7TopVerticalParamsHTTPVersion = "HTTPv3"` - `IPVersion param.Field[[]AttackLayer7TopVerticalParamsIPVersion]` Filters results by IP version (Ipv4 vs. IPv6). - `const AttackLayer7TopVerticalParamsIPVersionIPv4 AttackLayer7TopVerticalParamsIPVersion = "IPv4"` - `const AttackLayer7TopVerticalParamsIPVersionIPv6 AttackLayer7TopVerticalParamsIPVersion = "IPv6"` - `Limit param.Field[int64]` Limits the number of objects returned in the response. - `Location param.Field[[]string]` 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. - `MitigationProduct param.Field[[]AttackLayer7TopVerticalParamsMitigationProduct]` Filters the results by layer 7 mitigation product. - `const AttackLayer7TopVerticalParamsMitigationProductDDoS AttackLayer7TopVerticalParamsMitigationProduct = "DDOS"` - `const AttackLayer7TopVerticalParamsMitigationProductWAF AttackLayer7TopVerticalParamsMitigationProduct = "WAF"` - `const AttackLayer7TopVerticalParamsMitigationProductBotManagement AttackLayer7TopVerticalParamsMitigationProduct = "BOT_MANAGEMENT"` - `const AttackLayer7TopVerticalParamsMitigationProductAccessRules AttackLayer7TopVerticalParamsMitigationProduct = "ACCESS_RULES"` - `const AttackLayer7TopVerticalParamsMitigationProductIPReputation AttackLayer7TopVerticalParamsMitigationProduct = "IP_REPUTATION"` - `const AttackLayer7TopVerticalParamsMitigationProductAPIShield AttackLayer7TopVerticalParamsMitigationProduct = "API_SHIELD"` - `const AttackLayer7TopVerticalParamsMitigationProductDataLossPrevention AttackLayer7TopVerticalParamsMitigationProduct = "DATA_LOSS_PREVENTION"` - `Name param.Field[[]string]` Array of names used to label the series in the response. ### Returns - `type AttackLayer7TopVerticalResponse struct{…}` - `Meta AttackLayer7TopVerticalResponseMeta` Metadata for the results. - `ConfidenceInfo AttackLayer7TopVerticalResponseMetaConfidenceInfo` - `Annotations []AttackLayer7TopVerticalResponseMetaConfidenceInfoAnnotation` - `DataSource AttackLayer7TopVerticalResponseMetaConfidenceInfoAnnotationsDataSource` Data source for annotations. - `const AttackLayer7TopVerticalResponseMetaConfidenceInfoAnnotationsDataSourceAll AttackLayer7TopVerticalResponseMetaConfidenceInfoAnnotationsDataSource = "ALL"` - `const AttackLayer7TopVerticalResponseMetaConfidenceInfoAnnotationsDataSourceAIBots AttackLayer7TopVerticalResponseMetaConfidenceInfoAnnotationsDataSource = "AI_BOTS"` - `const AttackLayer7TopVerticalResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway AttackLayer7TopVerticalResponseMetaConfidenceInfoAnnotationsDataSource = "AI_GATEWAY"` - `const AttackLayer7TopVerticalResponseMetaConfidenceInfoAnnotationsDataSourceBGP AttackLayer7TopVerticalResponseMetaConfidenceInfoAnnotationsDataSource = "BGP"` - `const AttackLayer7TopVerticalResponseMetaConfidenceInfoAnnotationsDataSourceBots AttackLayer7TopVerticalResponseMetaConfidenceInfoAnnotationsDataSource = "BOTS"` - `const AttackLayer7TopVerticalResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly AttackLayer7TopVerticalResponseMetaConfidenceInfoAnnotationsDataSource = "CONNECTION_ANOMALY"` - `const AttackLayer7TopVerticalResponseMetaConfidenceInfoAnnotationsDataSourceCT AttackLayer7TopVerticalResponseMetaConfidenceInfoAnnotationsDataSource = "CT"` - `const AttackLayer7TopVerticalResponseMetaConfidenceInfoAnnotationsDataSourceDNS AttackLayer7TopVerticalResponseMetaConfidenceInfoAnnotationsDataSource = "DNS"` - `const AttackLayer7TopVerticalResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude AttackLayer7TopVerticalResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_MAGNITUDE"` - `const AttackLayer7TopVerticalResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112 AttackLayer7TopVerticalResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_AS112"` - `const AttackLayer7TopVerticalResponseMetaConfidenceInfoAnnotationsDataSourceDos AttackLayer7TopVerticalResponseMetaConfidenceInfoAnnotationsDataSource = "DOS"` - `const AttackLayer7TopVerticalResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting AttackLayer7TopVerticalResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_ROUTING"` - `const AttackLayer7TopVerticalResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity AttackLayer7TopVerticalResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_SECURITY"` - `const AttackLayer7TopVerticalResponseMetaConfidenceInfoAnnotationsDataSourceFw AttackLayer7TopVerticalResponseMetaConfidenceInfoAnnotationsDataSource = "FW"` - `const AttackLayer7TopVerticalResponseMetaConfidenceInfoAnnotationsDataSourceFwPg AttackLayer7TopVerticalResponseMetaConfidenceInfoAnnotationsDataSource = "FW_PG"` - `const AttackLayer7TopVerticalResponseMetaConfidenceInfoAnnotationsDataSourceHTTP AttackLayer7TopVerticalResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP"` - `const AttackLayer7TopVerticalResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl AttackLayer7TopVerticalResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CONTROL"` - `const AttackLayer7TopVerticalResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer AttackLayer7TopVerticalResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CRAWLER_REFERER"` - `const AttackLayer7TopVerticalResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins AttackLayer7TopVerticalResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_ORIGINS"` - `const AttackLayer7TopVerticalResponseMetaConfidenceInfoAnnotationsDataSourceIQI AttackLayer7TopVerticalResponseMetaConfidenceInfoAnnotationsDataSource = "IQI"` - `const AttackLayer7TopVerticalResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials AttackLayer7TopVerticalResponseMetaConfidenceInfoAnnotationsDataSource = "LEAKED_CREDENTIALS"` - `const AttackLayer7TopVerticalResponseMetaConfidenceInfoAnnotationsDataSourceNet AttackLayer7TopVerticalResponseMetaConfidenceInfoAnnotationsDataSource = "NET"` - `const AttackLayer7TopVerticalResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT AttackLayer7TopVerticalResponseMetaConfidenceInfoAnnotationsDataSource = "ROBOTS_TXT"` - `const AttackLayer7TopVerticalResponseMetaConfidenceInfoAnnotationsDataSourceSpeed AttackLayer7TopVerticalResponseMetaConfidenceInfoAnnotationsDataSource = "SPEED"` - `const AttackLayer7TopVerticalResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI AttackLayer7TopVerticalResponseMetaConfidenceInfoAnnotationsDataSource = "WORKERS_AI"` - `Description string` - `EndDate Time` - `EventType AttackLayer7TopVerticalResponseMetaConfidenceInfoAnnotationsEventType` Event type for annotations. - `const AttackLayer7TopVerticalResponseMetaConfidenceInfoAnnotationsEventTypeEvent AttackLayer7TopVerticalResponseMetaConfidenceInfoAnnotationsEventType = "EVENT"` - `const AttackLayer7TopVerticalResponseMetaConfidenceInfoAnnotationsEventTypeGeneral AttackLayer7TopVerticalResponseMetaConfidenceInfoAnnotationsEventType = "GENERAL"` - `const AttackLayer7TopVerticalResponseMetaConfidenceInfoAnnotationsEventTypeOutage AttackLayer7TopVerticalResponseMetaConfidenceInfoAnnotationsEventType = "OUTAGE"` - `const AttackLayer7TopVerticalResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection AttackLayer7TopVerticalResponseMetaConfidenceInfoAnnotationsEventType = "PARTIAL_PROJECTION"` - `const AttackLayer7TopVerticalResponseMetaConfidenceInfoAnnotationsEventTypePipeline AttackLayer7TopVerticalResponseMetaConfidenceInfoAnnotationsEventType = "PIPELINE"` - `const AttackLayer7TopVerticalResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly AttackLayer7TopVerticalResponseMetaConfidenceInfoAnnotationsEventType = "TRAFFIC_ANOMALY"` - `IsInstantaneous bool` Whether event is a single point in time or a time range. - `LinkedURL string` - `StartDate Time` - `Level int64` Provides an indication of how much confidence Cloudflare has in the data. - `DateRange []AttackLayer7TopVerticalResponseMetaDateRange` - `EndTime Time` Adjusted end of date range. - `StartTime Time` Adjusted start of date range. - `LastUpdated Time` Timestamp of the last dataset update. - `Normalization AttackLayer7TopVerticalResponseMetaNormalization` Normalization method applied to the results. Refer to [Normalization methods](https://developers.cloudflare.com/radar/concepts/normalization/). - `const AttackLayer7TopVerticalResponseMetaNormalizationPercentage AttackLayer7TopVerticalResponseMetaNormalization = "PERCENTAGE"` - `const AttackLayer7TopVerticalResponseMetaNormalizationMin0Max AttackLayer7TopVerticalResponseMetaNormalization = "MIN0_MAX"` - `const AttackLayer7TopVerticalResponseMetaNormalizationMinMax AttackLayer7TopVerticalResponseMetaNormalization = "MIN_MAX"` - `const AttackLayer7TopVerticalResponseMetaNormalizationRawValues AttackLayer7TopVerticalResponseMetaNormalization = "RAW_VALUES"` - `const AttackLayer7TopVerticalResponseMetaNormalizationPercentageChange AttackLayer7TopVerticalResponseMetaNormalization = "PERCENTAGE_CHANGE"` - `const AttackLayer7TopVerticalResponseMetaNormalizationRollingAverage AttackLayer7TopVerticalResponseMetaNormalization = "ROLLING_AVERAGE"` - `const AttackLayer7TopVerticalResponseMetaNormalizationOverlappedPercentage AttackLayer7TopVerticalResponseMetaNormalization = "OVERLAPPED_PERCENTAGE"` - `const AttackLayer7TopVerticalResponseMetaNormalizationRatio AttackLayer7TopVerticalResponseMetaNormalization = "RATIO"` - `Units []AttackLayer7TopVerticalResponseMetaUnit` Measurement units for the results. - `Name string` - `Value string` - `Top0 []AttackLayer7TopVerticalResponseTop0` - `Name string` - `Value string` ### Example ```go 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.Layer7.Top.Vertical(context.TODO(), radar.AttackLayer7TopVerticalParams{ }) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", response.Meta) } ``` #### Response ```json { "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" } ] }, "top_0": [ { "name": "Internet and Telecom", "value": "65" } ] }, "success": true } ``` # Locations ## Get top origin locations of layer 7 attacks `client.Radar.Attacks.Layer7.Top.Locations.Origin(ctx, query) (*AttackLayer7TopLocationOriginResponse, error)` **get** `/radar/attacks/layer7/top/locations/origin` Retrieves the top origin locations of layer 7 attacks. Values are percentages of the total layer 7 attacks, with the origin location determined by the client IP address. ### Parameters - `query AttackLayer7TopLocationOriginParams` - `ASN param.Field[[]string]` Filters results by Autonomous System. Specify one or more Autonomous System Numbers (ASNs) as a comma-separated list. Prefix with `-` to exclude ASNs from results. For example, `-174, 3356` excludes results from AS174, but includes results from AS3356. - `Continent param.Field[[]string]` 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]` End of the date range (inclusive). - `DateRange param.Field[[]string]` 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]` Start of the date range. - `Format param.Field[AttackLayer7TopLocationOriginParamsFormat]` Format in which results will be returned. - `const AttackLayer7TopLocationOriginParamsFormatJson AttackLayer7TopLocationOriginParamsFormat = "JSON"` - `const AttackLayer7TopLocationOriginParamsFormatCsv AttackLayer7TopLocationOriginParamsFormat = "CSV"` - `HTTPMethod param.Field[[]AttackLayer7TopLocationOriginParamsHTTPMethod]` Filters results by HTTP method. - `const AttackLayer7TopLocationOriginParamsHTTPMethodGet AttackLayer7TopLocationOriginParamsHTTPMethod = "GET"` - `const AttackLayer7TopLocationOriginParamsHTTPMethodPost AttackLayer7TopLocationOriginParamsHTTPMethod = "POST"` - `const AttackLayer7TopLocationOriginParamsHTTPMethodDelete AttackLayer7TopLocationOriginParamsHTTPMethod = "DELETE"` - `const AttackLayer7TopLocationOriginParamsHTTPMethodPut AttackLayer7TopLocationOriginParamsHTTPMethod = "PUT"` - `const AttackLayer7TopLocationOriginParamsHTTPMethodHead AttackLayer7TopLocationOriginParamsHTTPMethod = "HEAD"` - `const AttackLayer7TopLocationOriginParamsHTTPMethodPurge AttackLayer7TopLocationOriginParamsHTTPMethod = "PURGE"` - `const AttackLayer7TopLocationOriginParamsHTTPMethodOptions AttackLayer7TopLocationOriginParamsHTTPMethod = "OPTIONS"` - `const AttackLayer7TopLocationOriginParamsHTTPMethodPropfind AttackLayer7TopLocationOriginParamsHTTPMethod = "PROPFIND"` - `const AttackLayer7TopLocationOriginParamsHTTPMethodMkcol AttackLayer7TopLocationOriginParamsHTTPMethod = "MKCOL"` - `const AttackLayer7TopLocationOriginParamsHTTPMethodPatch AttackLayer7TopLocationOriginParamsHTTPMethod = "PATCH"` - `const AttackLayer7TopLocationOriginParamsHTTPMethodACL AttackLayer7TopLocationOriginParamsHTTPMethod = "ACL"` - `const AttackLayer7TopLocationOriginParamsHTTPMethodBcopy AttackLayer7TopLocationOriginParamsHTTPMethod = "BCOPY"` - `const AttackLayer7TopLocationOriginParamsHTTPMethodBdelete AttackLayer7TopLocationOriginParamsHTTPMethod = "BDELETE"` - `const AttackLayer7TopLocationOriginParamsHTTPMethodBmove AttackLayer7TopLocationOriginParamsHTTPMethod = "BMOVE"` - `const AttackLayer7TopLocationOriginParamsHTTPMethodBpropfind AttackLayer7TopLocationOriginParamsHTTPMethod = "BPROPFIND"` - `const AttackLayer7TopLocationOriginParamsHTTPMethodBproppatch AttackLayer7TopLocationOriginParamsHTTPMethod = "BPROPPATCH"` - `const AttackLayer7TopLocationOriginParamsHTTPMethodCheckin AttackLayer7TopLocationOriginParamsHTTPMethod = "CHECKIN"` - `const AttackLayer7TopLocationOriginParamsHTTPMethodCheckout AttackLayer7TopLocationOriginParamsHTTPMethod = "CHECKOUT"` - `const AttackLayer7TopLocationOriginParamsHTTPMethodConnect AttackLayer7TopLocationOriginParamsHTTPMethod = "CONNECT"` - `const AttackLayer7TopLocationOriginParamsHTTPMethodCopy AttackLayer7TopLocationOriginParamsHTTPMethod = "COPY"` - `const AttackLayer7TopLocationOriginParamsHTTPMethodLabel AttackLayer7TopLocationOriginParamsHTTPMethod = "LABEL"` - `const AttackLayer7TopLocationOriginParamsHTTPMethodLock AttackLayer7TopLocationOriginParamsHTTPMethod = "LOCK"` - `const AttackLayer7TopLocationOriginParamsHTTPMethodMerge AttackLayer7TopLocationOriginParamsHTTPMethod = "MERGE"` - `const AttackLayer7TopLocationOriginParamsHTTPMethodMkactivity AttackLayer7TopLocationOriginParamsHTTPMethod = "MKACTIVITY"` - `const AttackLayer7TopLocationOriginParamsHTTPMethodMkworkspace AttackLayer7TopLocationOriginParamsHTTPMethod = "MKWORKSPACE"` - `const AttackLayer7TopLocationOriginParamsHTTPMethodMove AttackLayer7TopLocationOriginParamsHTTPMethod = "MOVE"` - `const AttackLayer7TopLocationOriginParamsHTTPMethodNotify AttackLayer7TopLocationOriginParamsHTTPMethod = "NOTIFY"` - `const AttackLayer7TopLocationOriginParamsHTTPMethodOrderpatch AttackLayer7TopLocationOriginParamsHTTPMethod = "ORDERPATCH"` - `const AttackLayer7TopLocationOriginParamsHTTPMethodPoll AttackLayer7TopLocationOriginParamsHTTPMethod = "POLL"` - `const AttackLayer7TopLocationOriginParamsHTTPMethodProppatch AttackLayer7TopLocationOriginParamsHTTPMethod = "PROPPATCH"` - `const AttackLayer7TopLocationOriginParamsHTTPMethodReport AttackLayer7TopLocationOriginParamsHTTPMethod = "REPORT"` - `const AttackLayer7TopLocationOriginParamsHTTPMethodSearch AttackLayer7TopLocationOriginParamsHTTPMethod = "SEARCH"` - `const AttackLayer7TopLocationOriginParamsHTTPMethodSubscribe AttackLayer7TopLocationOriginParamsHTTPMethod = "SUBSCRIBE"` - `const AttackLayer7TopLocationOriginParamsHTTPMethodTrace AttackLayer7TopLocationOriginParamsHTTPMethod = "TRACE"` - `const AttackLayer7TopLocationOriginParamsHTTPMethodUncheckout AttackLayer7TopLocationOriginParamsHTTPMethod = "UNCHECKOUT"` - `const AttackLayer7TopLocationOriginParamsHTTPMethodUnlock AttackLayer7TopLocationOriginParamsHTTPMethod = "UNLOCK"` - `const AttackLayer7TopLocationOriginParamsHTTPMethodUnsubscribe AttackLayer7TopLocationOriginParamsHTTPMethod = "UNSUBSCRIBE"` - `const AttackLayer7TopLocationOriginParamsHTTPMethodUpdate AttackLayer7TopLocationOriginParamsHTTPMethod = "UPDATE"` - `const AttackLayer7TopLocationOriginParamsHTTPMethodVersioncontrol AttackLayer7TopLocationOriginParamsHTTPMethod = "VERSIONCONTROL"` - `const AttackLayer7TopLocationOriginParamsHTTPMethodBaselinecontrol AttackLayer7TopLocationOriginParamsHTTPMethod = "BASELINECONTROL"` - `const AttackLayer7TopLocationOriginParamsHTTPMethodXmsenumatts AttackLayer7TopLocationOriginParamsHTTPMethod = "XMSENUMATTS"` - `const AttackLayer7TopLocationOriginParamsHTTPMethodRpcOutData AttackLayer7TopLocationOriginParamsHTTPMethod = "RPC_OUT_DATA"` - `const AttackLayer7TopLocationOriginParamsHTTPMethodRpcInData AttackLayer7TopLocationOriginParamsHTTPMethod = "RPC_IN_DATA"` - `const AttackLayer7TopLocationOriginParamsHTTPMethodJson AttackLayer7TopLocationOriginParamsHTTPMethod = "JSON"` - `const AttackLayer7TopLocationOriginParamsHTTPMethodCook AttackLayer7TopLocationOriginParamsHTTPMethod = "COOK"` - `const AttackLayer7TopLocationOriginParamsHTTPMethodTrack AttackLayer7TopLocationOriginParamsHTTPMethod = "TRACK"` - `HTTPVersion param.Field[[]AttackLayer7TopLocationOriginParamsHTTPVersion]` Filters results by HTTP version. - `const AttackLayer7TopLocationOriginParamsHTTPVersionHttPv1 AttackLayer7TopLocationOriginParamsHTTPVersion = "HTTPv1"` - `const AttackLayer7TopLocationOriginParamsHTTPVersionHttPv2 AttackLayer7TopLocationOriginParamsHTTPVersion = "HTTPv2"` - `const AttackLayer7TopLocationOriginParamsHTTPVersionHttPv3 AttackLayer7TopLocationOriginParamsHTTPVersion = "HTTPv3"` - `IPVersion param.Field[[]AttackLayer7TopLocationOriginParamsIPVersion]` Filters results by IP version (Ipv4 vs. IPv6). - `const AttackLayer7TopLocationOriginParamsIPVersionIPv4 AttackLayer7TopLocationOriginParamsIPVersion = "IPv4"` - `const AttackLayer7TopLocationOriginParamsIPVersionIPv6 AttackLayer7TopLocationOriginParamsIPVersion = "IPv6"` - `Limit param.Field[int64]` Limits the number of objects returned in the response. - `MitigationProduct param.Field[[]AttackLayer7TopLocationOriginParamsMitigationProduct]` Filters the results by layer 7 mitigation product. - `const AttackLayer7TopLocationOriginParamsMitigationProductDDoS AttackLayer7TopLocationOriginParamsMitigationProduct = "DDOS"` - `const AttackLayer7TopLocationOriginParamsMitigationProductWAF AttackLayer7TopLocationOriginParamsMitigationProduct = "WAF"` - `const AttackLayer7TopLocationOriginParamsMitigationProductBotManagement AttackLayer7TopLocationOriginParamsMitigationProduct = "BOT_MANAGEMENT"` - `const AttackLayer7TopLocationOriginParamsMitigationProductAccessRules AttackLayer7TopLocationOriginParamsMitigationProduct = "ACCESS_RULES"` - `const AttackLayer7TopLocationOriginParamsMitigationProductIPReputation AttackLayer7TopLocationOriginParamsMitigationProduct = "IP_REPUTATION"` - `const AttackLayer7TopLocationOriginParamsMitigationProductAPIShield AttackLayer7TopLocationOriginParamsMitigationProduct = "API_SHIELD"` - `const AttackLayer7TopLocationOriginParamsMitigationProductDataLossPrevention AttackLayer7TopLocationOriginParamsMitigationProduct = "DATA_LOSS_PREVENTION"` - `Name param.Field[[]string]` Array of names used to label the series in the response. ### Returns - `type AttackLayer7TopLocationOriginResponse struct{…}` - `Meta AttackLayer7TopLocationOriginResponseMeta` Metadata for the results. - `ConfidenceInfo AttackLayer7TopLocationOriginResponseMetaConfidenceInfo` - `Annotations []AttackLayer7TopLocationOriginResponseMetaConfidenceInfoAnnotation` - `DataSource AttackLayer7TopLocationOriginResponseMetaConfidenceInfoAnnotationsDataSource` Data source for annotations. - `const AttackLayer7TopLocationOriginResponseMetaConfidenceInfoAnnotationsDataSourceAll AttackLayer7TopLocationOriginResponseMetaConfidenceInfoAnnotationsDataSource = "ALL"` - `const AttackLayer7TopLocationOriginResponseMetaConfidenceInfoAnnotationsDataSourceAIBots AttackLayer7TopLocationOriginResponseMetaConfidenceInfoAnnotationsDataSource = "AI_BOTS"` - `const AttackLayer7TopLocationOriginResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway AttackLayer7TopLocationOriginResponseMetaConfidenceInfoAnnotationsDataSource = "AI_GATEWAY"` - `const AttackLayer7TopLocationOriginResponseMetaConfidenceInfoAnnotationsDataSourceBGP AttackLayer7TopLocationOriginResponseMetaConfidenceInfoAnnotationsDataSource = "BGP"` - `const AttackLayer7TopLocationOriginResponseMetaConfidenceInfoAnnotationsDataSourceBots AttackLayer7TopLocationOriginResponseMetaConfidenceInfoAnnotationsDataSource = "BOTS"` - `const AttackLayer7TopLocationOriginResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly AttackLayer7TopLocationOriginResponseMetaConfidenceInfoAnnotationsDataSource = "CONNECTION_ANOMALY"` - `const AttackLayer7TopLocationOriginResponseMetaConfidenceInfoAnnotationsDataSourceCT AttackLayer7TopLocationOriginResponseMetaConfidenceInfoAnnotationsDataSource = "CT"` - `const AttackLayer7TopLocationOriginResponseMetaConfidenceInfoAnnotationsDataSourceDNS AttackLayer7TopLocationOriginResponseMetaConfidenceInfoAnnotationsDataSource = "DNS"` - `const AttackLayer7TopLocationOriginResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude AttackLayer7TopLocationOriginResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_MAGNITUDE"` - `const AttackLayer7TopLocationOriginResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112 AttackLayer7TopLocationOriginResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_AS112"` - `const AttackLayer7TopLocationOriginResponseMetaConfidenceInfoAnnotationsDataSourceDos AttackLayer7TopLocationOriginResponseMetaConfidenceInfoAnnotationsDataSource = "DOS"` - `const AttackLayer7TopLocationOriginResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting AttackLayer7TopLocationOriginResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_ROUTING"` - `const AttackLayer7TopLocationOriginResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity AttackLayer7TopLocationOriginResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_SECURITY"` - `const AttackLayer7TopLocationOriginResponseMetaConfidenceInfoAnnotationsDataSourceFw AttackLayer7TopLocationOriginResponseMetaConfidenceInfoAnnotationsDataSource = "FW"` - `const AttackLayer7TopLocationOriginResponseMetaConfidenceInfoAnnotationsDataSourceFwPg AttackLayer7TopLocationOriginResponseMetaConfidenceInfoAnnotationsDataSource = "FW_PG"` - `const AttackLayer7TopLocationOriginResponseMetaConfidenceInfoAnnotationsDataSourceHTTP AttackLayer7TopLocationOriginResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP"` - `const AttackLayer7TopLocationOriginResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl AttackLayer7TopLocationOriginResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CONTROL"` - `const AttackLayer7TopLocationOriginResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer AttackLayer7TopLocationOriginResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CRAWLER_REFERER"` - `const AttackLayer7TopLocationOriginResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins AttackLayer7TopLocationOriginResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_ORIGINS"` - `const AttackLayer7TopLocationOriginResponseMetaConfidenceInfoAnnotationsDataSourceIQI AttackLayer7TopLocationOriginResponseMetaConfidenceInfoAnnotationsDataSource = "IQI"` - `const AttackLayer7TopLocationOriginResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials AttackLayer7TopLocationOriginResponseMetaConfidenceInfoAnnotationsDataSource = "LEAKED_CREDENTIALS"` - `const AttackLayer7TopLocationOriginResponseMetaConfidenceInfoAnnotationsDataSourceNet AttackLayer7TopLocationOriginResponseMetaConfidenceInfoAnnotationsDataSource = "NET"` - `const AttackLayer7TopLocationOriginResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT AttackLayer7TopLocationOriginResponseMetaConfidenceInfoAnnotationsDataSource = "ROBOTS_TXT"` - `const AttackLayer7TopLocationOriginResponseMetaConfidenceInfoAnnotationsDataSourceSpeed AttackLayer7TopLocationOriginResponseMetaConfidenceInfoAnnotationsDataSource = "SPEED"` - `const AttackLayer7TopLocationOriginResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI AttackLayer7TopLocationOriginResponseMetaConfidenceInfoAnnotationsDataSource = "WORKERS_AI"` - `Description string` - `EndDate Time` - `EventType AttackLayer7TopLocationOriginResponseMetaConfidenceInfoAnnotationsEventType` Event type for annotations. - `const AttackLayer7TopLocationOriginResponseMetaConfidenceInfoAnnotationsEventTypeEvent AttackLayer7TopLocationOriginResponseMetaConfidenceInfoAnnotationsEventType = "EVENT"` - `const AttackLayer7TopLocationOriginResponseMetaConfidenceInfoAnnotationsEventTypeGeneral AttackLayer7TopLocationOriginResponseMetaConfidenceInfoAnnotationsEventType = "GENERAL"` - `const AttackLayer7TopLocationOriginResponseMetaConfidenceInfoAnnotationsEventTypeOutage AttackLayer7TopLocationOriginResponseMetaConfidenceInfoAnnotationsEventType = "OUTAGE"` - `const AttackLayer7TopLocationOriginResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection AttackLayer7TopLocationOriginResponseMetaConfidenceInfoAnnotationsEventType = "PARTIAL_PROJECTION"` - `const AttackLayer7TopLocationOriginResponseMetaConfidenceInfoAnnotationsEventTypePipeline AttackLayer7TopLocationOriginResponseMetaConfidenceInfoAnnotationsEventType = "PIPELINE"` - `const AttackLayer7TopLocationOriginResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly AttackLayer7TopLocationOriginResponseMetaConfidenceInfoAnnotationsEventType = "TRAFFIC_ANOMALY"` - `IsInstantaneous bool` Whether event is a single point in time or a time range. - `LinkedURL string` - `StartDate Time` - `Level int64` Provides an indication of how much confidence Cloudflare has in the data. - `DateRange []AttackLayer7TopLocationOriginResponseMetaDateRange` - `EndTime Time` Adjusted end of date range. - `StartTime Time` Adjusted start of date range. - `LastUpdated Time` Timestamp of the last dataset update. - `Normalization AttackLayer7TopLocationOriginResponseMetaNormalization` Normalization method applied to the results. Refer to [Normalization methods](https://developers.cloudflare.com/radar/concepts/normalization/). - `const AttackLayer7TopLocationOriginResponseMetaNormalizationPercentage AttackLayer7TopLocationOriginResponseMetaNormalization = "PERCENTAGE"` - `const AttackLayer7TopLocationOriginResponseMetaNormalizationMin0Max AttackLayer7TopLocationOriginResponseMetaNormalization = "MIN0_MAX"` - `const AttackLayer7TopLocationOriginResponseMetaNormalizationMinMax AttackLayer7TopLocationOriginResponseMetaNormalization = "MIN_MAX"` - `const AttackLayer7TopLocationOriginResponseMetaNormalizationRawValues AttackLayer7TopLocationOriginResponseMetaNormalization = "RAW_VALUES"` - `const AttackLayer7TopLocationOriginResponseMetaNormalizationPercentageChange AttackLayer7TopLocationOriginResponseMetaNormalization = "PERCENTAGE_CHANGE"` - `const AttackLayer7TopLocationOriginResponseMetaNormalizationRollingAverage AttackLayer7TopLocationOriginResponseMetaNormalization = "ROLLING_AVERAGE"` - `const AttackLayer7TopLocationOriginResponseMetaNormalizationOverlappedPercentage AttackLayer7TopLocationOriginResponseMetaNormalization = "OVERLAPPED_PERCENTAGE"` - `const AttackLayer7TopLocationOriginResponseMetaNormalizationRatio AttackLayer7TopLocationOriginResponseMetaNormalization = "RATIO"` - `Units []AttackLayer7TopLocationOriginResponseMetaUnit` Measurement units for the results. - `Name string` - `Value string` - `Top0 []AttackLayer7TopLocationOriginResponseTop0` - `OriginCountryAlpha2 string` - `OriginCountryName string` - `Rank float64` - `Value string` ### Example ```go 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.Layer7.Top.Locations.Origin(context.TODO(), radar.AttackLayer7TopLocationOriginParams{ }) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", response.Meta) } ``` #### Response ```json { "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" } ] }, "top_0": [ { "originCountryAlpha2": "FR", "originCountryName": "France", "rank": 1, "value": "4.323214" } ] }, "success": true } ``` ## Get top target locations of layer 7 attacks `client.Radar.Attacks.Layer7.Top.Locations.Target(ctx, query) (*AttackLayer7TopLocationTargetResponse, error)` **get** `/radar/attacks/layer7/top/locations/target` Retrieves the top target locations of and by layer 7 attacks. Values are a percentage out of the total layer 7 attacks. The target location is determined by the attacked zone's billing country, when available. ### Parameters - `query AttackLayer7TopLocationTargetParams` - `Continent param.Field[[]string]` 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]` End of the date range (inclusive). - `DateRange param.Field[[]string]` 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]` Start of the date range. - `Format param.Field[AttackLayer7TopLocationTargetParamsFormat]` Format in which results will be returned. - `const AttackLayer7TopLocationTargetParamsFormatJson AttackLayer7TopLocationTargetParamsFormat = "JSON"` - `const AttackLayer7TopLocationTargetParamsFormatCsv AttackLayer7TopLocationTargetParamsFormat = "CSV"` - `Limit param.Field[int64]` Limits the number of objects returned in the response. - `MitigationProduct param.Field[[]AttackLayer7TopLocationTargetParamsMitigationProduct]` Filters the results by layer 7 mitigation product. - `const AttackLayer7TopLocationTargetParamsMitigationProductDDoS AttackLayer7TopLocationTargetParamsMitigationProduct = "DDOS"` - `const AttackLayer7TopLocationTargetParamsMitigationProductWAF AttackLayer7TopLocationTargetParamsMitigationProduct = "WAF"` - `const AttackLayer7TopLocationTargetParamsMitigationProductBotManagement AttackLayer7TopLocationTargetParamsMitigationProduct = "BOT_MANAGEMENT"` - `const AttackLayer7TopLocationTargetParamsMitigationProductAccessRules AttackLayer7TopLocationTargetParamsMitigationProduct = "ACCESS_RULES"` - `const AttackLayer7TopLocationTargetParamsMitigationProductIPReputation AttackLayer7TopLocationTargetParamsMitigationProduct = "IP_REPUTATION"` - `const AttackLayer7TopLocationTargetParamsMitigationProductAPIShield AttackLayer7TopLocationTargetParamsMitigationProduct = "API_SHIELD"` - `const AttackLayer7TopLocationTargetParamsMitigationProductDataLossPrevention AttackLayer7TopLocationTargetParamsMitigationProduct = "DATA_LOSS_PREVENTION"` - `Name param.Field[[]string]` Array of names used to label the series in the response. ### Returns - `type AttackLayer7TopLocationTargetResponse struct{…}` - `Meta AttackLayer7TopLocationTargetResponseMeta` Metadata for the results. - `ConfidenceInfo AttackLayer7TopLocationTargetResponseMetaConfidenceInfo` - `Annotations []AttackLayer7TopLocationTargetResponseMetaConfidenceInfoAnnotation` - `DataSource AttackLayer7TopLocationTargetResponseMetaConfidenceInfoAnnotationsDataSource` Data source for annotations. - `const AttackLayer7TopLocationTargetResponseMetaConfidenceInfoAnnotationsDataSourceAll AttackLayer7TopLocationTargetResponseMetaConfidenceInfoAnnotationsDataSource = "ALL"` - `const AttackLayer7TopLocationTargetResponseMetaConfidenceInfoAnnotationsDataSourceAIBots AttackLayer7TopLocationTargetResponseMetaConfidenceInfoAnnotationsDataSource = "AI_BOTS"` - `const AttackLayer7TopLocationTargetResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway AttackLayer7TopLocationTargetResponseMetaConfidenceInfoAnnotationsDataSource = "AI_GATEWAY"` - `const AttackLayer7TopLocationTargetResponseMetaConfidenceInfoAnnotationsDataSourceBGP AttackLayer7TopLocationTargetResponseMetaConfidenceInfoAnnotationsDataSource = "BGP"` - `const AttackLayer7TopLocationTargetResponseMetaConfidenceInfoAnnotationsDataSourceBots AttackLayer7TopLocationTargetResponseMetaConfidenceInfoAnnotationsDataSource = "BOTS"` - `const AttackLayer7TopLocationTargetResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly AttackLayer7TopLocationTargetResponseMetaConfidenceInfoAnnotationsDataSource = "CONNECTION_ANOMALY"` - `const AttackLayer7TopLocationTargetResponseMetaConfidenceInfoAnnotationsDataSourceCT AttackLayer7TopLocationTargetResponseMetaConfidenceInfoAnnotationsDataSource = "CT"` - `const AttackLayer7TopLocationTargetResponseMetaConfidenceInfoAnnotationsDataSourceDNS AttackLayer7TopLocationTargetResponseMetaConfidenceInfoAnnotationsDataSource = "DNS"` - `const AttackLayer7TopLocationTargetResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude AttackLayer7TopLocationTargetResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_MAGNITUDE"` - `const AttackLayer7TopLocationTargetResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112 AttackLayer7TopLocationTargetResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_AS112"` - `const AttackLayer7TopLocationTargetResponseMetaConfidenceInfoAnnotationsDataSourceDos AttackLayer7TopLocationTargetResponseMetaConfidenceInfoAnnotationsDataSource = "DOS"` - `const AttackLayer7TopLocationTargetResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting AttackLayer7TopLocationTargetResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_ROUTING"` - `const AttackLayer7TopLocationTargetResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity AttackLayer7TopLocationTargetResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_SECURITY"` - `const AttackLayer7TopLocationTargetResponseMetaConfidenceInfoAnnotationsDataSourceFw AttackLayer7TopLocationTargetResponseMetaConfidenceInfoAnnotationsDataSource = "FW"` - `const AttackLayer7TopLocationTargetResponseMetaConfidenceInfoAnnotationsDataSourceFwPg AttackLayer7TopLocationTargetResponseMetaConfidenceInfoAnnotationsDataSource = "FW_PG"` - `const AttackLayer7TopLocationTargetResponseMetaConfidenceInfoAnnotationsDataSourceHTTP AttackLayer7TopLocationTargetResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP"` - `const AttackLayer7TopLocationTargetResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl AttackLayer7TopLocationTargetResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CONTROL"` - `const AttackLayer7TopLocationTargetResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer AttackLayer7TopLocationTargetResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CRAWLER_REFERER"` - `const AttackLayer7TopLocationTargetResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins AttackLayer7TopLocationTargetResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_ORIGINS"` - `const AttackLayer7TopLocationTargetResponseMetaConfidenceInfoAnnotationsDataSourceIQI AttackLayer7TopLocationTargetResponseMetaConfidenceInfoAnnotationsDataSource = "IQI"` - `const AttackLayer7TopLocationTargetResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials AttackLayer7TopLocationTargetResponseMetaConfidenceInfoAnnotationsDataSource = "LEAKED_CREDENTIALS"` - `const AttackLayer7TopLocationTargetResponseMetaConfidenceInfoAnnotationsDataSourceNet AttackLayer7TopLocationTargetResponseMetaConfidenceInfoAnnotationsDataSource = "NET"` - `const AttackLayer7TopLocationTargetResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT AttackLayer7TopLocationTargetResponseMetaConfidenceInfoAnnotationsDataSource = "ROBOTS_TXT"` - `const AttackLayer7TopLocationTargetResponseMetaConfidenceInfoAnnotationsDataSourceSpeed AttackLayer7TopLocationTargetResponseMetaConfidenceInfoAnnotationsDataSource = "SPEED"` - `const AttackLayer7TopLocationTargetResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI AttackLayer7TopLocationTargetResponseMetaConfidenceInfoAnnotationsDataSource = "WORKERS_AI"` - `Description string` - `EndDate Time` - `EventType AttackLayer7TopLocationTargetResponseMetaConfidenceInfoAnnotationsEventType` Event type for annotations. - `const AttackLayer7TopLocationTargetResponseMetaConfidenceInfoAnnotationsEventTypeEvent AttackLayer7TopLocationTargetResponseMetaConfidenceInfoAnnotationsEventType = "EVENT"` - `const AttackLayer7TopLocationTargetResponseMetaConfidenceInfoAnnotationsEventTypeGeneral AttackLayer7TopLocationTargetResponseMetaConfidenceInfoAnnotationsEventType = "GENERAL"` - `const AttackLayer7TopLocationTargetResponseMetaConfidenceInfoAnnotationsEventTypeOutage AttackLayer7TopLocationTargetResponseMetaConfidenceInfoAnnotationsEventType = "OUTAGE"` - `const AttackLayer7TopLocationTargetResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection AttackLayer7TopLocationTargetResponseMetaConfidenceInfoAnnotationsEventType = "PARTIAL_PROJECTION"` - `const AttackLayer7TopLocationTargetResponseMetaConfidenceInfoAnnotationsEventTypePipeline AttackLayer7TopLocationTargetResponseMetaConfidenceInfoAnnotationsEventType = "PIPELINE"` - `const AttackLayer7TopLocationTargetResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly AttackLayer7TopLocationTargetResponseMetaConfidenceInfoAnnotationsEventType = "TRAFFIC_ANOMALY"` - `IsInstantaneous bool` Whether event is a single point in time or a time range. - `LinkedURL string` - `StartDate Time` - `Level int64` Provides an indication of how much confidence Cloudflare has in the data. - `DateRange []AttackLayer7TopLocationTargetResponseMetaDateRange` - `EndTime Time` Adjusted end of date range. - `StartTime Time` Adjusted start of date range. - `LastUpdated Time` Timestamp of the last dataset update. - `Normalization AttackLayer7TopLocationTargetResponseMetaNormalization` Normalization method applied to the results. Refer to [Normalization methods](https://developers.cloudflare.com/radar/concepts/normalization/). - `const AttackLayer7TopLocationTargetResponseMetaNormalizationPercentage AttackLayer7TopLocationTargetResponseMetaNormalization = "PERCENTAGE"` - `const AttackLayer7TopLocationTargetResponseMetaNormalizationMin0Max AttackLayer7TopLocationTargetResponseMetaNormalization = "MIN0_MAX"` - `const AttackLayer7TopLocationTargetResponseMetaNormalizationMinMax AttackLayer7TopLocationTargetResponseMetaNormalization = "MIN_MAX"` - `const AttackLayer7TopLocationTargetResponseMetaNormalizationRawValues AttackLayer7TopLocationTargetResponseMetaNormalization = "RAW_VALUES"` - `const AttackLayer7TopLocationTargetResponseMetaNormalizationPercentageChange AttackLayer7TopLocationTargetResponseMetaNormalization = "PERCENTAGE_CHANGE"` - `const AttackLayer7TopLocationTargetResponseMetaNormalizationRollingAverage AttackLayer7TopLocationTargetResponseMetaNormalization = "ROLLING_AVERAGE"` - `const AttackLayer7TopLocationTargetResponseMetaNormalizationOverlappedPercentage AttackLayer7TopLocationTargetResponseMetaNormalization = "OVERLAPPED_PERCENTAGE"` - `const AttackLayer7TopLocationTargetResponseMetaNormalizationRatio AttackLayer7TopLocationTargetResponseMetaNormalization = "RATIO"` - `Units []AttackLayer7TopLocationTargetResponseMetaUnit` Measurement units for the results. - `Name string` - `Value string` - `Top0 []AttackLayer7TopLocationTargetResponseTop0` - `Rank float64` - `TargetCountryAlpha2 string` - `TargetCountryName string` - `Value string` ### Example ```go 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.Layer7.Top.Locations.Target(context.TODO(), radar.AttackLayer7TopLocationTargetParams{ }) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", response.Meta) } ``` #### Response ```json { "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" } ] }, "top_0": [ { "rank": 1, "targetCountryAlpha2": "FR", "targetCountryName": "France", "value": "4.323214" } ] }, "success": true } ``` # Ases ## Get top origin ASes of layer 7 attacks `client.Radar.Attacks.Layer7.Top.Ases.Origin(ctx, query) (*AttackLayer7TopAseOriginResponse, error)` **get** `/radar/attacks/layer7/top/ases/origin` Retrieves the top origin autonomous systems of layer 7 attacks. Values are percentages of the total layer 7 attacks, with the origin autonomous systems determined by the client IP address. ### Parameters - `query AttackLayer7TopAseOriginParams` - `Continent param.Field[[]string]` 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]` End of the date range (inclusive). - `DateRange param.Field[[]string]` 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]` Start of the date range. - `Format param.Field[AttackLayer7TopAseOriginParamsFormat]` Format in which results will be returned. - `const AttackLayer7TopAseOriginParamsFormatJson AttackLayer7TopAseOriginParamsFormat = "JSON"` - `const AttackLayer7TopAseOriginParamsFormatCsv AttackLayer7TopAseOriginParamsFormat = "CSV"` - `HTTPMethod param.Field[[]AttackLayer7TopAseOriginParamsHTTPMethod]` Filters results by HTTP method. - `const AttackLayer7TopAseOriginParamsHTTPMethodGet AttackLayer7TopAseOriginParamsHTTPMethod = "GET"` - `const AttackLayer7TopAseOriginParamsHTTPMethodPost AttackLayer7TopAseOriginParamsHTTPMethod = "POST"` - `const AttackLayer7TopAseOriginParamsHTTPMethodDelete AttackLayer7TopAseOriginParamsHTTPMethod = "DELETE"` - `const AttackLayer7TopAseOriginParamsHTTPMethodPut AttackLayer7TopAseOriginParamsHTTPMethod = "PUT"` - `const AttackLayer7TopAseOriginParamsHTTPMethodHead AttackLayer7TopAseOriginParamsHTTPMethod = "HEAD"` - `const AttackLayer7TopAseOriginParamsHTTPMethodPurge AttackLayer7TopAseOriginParamsHTTPMethod = "PURGE"` - `const AttackLayer7TopAseOriginParamsHTTPMethodOptions AttackLayer7TopAseOriginParamsHTTPMethod = "OPTIONS"` - `const AttackLayer7TopAseOriginParamsHTTPMethodPropfind AttackLayer7TopAseOriginParamsHTTPMethod = "PROPFIND"` - `const AttackLayer7TopAseOriginParamsHTTPMethodMkcol AttackLayer7TopAseOriginParamsHTTPMethod = "MKCOL"` - `const AttackLayer7TopAseOriginParamsHTTPMethodPatch AttackLayer7TopAseOriginParamsHTTPMethod = "PATCH"` - `const AttackLayer7TopAseOriginParamsHTTPMethodACL AttackLayer7TopAseOriginParamsHTTPMethod = "ACL"` - `const AttackLayer7TopAseOriginParamsHTTPMethodBcopy AttackLayer7TopAseOriginParamsHTTPMethod = "BCOPY"` - `const AttackLayer7TopAseOriginParamsHTTPMethodBdelete AttackLayer7TopAseOriginParamsHTTPMethod = "BDELETE"` - `const AttackLayer7TopAseOriginParamsHTTPMethodBmove AttackLayer7TopAseOriginParamsHTTPMethod = "BMOVE"` - `const AttackLayer7TopAseOriginParamsHTTPMethodBpropfind AttackLayer7TopAseOriginParamsHTTPMethod = "BPROPFIND"` - `const AttackLayer7TopAseOriginParamsHTTPMethodBproppatch AttackLayer7TopAseOriginParamsHTTPMethod = "BPROPPATCH"` - `const AttackLayer7TopAseOriginParamsHTTPMethodCheckin AttackLayer7TopAseOriginParamsHTTPMethod = "CHECKIN"` - `const AttackLayer7TopAseOriginParamsHTTPMethodCheckout AttackLayer7TopAseOriginParamsHTTPMethod = "CHECKOUT"` - `const AttackLayer7TopAseOriginParamsHTTPMethodConnect AttackLayer7TopAseOriginParamsHTTPMethod = "CONNECT"` - `const AttackLayer7TopAseOriginParamsHTTPMethodCopy AttackLayer7TopAseOriginParamsHTTPMethod = "COPY"` - `const AttackLayer7TopAseOriginParamsHTTPMethodLabel AttackLayer7TopAseOriginParamsHTTPMethod = "LABEL"` - `const AttackLayer7TopAseOriginParamsHTTPMethodLock AttackLayer7TopAseOriginParamsHTTPMethod = "LOCK"` - `const AttackLayer7TopAseOriginParamsHTTPMethodMerge AttackLayer7TopAseOriginParamsHTTPMethod = "MERGE"` - `const AttackLayer7TopAseOriginParamsHTTPMethodMkactivity AttackLayer7TopAseOriginParamsHTTPMethod = "MKACTIVITY"` - `const AttackLayer7TopAseOriginParamsHTTPMethodMkworkspace AttackLayer7TopAseOriginParamsHTTPMethod = "MKWORKSPACE"` - `const AttackLayer7TopAseOriginParamsHTTPMethodMove AttackLayer7TopAseOriginParamsHTTPMethod = "MOVE"` - `const AttackLayer7TopAseOriginParamsHTTPMethodNotify AttackLayer7TopAseOriginParamsHTTPMethod = "NOTIFY"` - `const AttackLayer7TopAseOriginParamsHTTPMethodOrderpatch AttackLayer7TopAseOriginParamsHTTPMethod = "ORDERPATCH"` - `const AttackLayer7TopAseOriginParamsHTTPMethodPoll AttackLayer7TopAseOriginParamsHTTPMethod = "POLL"` - `const AttackLayer7TopAseOriginParamsHTTPMethodProppatch AttackLayer7TopAseOriginParamsHTTPMethod = "PROPPATCH"` - `const AttackLayer7TopAseOriginParamsHTTPMethodReport AttackLayer7TopAseOriginParamsHTTPMethod = "REPORT"` - `const AttackLayer7TopAseOriginParamsHTTPMethodSearch AttackLayer7TopAseOriginParamsHTTPMethod = "SEARCH"` - `const AttackLayer7TopAseOriginParamsHTTPMethodSubscribe AttackLayer7TopAseOriginParamsHTTPMethod = "SUBSCRIBE"` - `const AttackLayer7TopAseOriginParamsHTTPMethodTrace AttackLayer7TopAseOriginParamsHTTPMethod = "TRACE"` - `const AttackLayer7TopAseOriginParamsHTTPMethodUncheckout AttackLayer7TopAseOriginParamsHTTPMethod = "UNCHECKOUT"` - `const AttackLayer7TopAseOriginParamsHTTPMethodUnlock AttackLayer7TopAseOriginParamsHTTPMethod = "UNLOCK"` - `const AttackLayer7TopAseOriginParamsHTTPMethodUnsubscribe AttackLayer7TopAseOriginParamsHTTPMethod = "UNSUBSCRIBE"` - `const AttackLayer7TopAseOriginParamsHTTPMethodUpdate AttackLayer7TopAseOriginParamsHTTPMethod = "UPDATE"` - `const AttackLayer7TopAseOriginParamsHTTPMethodVersioncontrol AttackLayer7TopAseOriginParamsHTTPMethod = "VERSIONCONTROL"` - `const AttackLayer7TopAseOriginParamsHTTPMethodBaselinecontrol AttackLayer7TopAseOriginParamsHTTPMethod = "BASELINECONTROL"` - `const AttackLayer7TopAseOriginParamsHTTPMethodXmsenumatts AttackLayer7TopAseOriginParamsHTTPMethod = "XMSENUMATTS"` - `const AttackLayer7TopAseOriginParamsHTTPMethodRpcOutData AttackLayer7TopAseOriginParamsHTTPMethod = "RPC_OUT_DATA"` - `const AttackLayer7TopAseOriginParamsHTTPMethodRpcInData AttackLayer7TopAseOriginParamsHTTPMethod = "RPC_IN_DATA"` - `const AttackLayer7TopAseOriginParamsHTTPMethodJson AttackLayer7TopAseOriginParamsHTTPMethod = "JSON"` - `const AttackLayer7TopAseOriginParamsHTTPMethodCook AttackLayer7TopAseOriginParamsHTTPMethod = "COOK"` - `const AttackLayer7TopAseOriginParamsHTTPMethodTrack AttackLayer7TopAseOriginParamsHTTPMethod = "TRACK"` - `HTTPVersion param.Field[[]AttackLayer7TopAseOriginParamsHTTPVersion]` Filters results by HTTP version. - `const AttackLayer7TopAseOriginParamsHTTPVersionHttPv1 AttackLayer7TopAseOriginParamsHTTPVersion = "HTTPv1"` - `const AttackLayer7TopAseOriginParamsHTTPVersionHttPv2 AttackLayer7TopAseOriginParamsHTTPVersion = "HTTPv2"` - `const AttackLayer7TopAseOriginParamsHTTPVersionHttPv3 AttackLayer7TopAseOriginParamsHTTPVersion = "HTTPv3"` - `IPVersion param.Field[[]AttackLayer7TopAseOriginParamsIPVersion]` Filters results by IP version (Ipv4 vs. IPv6). - `const AttackLayer7TopAseOriginParamsIPVersionIPv4 AttackLayer7TopAseOriginParamsIPVersion = "IPv4"` - `const AttackLayer7TopAseOriginParamsIPVersionIPv6 AttackLayer7TopAseOriginParamsIPVersion = "IPv6"` - `Limit param.Field[int64]` Limits the number of objects returned in the response. - `Location param.Field[[]string]` 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. - `MitigationProduct param.Field[[]AttackLayer7TopAseOriginParamsMitigationProduct]` Filters the results by layer 7 mitigation product. - `const AttackLayer7TopAseOriginParamsMitigationProductDDoS AttackLayer7TopAseOriginParamsMitigationProduct = "DDOS"` - `const AttackLayer7TopAseOriginParamsMitigationProductWAF AttackLayer7TopAseOriginParamsMitigationProduct = "WAF"` - `const AttackLayer7TopAseOriginParamsMitigationProductBotManagement AttackLayer7TopAseOriginParamsMitigationProduct = "BOT_MANAGEMENT"` - `const AttackLayer7TopAseOriginParamsMitigationProductAccessRules AttackLayer7TopAseOriginParamsMitigationProduct = "ACCESS_RULES"` - `const AttackLayer7TopAseOriginParamsMitigationProductIPReputation AttackLayer7TopAseOriginParamsMitigationProduct = "IP_REPUTATION"` - `const AttackLayer7TopAseOriginParamsMitigationProductAPIShield AttackLayer7TopAseOriginParamsMitigationProduct = "API_SHIELD"` - `const AttackLayer7TopAseOriginParamsMitigationProductDataLossPrevention AttackLayer7TopAseOriginParamsMitigationProduct = "DATA_LOSS_PREVENTION"` - `Name param.Field[[]string]` Array of names used to label the series in the response. ### Returns - `type AttackLayer7TopAseOriginResponse struct{…}` - `Meta AttackLayer7TopAseOriginResponseMeta` Metadata for the results. - `ConfidenceInfo AttackLayer7TopAseOriginResponseMetaConfidenceInfo` - `Annotations []AttackLayer7TopAseOriginResponseMetaConfidenceInfoAnnotation` - `DataSource AttackLayer7TopAseOriginResponseMetaConfidenceInfoAnnotationsDataSource` Data source for annotations. - `const AttackLayer7TopAseOriginResponseMetaConfidenceInfoAnnotationsDataSourceAll AttackLayer7TopAseOriginResponseMetaConfidenceInfoAnnotationsDataSource = "ALL"` - `const AttackLayer7TopAseOriginResponseMetaConfidenceInfoAnnotationsDataSourceAIBots AttackLayer7TopAseOriginResponseMetaConfidenceInfoAnnotationsDataSource = "AI_BOTS"` - `const AttackLayer7TopAseOriginResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway AttackLayer7TopAseOriginResponseMetaConfidenceInfoAnnotationsDataSource = "AI_GATEWAY"` - `const AttackLayer7TopAseOriginResponseMetaConfidenceInfoAnnotationsDataSourceBGP AttackLayer7TopAseOriginResponseMetaConfidenceInfoAnnotationsDataSource = "BGP"` - `const AttackLayer7TopAseOriginResponseMetaConfidenceInfoAnnotationsDataSourceBots AttackLayer7TopAseOriginResponseMetaConfidenceInfoAnnotationsDataSource = "BOTS"` - `const AttackLayer7TopAseOriginResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly AttackLayer7TopAseOriginResponseMetaConfidenceInfoAnnotationsDataSource = "CONNECTION_ANOMALY"` - `const AttackLayer7TopAseOriginResponseMetaConfidenceInfoAnnotationsDataSourceCT AttackLayer7TopAseOriginResponseMetaConfidenceInfoAnnotationsDataSource = "CT"` - `const AttackLayer7TopAseOriginResponseMetaConfidenceInfoAnnotationsDataSourceDNS AttackLayer7TopAseOriginResponseMetaConfidenceInfoAnnotationsDataSource = "DNS"` - `const AttackLayer7TopAseOriginResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude AttackLayer7TopAseOriginResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_MAGNITUDE"` - `const AttackLayer7TopAseOriginResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112 AttackLayer7TopAseOriginResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_AS112"` - `const AttackLayer7TopAseOriginResponseMetaConfidenceInfoAnnotationsDataSourceDos AttackLayer7TopAseOriginResponseMetaConfidenceInfoAnnotationsDataSource = "DOS"` - `const AttackLayer7TopAseOriginResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting AttackLayer7TopAseOriginResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_ROUTING"` - `const AttackLayer7TopAseOriginResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity AttackLayer7TopAseOriginResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_SECURITY"` - `const AttackLayer7TopAseOriginResponseMetaConfidenceInfoAnnotationsDataSourceFw AttackLayer7TopAseOriginResponseMetaConfidenceInfoAnnotationsDataSource = "FW"` - `const AttackLayer7TopAseOriginResponseMetaConfidenceInfoAnnotationsDataSourceFwPg AttackLayer7TopAseOriginResponseMetaConfidenceInfoAnnotationsDataSource = "FW_PG"` - `const AttackLayer7TopAseOriginResponseMetaConfidenceInfoAnnotationsDataSourceHTTP AttackLayer7TopAseOriginResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP"` - `const AttackLayer7TopAseOriginResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl AttackLayer7TopAseOriginResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CONTROL"` - `const AttackLayer7TopAseOriginResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer AttackLayer7TopAseOriginResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CRAWLER_REFERER"` - `const AttackLayer7TopAseOriginResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins AttackLayer7TopAseOriginResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_ORIGINS"` - `const AttackLayer7TopAseOriginResponseMetaConfidenceInfoAnnotationsDataSourceIQI AttackLayer7TopAseOriginResponseMetaConfidenceInfoAnnotationsDataSource = "IQI"` - `const AttackLayer7TopAseOriginResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials AttackLayer7TopAseOriginResponseMetaConfidenceInfoAnnotationsDataSource = "LEAKED_CREDENTIALS"` - `const AttackLayer7TopAseOriginResponseMetaConfidenceInfoAnnotationsDataSourceNet AttackLayer7TopAseOriginResponseMetaConfidenceInfoAnnotationsDataSource = "NET"` - `const AttackLayer7TopAseOriginResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT AttackLayer7TopAseOriginResponseMetaConfidenceInfoAnnotationsDataSource = "ROBOTS_TXT"` - `const AttackLayer7TopAseOriginResponseMetaConfidenceInfoAnnotationsDataSourceSpeed AttackLayer7TopAseOriginResponseMetaConfidenceInfoAnnotationsDataSource = "SPEED"` - `const AttackLayer7TopAseOriginResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI AttackLayer7TopAseOriginResponseMetaConfidenceInfoAnnotationsDataSource = "WORKERS_AI"` - `Description string` - `EndDate Time` - `EventType AttackLayer7TopAseOriginResponseMetaConfidenceInfoAnnotationsEventType` Event type for annotations. - `const AttackLayer7TopAseOriginResponseMetaConfidenceInfoAnnotationsEventTypeEvent AttackLayer7TopAseOriginResponseMetaConfidenceInfoAnnotationsEventType = "EVENT"` - `const AttackLayer7TopAseOriginResponseMetaConfidenceInfoAnnotationsEventTypeGeneral AttackLayer7TopAseOriginResponseMetaConfidenceInfoAnnotationsEventType = "GENERAL"` - `const AttackLayer7TopAseOriginResponseMetaConfidenceInfoAnnotationsEventTypeOutage AttackLayer7TopAseOriginResponseMetaConfidenceInfoAnnotationsEventType = "OUTAGE"` - `const AttackLayer7TopAseOriginResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection AttackLayer7TopAseOriginResponseMetaConfidenceInfoAnnotationsEventType = "PARTIAL_PROJECTION"` - `const AttackLayer7TopAseOriginResponseMetaConfidenceInfoAnnotationsEventTypePipeline AttackLayer7TopAseOriginResponseMetaConfidenceInfoAnnotationsEventType = "PIPELINE"` - `const AttackLayer7TopAseOriginResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly AttackLayer7TopAseOriginResponseMetaConfidenceInfoAnnotationsEventType = "TRAFFIC_ANOMALY"` - `IsInstantaneous bool` Whether event is a single point in time or a time range. - `LinkedURL string` - `StartDate Time` - `Level int64` Provides an indication of how much confidence Cloudflare has in the data. - `DateRange []AttackLayer7TopAseOriginResponseMetaDateRange` - `EndTime Time` Adjusted end of date range. - `StartTime Time` Adjusted start of date range. - `LastUpdated Time` Timestamp of the last dataset update. - `Normalization AttackLayer7TopAseOriginResponseMetaNormalization` Normalization method applied to the results. Refer to [Normalization methods](https://developers.cloudflare.com/radar/concepts/normalization/). - `const AttackLayer7TopAseOriginResponseMetaNormalizationPercentage AttackLayer7TopAseOriginResponseMetaNormalization = "PERCENTAGE"` - `const AttackLayer7TopAseOriginResponseMetaNormalizationMin0Max AttackLayer7TopAseOriginResponseMetaNormalization = "MIN0_MAX"` - `const AttackLayer7TopAseOriginResponseMetaNormalizationMinMax AttackLayer7TopAseOriginResponseMetaNormalization = "MIN_MAX"` - `const AttackLayer7TopAseOriginResponseMetaNormalizationRawValues AttackLayer7TopAseOriginResponseMetaNormalization = "RAW_VALUES"` - `const AttackLayer7TopAseOriginResponseMetaNormalizationPercentageChange AttackLayer7TopAseOriginResponseMetaNormalization = "PERCENTAGE_CHANGE"` - `const AttackLayer7TopAseOriginResponseMetaNormalizationRollingAverage AttackLayer7TopAseOriginResponseMetaNormalization = "ROLLING_AVERAGE"` - `const AttackLayer7TopAseOriginResponseMetaNormalizationOverlappedPercentage AttackLayer7TopAseOriginResponseMetaNormalization = "OVERLAPPED_PERCENTAGE"` - `const AttackLayer7TopAseOriginResponseMetaNormalizationRatio AttackLayer7TopAseOriginResponseMetaNormalization = "RATIO"` - `Units []AttackLayer7TopAseOriginResponseMetaUnit` Measurement units for the results. - `Name string` - `Value string` - `Top0 []AttackLayer7TopAseOriginResponseTop0` - `OriginASN string` - `OriginASNName string` - `Rank float64` - `Value string` ### Example ```go 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.Layer7.Top.Ases.Origin(context.TODO(), radar.AttackLayer7TopAseOriginParams{ }) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", response.Meta) } ``` #### Response ```json { "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" } ] }, "top_0": [ { "originAsn": "55836", "originAsnName": "RELIANCEJIO-IN Reliance Jio Infocomm Limited", "rank": 1, "value": "4.323214" } ] }, "success": true } ```