Skip to content
Start here

Get HTTP requests summary by dimension

client.Radar.HTTP.SummaryV2(ctx, dimension, query) (*HTTPSummaryV2Response, error)
GET/radar/http/summary/{dimension}

Retrieves the distribution of HTTP requests by the specified dimension.

Security
API Token

The preferred authorization scheme for interacting with the Cloudflare API. Create a token.

Example:Authorization: Bearer Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY
API Email + API Key

The previous authorization scheme for interacting with the Cloudflare API, used in conjunction with a Global API key.

Example:X-Auth-Email: user@example.com

The previous authorization scheme for interacting with the Cloudflare API. When possible, use API tokens instead of Global API keys.

Example:X-Auth-Key: 144c9defac04969c7bfad8efaa8ea194
Accepted Permissions (at least one required)
User Details WriteUser Details Read
ParametersExpand Collapse

Specifies the HTTP attribute by which to group the results.

One of the following:
const HTTPSummaryV2ParamsDimensionAdm1 HTTPSummaryV2ParamsDimension = "ADM1"
const HTTPSummaryV2ParamsDimensionAs HTTPSummaryV2ParamsDimension = "AS"
const HTTPSummaryV2ParamsDimensionBotClass HTTPSummaryV2ParamsDimension = "BOT_CLASS"
const HTTPSummaryV2ParamsDimensionBrowser HTTPSummaryV2ParamsDimension = "BROWSER"
const HTTPSummaryV2ParamsDimensionBrowserFamily HTTPSummaryV2ParamsDimension = "BROWSER_FAMILY"
const HTTPSummaryV2ParamsDimensionDeviceType HTTPSummaryV2ParamsDimension = "DEVICE_TYPE"
const HTTPSummaryV2ParamsDimensionHTTPProtocol HTTPSummaryV2ParamsDimension = "HTTP_PROTOCOL"
const HTTPSummaryV2ParamsDimensionHTTPVersion HTTPSummaryV2ParamsDimension = "HTTP_VERSION"
const HTTPSummaryV2ParamsDimensionIPVersion HTTPSummaryV2ParamsDimension = "IP_VERSION"
const HTTPSummaryV2ParamsDimensionLocation HTTPSummaryV2ParamsDimension = "LOCATION"
const HTTPSummaryV2ParamsDimensionOS HTTPSummaryV2ParamsDimension = "OS"
const HTTPSummaryV2ParamsDimensionPostQuantum HTTPSummaryV2ParamsDimension = "POST_QUANTUM"
const HTTPSummaryV2ParamsDimensionTLSVersion HTTPSummaryV2ParamsDimension = "TLS_VERSION"
query HTTPSummaryV2Params
ASN param.Field[[]string]optional

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.

BotClass param.Field[[]HTTPSummaryV2ParamsBotClass]optional

Filters results by bot class. Refer to Bot classes.

const HTTPSummaryV2ParamsBotClassLikelyAutomated HTTPSummaryV2ParamsBotClass = "LIKELY_AUTOMATED"
const HTTPSummaryV2ParamsBotClassLikelyHuman HTTPSummaryV2ParamsBotClass = "LIKELY_HUMAN"
Continent param.Field[[]string]optional

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

DateEnd param.Field[[]Time]optional

End of the date range (inclusive).

DateRange param.Field[[]string]optional

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

DateStart param.Field[[]Time]optional

Start of the date range.

DeviceType param.Field[[]HTTPSummaryV2ParamsDeviceType]optional

Filters results by device type.

const HTTPSummaryV2ParamsDeviceTypeDesktop HTTPSummaryV2ParamsDeviceType = "DESKTOP"
const HTTPSummaryV2ParamsDeviceTypeMobile HTTPSummaryV2ParamsDeviceType = "MOBILE"
const HTTPSummaryV2ParamsDeviceTypeOther HTTPSummaryV2ParamsDeviceType = "OTHER"
Format param.Field[HTTPSummaryV2ParamsFormat]optional

Format in which results will be returned.

const HTTPSummaryV2ParamsFormatJson HTTPSummaryV2ParamsFormat = "JSON"
const HTTPSummaryV2ParamsFormatCsv HTTPSummaryV2ParamsFormat = "CSV"
GeoID param.Field[[]string]optional

Filters results by Geolocation. Specify a comma-separated list of GeoNames IDs. Prefix with - to exclude geoIds from results. For example, -2267056,360689 excludes results from the 2267056 (Lisbon), but includes results from 5128638 (New York).

