Skip to content
Start here

Get HTTP requests by HTTP version summary

client.Radar.HTTP.Summary.HTTPVersion(ctx, query) (*HTTPSummaryHTTPVersionResponse, error)
GET/radar/http/summary/http_version

Retrieves the distribution of HTTP requests by HTTP version.

Security
API Token

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

Example:Authorization: Bearer Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY
API Email + API Key

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

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

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

Example:X-Auth-Key: 144c9defac04969c7bfad8efaa8ea194
Accepted Permissions (at least one required)
User Details WriteUser Details Read
ParametersExpand Collapse
query HTTPSummaryHTTPVersionParams
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[[]HTTPSummaryHTTPVersionParamsBotClass]Optional

Filters results by bot class. Refer to Bot classes.

const HTTPSummaryHTTPVersionParamsBotClassLikelyAutomated HTTPSummaryHTTPVersionParamsBotClass = "LIKELY_AUTOMATED"
const HTTPSummaryHTTPVersionParamsBotClassLikelyHuman HTTPSummaryHTTPVersionParamsBotClass = "LIKELY_HUMAN"
BrowserFamily param.Field[[]HTTPSummaryHTTPVersionParamsBrowserFamily]Optional

Filters results by browser family.

const HTTPSummaryHTTPVersionParamsBrowserFamilyChrome HTTPSummaryHTTPVersionParamsBrowserFamily = "CHROME"
const HTTPSummaryHTTPVersionParamsBrowserFamilyEdge HTTPSummaryHTTPVersionParamsBrowserFamily = "EDGE"
const HTTPSummaryHTTPVersionParamsBrowserFamilyFirefox HTTPSummaryHTTPVersionParamsBrowserFamily = "FIREFOX"
const HTTPSummaryHTTPVersionParamsBrowserFamilySafari HTTPSummaryHTTPVersionParamsBrowserFamily = "SAFARI"
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). Alternative to dateRange; provide together with dateStart. When requesting comparison series, every series must resolve to the same duration as the main series. Each dateStart/dateEnd is floored to the nearest 15 minutes before evaluation, so windows whose durations match only before alignment may be rejected.

DateRange param.Field[[]string]Optional

Filters results by relative date range ending at the current time, with each value producing a separate series. Use <n>d for days (up to 364d) or <n>w for weeks (up to 52w). Append control to request the equivalent previous period for comparison: the comparison window is shifted back by the current window’s length rounded up to a whole number of weeks, so it keeps the same weekday alignment and does not overlap the current window (e.g. 7dcontrol covers days -14 to -7, 10dcontrol covers days -24 to -14). For example, pass 7d and 7dcontrol to compare this week with the previous week. All series must resolve to the same duration as the main series; relative ranges (including control) satisfy this automatically. Use this parameter or set specific start and end dates (dateStart and dateEnd parameters).

DateStart param.Field[[]Time]Optional

Start of the date range. Alternative to dateRange; provide together with dateEnd. When requesting comparison series, every series must resolve to the same duration as the main series. Each dateStart/dateEnd is floored to the nearest 15 minutes before evaluation, so windows whose durations match only before alignment may be rejected.

DeviceType param.Field[[]HTTPSummaryHTTPVersionParamsDeviceType]Optional

Filters results by device type.

const HTTPSummaryHTTPVersionParamsDeviceTypeDesktop HTTPSummaryHTTPVersionParamsDeviceType = "DESKTOP"
const HTTPSummaryHTTPVersionParamsDeviceTypeMobile HTTPSummaryHTTPVersionParamsDeviceType = "MOBILE"
const HTTPSummaryHTTPVersionParamsDeviceTypeOther HTTPSummaryHTTPVersionParamsDeviceType = "OTHER"
Format param.Field[HTTPSummaryHTTPVersionParamsFormat]Optional

Format in which results will be returned.

const HTTPSummaryHTTPVersionParamsFormatJson HTTPSummaryHTTPVersionParamsFormat = "JSON"
const HTTPSummaryHTTPVersionParamsFormatCsv HTTPSummaryHTTPVersionParamsFormat = "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[[]HTTPSummaryHTTPVersionParamsHTTPProtocol]Optional

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

const HTTPSummaryHTTPVersionParamsHTTPProtocolHTTP HTTPSummaryHTTPVersionParamsHTTPProtocol = "HTTP"
const HTTPSummaryHTTPVersionParamsHTTPProtocolHTTPS HTTPSummaryHTTPVersionParamsHTTPProtocol = "HTTPS"
IPVersion param.Field[[]HTTPSummaryHTTPVersionParamsIPVersion]Optional

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

