Skip to content
Start here

Get HTTP requests by IP version summary

client.Radar.HTTP.Summary.IPVersion(ctx, query) (*HTTPSummaryIPVersionResponse, error)
GET/radar/http/summary/ip_version

Retrieves the distribution of HTTP requests by IP 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 HTTPSummaryIPVersionParams
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[[]HTTPSummaryIPVersionParamsBotClass]Optional

Filters results by bot class. Refer to Bot classes.

const HTTPSummaryIPVersionParamsBotClassLikelyAutomated HTTPSummaryIPVersionParamsBotClass = "LIKELY_AUTOMATED"
const HTTPSummaryIPVersionParamsBotClassLikelyHuman HTTPSummaryIPVersionParamsBotClass = "LIKELY_HUMAN"
BrowserFamily param.Field[[]HTTPSummaryIPVersionParamsBrowserFamily]Optional

Filters results by browser family.

const HTTPSummaryIPVersionParamsBrowserFamilyChrome HTTPSummaryIPVersionParamsBrowserFamily = "CHROME"
const HTTPSummaryIPVersionParamsBrowserFamilyEdge HTTPSummaryIPVersionParamsBrowserFamily = "EDGE"
const HTTPSummaryIPVersionParamsBrowserFamilyFirefox HTTPSummaryIPVersionParamsBrowserFamily = "FIREFOX"
const HTTPSummaryIPVersionParamsBrowserFamilySafari HTTPSummaryIPVersionParamsBrowserFamily = "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).

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[[]HTTPSummaryIPVersionParamsDeviceType]Optional

Filters results by device type.

const HTTPSummaryIPVersionParamsDeviceTypeDesktop HTTPSummaryIPVersionParamsDeviceType = "DESKTOP"
const HTTPSummaryIPVersionParamsDeviceTypeMobile HTTPSummaryIPVersionParamsDeviceType = "MOBILE"
const HTTPSummaryIPVersionParamsDeviceTypeOther HTTPSummaryIPVersionParamsDeviceType = "OTHER"
Format param.Field[HTTPSummaryIPVersionParamsFormat]Optional

Format in which results will be returned.

const HTTPSummaryIPVersionParamsFormatJson HTTPSummaryIPVersionParamsFormat = "JSON"
const HTTPSummaryIPVersionParamsFormatCsv HTTPSummaryIPVersionParamsFormat = "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[[]HTTPSummaryIPVersionParamsHTTPProtocol]Optional

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

const HTTPSummaryIPVersionParamsHTTPProtocolHTTP HTTPSummaryIPVersionParamsHTTPProtocol = "HTTP"
const HTTPSummaryIPVersionParamsHTTPProtocolHTTPS HTTPSummaryIPVersionParamsHTTPProtocol = "HTTPS"
HTTPVersion param.Field[[]HTTPSummaryIPVersionParamsHTTPVersion]Optional

Filters results by HTTP version.

const HTTPSummaryIPVersionParamsHTTPVersionHttPv1 HTTPSummaryIPVersionParamsHTTPVersion = "HTTPv1"
const HTTPSummaryIPVersionParamsHTTPVersionHttPv2 HTTPSummaryIPVersionParamsHTTPVersion = "HTTPv2"
const HTTPSummaryIPVersionParamsHTTPVersionHttPv3 HTTPSummaryIPVersionParamsHTTPVersion = "HTTPv3"
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[[]HTTPSummaryIPVersionParamsOS]Optional

Filters results by operating system.

const HTTPSummaryIPVersionParamsOSWindows HTTPSummaryIPVersionParamsOS = "WINDOWS"
const HTTPSummaryIPVersionParamsOSMacosx HTTPSummaryIPVersionParamsOS = "MACOSX"
const HTTPSummaryIPVersionParamsOSIos HTTPSummaryIPVersionParamsOS = "IOS"
const HTTPSummaryIPVersionParamsOSAndroid HTTPSummaryIPVersionParamsOS = "ANDROID"
const HTTPSummaryIPVersionParamsOSChromeos HTTPSummaryIPVersionParamsOS = "CHROMEOS"
const HTTPSummaryIPVersionParamsOSLinux HTTPSummaryIPVersionParamsOS = "LINUX"
const HTTPSummaryIPVersionParamsOSSmartTv HTTPSummaryIPVersionParamsOS = "SMART_TV"
TLSVersion param.Field[[]HTTPSummaryIPVersionParamsTLSVersion]Optional

Filters results by TLS version.

const HTTPSummaryIPVersionParamsTLSVersionTlSv1_0 HTTPSummaryIPVersionParamsTLSVersion = "TLSv1_0"
const HTTPSummaryIPVersionParamsTLSVersionTlSv1_1 HTTPSummaryIPVersionParamsTLSVersion = "TLSv1_1"
const HTTPSummaryIPVersionParamsTLSVersionTlSv1_2 HTTPSummaryIPVersionParamsTLSVersion = "TLSv1_2"
const HTTPSummaryIPVersionParamsTLSVersionTlSv1_3 HTTPSummaryIPVersionParamsTLSVersion = "TLSv1_3"
const HTTPSummaryIPVersionParamsTLSVersionTlSvQuic HTTPSummaryIPVersionParamsTLSVersion = "TLSvQUIC"
ReturnsExpand Collapse
type HTTPSummaryIPVersionResponse struct{…}
Meta HTTPSummaryIPVersionResponseMeta

Metadata for the results.