HTTPProtocol param.Field[[]HTTPSummaryV2ParamsHTTPProtocol]optional

Filters results by HTTP protocol (HTTP vs. HTTPS).

const HTTPSummaryV2ParamsHTTPProtocolHTTP HTTPSummaryV2ParamsHTTPProtocol = "HTTP"
const HTTPSummaryV2ParamsHTTPProtocolHTTPS HTTPSummaryV2ParamsHTTPProtocol = "HTTPS"
HTTPVersion param.Field[[]HTTPSummaryV2ParamsHTTPVersion]optional

Filters results by HTTP version.

const HTTPSummaryV2ParamsHTTPVersionHttPv1 HTTPSummaryV2ParamsHTTPVersion = "HTTPv1"
const HTTPSummaryV2ParamsHTTPVersionHttPv2 HTTPSummaryV2ParamsHTTPVersion = "HTTPv2"
const HTTPSummaryV2ParamsHTTPVersionHttPv3 HTTPSummaryV2ParamsHTTPVersion = "HTTPv3"
IPVersion param.Field[[]HTTPSummaryV2ParamsIPVersion]optional

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

const HTTPSummaryV2ParamsIPVersionIPv4 HTTPSummaryV2ParamsIPVersion = "IPv4"
const HTTPSummaryV2ParamsIPVersionIPv6 HTTPSummaryV2ParamsIPVersion = "IPv6"
LimitPerGroup param.Field[int64]optional

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

Location param.Field[[]string]optional

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

Name param.Field[[]string]optional

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

OS param.Field[[]HTTPSummaryV2ParamsOS]optional

Filters results by operating system.

const HTTPSummaryV2ParamsOSWindows HTTPSummaryV2ParamsOS = "WINDOWS"
const HTTPSummaryV2ParamsOSMacosx HTTPSummaryV2ParamsOS = "MACOSX"
const HTTPSummaryV2ParamsOSIos HTTPSummaryV2ParamsOS = "IOS"
const HTTPSummaryV2ParamsOSAndroid HTTPSummaryV2ParamsOS = "ANDROID"
const HTTPSummaryV2ParamsOSChromeos HTTPSummaryV2ParamsOS = "CHROMEOS"
const HTTPSummaryV2ParamsOSLinux HTTPSummaryV2ParamsOS = "LINUX"
const HTTPSummaryV2ParamsOSSmartTv HTTPSummaryV2ParamsOS = "SMART_TV"
TLSVersion param.Field[[]HTTPSummaryV2ParamsTLSVersion]optional

Filters results by TLS version.

const HTTPSummaryV2ParamsTLSVersionTlSv1_0 HTTPSummaryV2ParamsTLSVersion = "TLSv1_0"
const HTTPSummaryV2ParamsTLSVersionTlSv1_1 HTTPSummaryV2ParamsTLSVersion = "TLSv1_1"
const HTTPSummaryV2ParamsTLSVersionTlSv1_2 HTTPSummaryV2ParamsTLSVersion = "TLSv1_2"
const HTTPSummaryV2ParamsTLSVersionTlSv1_3 HTTPSummaryV2ParamsTLSVersion = "TLSv1_3"
const HTTPSummaryV2ParamsTLSVersionTlSvQuic HTTPSummaryV2ParamsTLSVersion = "TLSvQUIC"
ReturnsExpand Collapse
type HTTPSummaryV2Response struct{…}
Meta HTTPSummaryV2ResponseMeta

Metadata for the results.

ConfidenceInfo HTTPSummaryV2ResponseMetaConfidenceInfo
Annotations []HTTPSummaryV2ResponseMetaConfidenceInfoAnnotation
DataSource HTTPSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource

Data source for annotations.