const HTTPSummaryHTTPVersionParamsIPVersionIPv4 HTTPSummaryHTTPVersionParamsIPVersion = "IPv4"
const HTTPSummaryHTTPVersionParamsIPVersionIPv6 HTTPSummaryHTTPVersionParamsIPVersion = "IPv6"
Location param.Field[[]string]Optional

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

Name param.Field[[]string]Optional

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

OS param.Field[[]HTTPSummaryHTTPVersionParamsOS]Optional

Filters results by operating system.

const HTTPSummaryHTTPVersionParamsOSWindows HTTPSummaryHTTPVersionParamsOS = "WINDOWS"
const HTTPSummaryHTTPVersionParamsOSMacosx HTTPSummaryHTTPVersionParamsOS = "MACOSX"
const HTTPSummaryHTTPVersionParamsOSIos HTTPSummaryHTTPVersionParamsOS = "IOS"
const HTTPSummaryHTTPVersionParamsOSAndroid HTTPSummaryHTTPVersionParamsOS = "ANDROID"
const HTTPSummaryHTTPVersionParamsOSChromeos HTTPSummaryHTTPVersionParamsOS = "CHROMEOS"
const HTTPSummaryHTTPVersionParamsOSLinux HTTPSummaryHTTPVersionParamsOS = "LINUX"
const HTTPSummaryHTTPVersionParamsOSSmartTv HTTPSummaryHTTPVersionParamsOS = "SMART_TV"
TLSVersion param.Field[[]HTTPSummaryHTTPVersionParamsTLSVersion]Optional

Filters results by TLS version.

const HTTPSummaryHTTPVersionParamsTLSVersionTlSv1_0 HTTPSummaryHTTPVersionParamsTLSVersion = "TLSv1_0"
const HTTPSummaryHTTPVersionParamsTLSVersionTlSv1_1 HTTPSummaryHTTPVersionParamsTLSVersion = "TLSv1_1"
const HTTPSummaryHTTPVersionParamsTLSVersionTlSv1_2 HTTPSummaryHTTPVersionParamsTLSVersion = "TLSv1_2"
const HTTPSummaryHTTPVersionParamsTLSVersionTlSv1_3 HTTPSummaryHTTPVersionParamsTLSVersion = "TLSv1_3"
const HTTPSummaryHTTPVersionParamsTLSVersionTlSvQuic HTTPSummaryHTTPVersionParamsTLSVersion = "TLSvQUIC"
ReturnsExpand Collapse
type HTTPSummaryHTTPVersionResponse struct{…}
Meta HTTPSummaryHTTPVersionResponseMeta

Metadata for the results.

ConfidenceInfo HTTPSummaryHTTPVersionResponseMetaConfidenceInfo
Annotations []HTTPSummaryHTTPVersionResponseMetaConfidenceInfoAnnotation
DataSource HTTPSummaryHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSource

Data source for annotations.

One of the following:
const HTTPSummaryHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSourceAll HTTPSummaryHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "ALL"
const HTTPSummaryHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSourceAIBots HTTPSummaryHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "AI_BOTS"
const HTTPSummaryHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway HTTPSummaryHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "AI_GATEWAY"
const HTTPSummaryHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSourceBGP HTTPSummaryHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "BGP"
const HTTPSummaryHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSourceBots HTTPSummaryHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "BOTS"
const HTTPSummaryHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly HTTPSummaryHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "CONNECTION_ANOMALY"
const HTTPSummaryHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSourceCT HTTPSummaryHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "CT"
const HTTPSummaryHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSourceDNS HTTPSummaryHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "DNS"
const HTTPSummaryHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude HTTPSummaryHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_MAGNITUDE"
const HTTPSummaryHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112 HTTPSummaryHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_AS112"
const HTTPSummaryHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSourceDos HTTPSummaryHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "DOS"
const HTTPSummaryHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting HTTPSummaryHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_ROUTING"
const HTTPSummaryHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity HTTPSummaryHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_SECURITY"
const HTTPSummaryHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSourceFw HTTPSummaryHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "FW"
const HTTPSummaryHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSourceFwPg HTTPSummaryHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "FW_PG"
const HTTPSummaryHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSourceHTTP HTTPSummaryHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP"
const HTTPSummaryHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl HTTPSummaryHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CONTROL"
const HTTPSummaryHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer HTTPSummaryHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CRAWLER_REFERER"
const HTTPSummaryHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins HTTPSummaryHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_ORIGINS"
const HTTPSummaryHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSourceIQI HTTPSummaryHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "IQI"
const HTTPSummaryHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials HTTPSummaryHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "LEAKED_CREDENTIALS"
const HTTPSummaryHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSourceNet HTTPSummaryHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "NET"
const HTTPSummaryHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT HTTPSummaryHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "ROBOTS_TXT"
const HTTPSummaryHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSourceSpeed HTTPSummaryHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "SPEED"
const HTTPSummaryHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI HTTPSummaryHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "WORKERS_AI"
Description string
EndDate Time
formatdate-time
EventType HTTPSummaryHTTPVersionResponseMetaConfidenceInfoAnnotationsEventType