ConfidenceInfo HTTPSummaryIPVersionResponseMetaConfidenceInfo
Annotations []HTTPSummaryIPVersionResponseMetaConfidenceInfoAnnotation
DataSource HTTPSummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSource

Data source for annotations.

One of the following:
const HTTPSummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceAll HTTPSummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "ALL"
const HTTPSummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceAIBots HTTPSummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "AI_BOTS"
const HTTPSummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway HTTPSummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "AI_GATEWAY"
const HTTPSummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceBGP HTTPSummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "BGP"
const HTTPSummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceBots HTTPSummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "BOTS"
const HTTPSummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly HTTPSummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "CONNECTION_ANOMALY"
const HTTPSummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceCT HTTPSummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "CT"
const HTTPSummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceDNS HTTPSummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "DNS"
const HTTPSummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude HTTPSummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_MAGNITUDE"
const HTTPSummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112 HTTPSummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_AS112"
const HTTPSummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceDos HTTPSummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "DOS"
const HTTPSummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting HTTPSummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_ROUTING"
const HTTPSummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity HTTPSummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_SECURITY"
const HTTPSummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceFw HTTPSummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "FW"
const HTTPSummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceFwPg HTTPSummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "FW_PG"
const HTTPSummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceHTTP HTTPSummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP"
const HTTPSummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl HTTPSummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CONTROL"
const HTTPSummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer HTTPSummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CRAWLER_REFERER"
const HTTPSummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins HTTPSummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_ORIGINS"
const HTTPSummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceIQI HTTPSummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "IQI"
const HTTPSummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials HTTPSummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "LEAKED_CREDENTIALS"
const HTTPSummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceNet HTTPSummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "NET"
const HTTPSummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT HTTPSummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "ROBOTS_TXT"
const HTTPSummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceSpeed HTTPSummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "SPEED"
const HTTPSummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI HTTPSummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "WORKERS_AI"
Description string
EndDate Time
formatdate-time
EventType HTTPSummaryIPVersionResponseMetaConfidenceInfoAnnotationsEventType

Event type for annotations.

One of the following:
const HTTPSummaryIPVersionResponseMetaConfidenceInfoAnnotationsEventTypeEvent HTTPSummaryIPVersionResponseMetaConfidenceInfoAnnotationsEventType = "EVENT"
const HTTPSummaryIPVersionResponseMetaConfidenceInfoAnnotationsEventTypeGeneral HTTPSummaryIPVersionResponseMetaConfidenceInfoAnnotationsEventType = "GENERAL"
const HTTPSummaryIPVersionResponseMetaConfidenceInfoAnnotationsEventTypeOutage HTTPSummaryIPVersionResponseMetaConfidenceInfoAnnotationsEventType = "OUTAGE"
const HTTPSummaryIPVersionResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection HTTPSummaryIPVersionResponseMetaConfidenceInfoAnnotationsEventType = "PARTIAL_PROJECTION"
const HTTPSummaryIPVersionResponseMetaConfidenceInfoAnnotationsEventTypePipeline HTTPSummaryIPVersionResponseMetaConfidenceInfoAnnotationsEventType = "PIPELINE"
const HTTPSummaryIPVersionResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly HTTPSummaryIPVersionResponseMetaConfidenceInfoAnnotationsEventType = "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 []HTTPSummaryIPVersionResponseMetaDateRange
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 HTTPSummaryIPVersionResponseMetaNormalization

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

One of the following:
const HTTPSummaryIPVersionResponseMetaNormalizationPercentage HTTPSummaryIPVersionResponseMetaNormalization = "PERCENTAGE"
const HTTPSummaryIPVersionResponseMetaNormalizationMin0Max HTTPSummaryIPVersionResponseMetaNormalization = "MIN0_MAX"
const HTTPSummaryIPVersionResponseMetaNormalizationMinMax HTTPSummaryIPVersionResponseMetaNormalization = "MIN_MAX"
const HTTPSummaryIPVersionResponseMetaNormalizationRawValues HTTPSummaryIPVersionResponseMetaNormalization = "RAW_VALUES"
const HTTPSummaryIPVersionResponseMetaNormalizationPercentageChange HTTPSummaryIPVersionResponseMetaNormalization = "PERCENTAGE_CHANGE"
const HTTPSummaryIPVersionResponseMetaNormalizationRollingAverage HTTPSummaryIPVersionResponseMetaNormalization = "ROLLING_AVERAGE"
const HTTPSummaryIPVersionResponseMetaNormalizationOverlappedPercentage HTTPSummaryIPVersionResponseMetaNormalization = "OVERLAPPED_PERCENTAGE"
const HTTPSummaryIPVersionResponseMetaNormalizationRatio HTTPSummaryIPVersionResponseMetaNormalization = "RATIO"
Units []HTTPSummaryIPVersionResponseMetaUnit

Measurement units for the results.

Name string
Value string
Summary0 HTTPSummaryIPVersionResponseSummary0
IPv4 string

A numeric string.

IPv6 string

A numeric string.

Get HTTP requests by IP version summary

package main

import (
  "context"
  "fmt"

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

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

  })
  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": {
      "IPv4": "10",
      "IPv6": "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": {
      "IPv4": "10",
      "IPv6": "10"
    }
  },
  "success": true
}