One of the following:
const HTTPSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceAll HTTPSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "ALL"
const HTTPSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceAIBots HTTPSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "AI_BOTS"
const HTTPSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway HTTPSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "AI_GATEWAY"
const HTTPSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceBGP HTTPSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "BGP"
const HTTPSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceBots HTTPSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "BOTS"
const HTTPSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly HTTPSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "CONNECTION_ANOMALY"
const HTTPSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceCT HTTPSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "CT"
const HTTPSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceDNS HTTPSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "DNS"
const HTTPSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude HTTPSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_MAGNITUDE"
const HTTPSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112 HTTPSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_AS112"
const HTTPSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceDos HTTPSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "DOS"
const HTTPSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting HTTPSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_ROUTING"
const HTTPSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity HTTPSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_SECURITY"
const HTTPSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceFw HTTPSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "FW"
const HTTPSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceFwPg HTTPSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "FW_PG"
const HTTPSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceHTTP HTTPSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP"
const HTTPSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl HTTPSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CONTROL"
const HTTPSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer HTTPSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CRAWLER_REFERER"
const HTTPSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins HTTPSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_ORIGINS"
const HTTPSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceIQI HTTPSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "IQI"
const HTTPSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials HTTPSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "LEAKED_CREDENTIALS"
const HTTPSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceNet HTTPSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "NET"
const HTTPSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT HTTPSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "ROBOTS_TXT"
const HTTPSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceSpeed HTTPSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "SPEED"
const HTTPSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI HTTPSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "WORKERS_AI"
Description string
EndDate Time
formatdate-time
EventType HTTPSummaryV2ResponseMetaConfidenceInfoAnnotationsEventType

Event type for annotations.

One of the following:
const HTTPSummaryV2ResponseMetaConfidenceInfoAnnotationsEventTypeEvent HTTPSummaryV2ResponseMetaConfidenceInfoAnnotationsEventType = "EVENT"
const HTTPSummaryV2ResponseMetaConfidenceInfoAnnotationsEventTypeGeneral HTTPSummaryV2ResponseMetaConfidenceInfoAnnotationsEventType = "GENERAL"
const HTTPSummaryV2ResponseMetaConfidenceInfoAnnotationsEventTypeOutage HTTPSummaryV2ResponseMetaConfidenceInfoAnnotationsEventType = "OUTAGE"
const HTTPSummaryV2ResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection HTTPSummaryV2ResponseMetaConfidenceInfoAnnotationsEventType = "PARTIAL_PROJECTION"
const HTTPSummaryV2ResponseMetaConfidenceInfoAnnotationsEventTypePipeline HTTPSummaryV2ResponseMetaConfidenceInfoAnnotationsEventType = "PIPELINE"
const HTTPSummaryV2ResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly HTTPSummaryV2ResponseMetaConfidenceInfoAnnotationsEventType = "TRAFFIC_ANOMALY"
IsInstantaneous bool

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

LinkedURL string
formaturi
StartDate Time
formatdate-time
Level int64

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

DateRange []HTTPSummaryV2ResponseMetaDateRange
EndTime Time

Adjusted end of date range.

formatdate-time
StartTime Time

Adjusted start of date range.

formatdate-time
LastUpdated Time

Timestamp of the last dataset update.

formatdate-time
Normalization HTTPSummaryV2ResponseMetaNormalization

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

One of the following:
const HTTPSummaryV2ResponseMetaNormalizationPercentage HTTPSummaryV2ResponseMetaNormalization = "PERCENTAGE"
const HTTPSummaryV2ResponseMetaNormalizationMin0Max HTTPSummaryV2ResponseMetaNormalization = "MIN0_MAX"
const HTTPSummaryV2ResponseMetaNormalizationMinMax HTTPSummaryV2ResponseMetaNormalization = "MIN_MAX"
const HTTPSummaryV2ResponseMetaNormalizationRawValues HTTPSummaryV2ResponseMetaNormalization = "RAW_VALUES"
const HTTPSummaryV2ResponseMetaNormalizationPercentageChange HTTPSummaryV2ResponseMetaNormalization = "PERCENTAGE_CHANGE"
const HTTPSummaryV2ResponseMetaNormalizationRollingAverage HTTPSummaryV2ResponseMetaNormalization = "ROLLING_AVERAGE"
const HTTPSummaryV2ResponseMetaNormalizationOverlappedPercentage HTTPSummaryV2ResponseMetaNormalization = "OVERLAPPED_PERCENTAGE"
const HTTPSummaryV2ResponseMetaNormalizationRatio HTTPSummaryV2ResponseMetaNormalization = "RATIO"
Units []HTTPSummaryV2ResponseMetaUnit

Measurement units for the results.

Name string
Value string
Summary0 map[string, string]

Get HTTP requests summary by dimension

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.HTTP.SummaryV2(
    context.TODO(),
    radar.HTTPSummaryV2ParamsDimensionAdm1,
    radar.HTTPSummaryV2Params{

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