Event type for annotations.

One of the following:
const HTTPSummaryHTTPVersionResponseMetaConfidenceInfoAnnotationsEventTypeEvent HTTPSummaryHTTPVersionResponseMetaConfidenceInfoAnnotationsEventType = "EVENT"
const HTTPSummaryHTTPVersionResponseMetaConfidenceInfoAnnotationsEventTypeGeneral HTTPSummaryHTTPVersionResponseMetaConfidenceInfoAnnotationsEventType = "GENERAL"
const HTTPSummaryHTTPVersionResponseMetaConfidenceInfoAnnotationsEventTypeOutage HTTPSummaryHTTPVersionResponseMetaConfidenceInfoAnnotationsEventType = "OUTAGE"
const HTTPSummaryHTTPVersionResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection HTTPSummaryHTTPVersionResponseMetaConfidenceInfoAnnotationsEventType = "PARTIAL_PROJECTION"
const HTTPSummaryHTTPVersionResponseMetaConfidenceInfoAnnotationsEventTypePipeline HTTPSummaryHTTPVersionResponseMetaConfidenceInfoAnnotationsEventType = "PIPELINE"
const HTTPSummaryHTTPVersionResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly HTTPSummaryHTTPVersionResponseMetaConfidenceInfoAnnotationsEventType = "TRAFFIC_ANOMALY"
IsInstantaneous bool

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

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

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

DateRange []HTTPSummaryHTTPVersionResponseMetaDateRange
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 HTTPSummaryHTTPVersionResponseMetaNormalization

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

One of the following:
const HTTPSummaryHTTPVersionResponseMetaNormalizationPercentage HTTPSummaryHTTPVersionResponseMetaNormalization = "PERCENTAGE"
const HTTPSummaryHTTPVersionResponseMetaNormalizationMin0Max HTTPSummaryHTTPVersionResponseMetaNormalization = "MIN0_MAX"
const HTTPSummaryHTTPVersionResponseMetaNormalizationMinMax HTTPSummaryHTTPVersionResponseMetaNormalization = "MIN_MAX"
const HTTPSummaryHTTPVersionResponseMetaNormalizationRawValues HTTPSummaryHTTPVersionResponseMetaNormalization = "RAW_VALUES"
const HTTPSummaryHTTPVersionResponseMetaNormalizationPercentageChange HTTPSummaryHTTPVersionResponseMetaNormalization = "PERCENTAGE_CHANGE"
const HTTPSummaryHTTPVersionResponseMetaNormalizationRollingAverage HTTPSummaryHTTPVersionResponseMetaNormalization = "ROLLING_AVERAGE"
const HTTPSummaryHTTPVersionResponseMetaNormalizationOverlappedPercentage HTTPSummaryHTTPVersionResponseMetaNormalization = "OVERLAPPED_PERCENTAGE"
const HTTPSummaryHTTPVersionResponseMetaNormalizationRatio HTTPSummaryHTTPVersionResponseMetaNormalization = "RATIO"
Units []HTTPSummaryHTTPVersionResponseMetaUnit

Measurement units for the results.

Name string
Value string
Summary0 HTTPSummaryHTTPVersionResponseSummary0
HTTP1X string

A numeric string.

HTTP2 string

A numeric string.

HTTP3 string

A numeric string.

Get HTTP requests by HTTP version summary

package main

import (
  "context"
  "fmt"

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

func main() {
  client := cloudflare.NewClient(
    option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"),
  )
  response, err := client.Radar.HTTP.Summary.HTTPVersion(context.TODO(), radar.HTTPSummaryHTTPVersionParams{

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