Skip to content
Start here

Get top ASes by HTTP requests

client.Radar.HTTP.Ases.Get(ctx, query) (*HTTPAseGetResponse, error)
GET/radar/http/top/ases

Retrieves the top autonomous systems by HTTP requests.

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 HTTPAseGetParams
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[[]HTTPAseGetParamsBotClass]Optional

Filters results by bot class. Refer to Bot classes.

const HTTPAseGetParamsBotClassLikelyAutomated HTTPAseGetParamsBotClass = "LIKELY_AUTOMATED"
const HTTPAseGetParamsBotClassLikelyHuman HTTPAseGetParamsBotClass = "LIKELY_HUMAN"
BrowserFamily param.Field[[]HTTPAseGetParamsBrowserFamily]Optional

Filters results by browser family.

const HTTPAseGetParamsBrowserFamilyChrome HTTPAseGetParamsBrowserFamily = "CHROME"
const HTTPAseGetParamsBrowserFamilyEdge HTTPAseGetParamsBrowserFamily = "EDGE"
const HTTPAseGetParamsBrowserFamilyFirefox HTTPAseGetParamsBrowserFamily = "FIREFOX"
const HTTPAseGetParamsBrowserFamilySafari HTTPAseGetParamsBrowserFamily = "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[[]HTTPAseGetParamsDeviceType]Optional

Filters results by device type.

const HTTPAseGetParamsDeviceTypeDesktop HTTPAseGetParamsDeviceType = "DESKTOP"
const HTTPAseGetParamsDeviceTypeMobile HTTPAseGetParamsDeviceType = "MOBILE"
const HTTPAseGetParamsDeviceTypeOther HTTPAseGetParamsDeviceType = "OTHER"
Format param.Field[HTTPAseGetParamsFormat]Optional

Format in which results will be returned.

const HTTPAseGetParamsFormatJson HTTPAseGetParamsFormat = "JSON"
const HTTPAseGetParamsFormatCsv HTTPAseGetParamsFormat = "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[[]HTTPAseGetParamsHTTPProtocol]Optional

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

const HTTPAseGetParamsHTTPProtocolHTTP HTTPAseGetParamsHTTPProtocol = "HTTP"
const HTTPAseGetParamsHTTPProtocolHTTPS HTTPAseGetParamsHTTPProtocol = "HTTPS"
HTTPVersion param.Field[[]HTTPAseGetParamsHTTPVersion]Optional

Filters results by HTTP version.

const HTTPAseGetParamsHTTPVersionHttPv1 HTTPAseGetParamsHTTPVersion = "HTTPv1"
const HTTPAseGetParamsHTTPVersionHttPv2 HTTPAseGetParamsHTTPVersion = "HTTPv2"
const HTTPAseGetParamsHTTPVersionHttPv3 HTTPAseGetParamsHTTPVersion = "HTTPv3"
IPVersion param.Field[[]HTTPAseGetParamsIPVersion]Optional

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

const HTTPAseGetParamsIPVersionIPv4 HTTPAseGetParamsIPVersion = "IPv4"
const HTTPAseGetParamsIPVersionIPv6 HTTPAseGetParamsIPVersion = "IPv6"
Limit param.Field[int64]Optional

Limits the number of objects returned in the response.

exclusiveMinimum
minimum0
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[[]HTTPAseGetParamsOS]Optional

Filters results by operating system.

const HTTPAseGetParamsOSWindows HTTPAseGetParamsOS = "WINDOWS"
const HTTPAseGetParamsOSMacosx HTTPAseGetParamsOS = "MACOSX"
const HTTPAseGetParamsOSIos HTTPAseGetParamsOS = "IOS"
const HTTPAseGetParamsOSAndroid HTTPAseGetParamsOS = "ANDROID"
const HTTPAseGetParamsOSChromeos HTTPAseGetParamsOS = "CHROMEOS"
const HTTPAseGetParamsOSLinux HTTPAseGetParamsOS = "LINUX"
const HTTPAseGetParamsOSSmartTv HTTPAseGetParamsOS = "SMART_TV"
TLSVersion param.Field[[]HTTPAseGetParamsTLSVersion]Optional

Filters results by TLS version.

const HTTPAseGetParamsTLSVersionTlSv1_0 HTTPAseGetParamsTLSVersion = "TLSv1_0"
const HTTPAseGetParamsTLSVersionTlSv1_1 HTTPAseGetParamsTLSVersion = "TLSv1_1"
const HTTPAseGetParamsTLSVersionTlSv1_2 HTTPAseGetParamsTLSVersion = "TLSv1_2"
const HTTPAseGetParamsTLSVersionTlSv1_3 HTTPAseGetParamsTLSVersion = "TLSv1_3"
const HTTPAseGetParamsTLSVersionTlSvQuic HTTPAseGetParamsTLSVersion = "TLSvQUIC"
ReturnsExpand Collapse
type HTTPAseGetResponse struct{…}
Meta HTTPAseGetResponseMeta

Metadata for the results.

ConfidenceInfo HTTPAseGetResponseMetaConfidenceInfo
Annotations []HTTPAseGetResponseMetaConfidenceInfoAnnotation
DataSource HTTPAseGetResponseMetaConfidenceInfoAnnotationsDataSource

Data source for annotations.

One of the following:
const HTTPAseGetResponseMetaConfidenceInfoAnnotationsDataSourceAll HTTPAseGetResponseMetaConfidenceInfoAnnotationsDataSource = "ALL"
const HTTPAseGetResponseMetaConfidenceInfoAnnotationsDataSourceAIBots HTTPAseGetResponseMetaConfidenceInfoAnnotationsDataSource = "AI_BOTS"
const HTTPAseGetResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway HTTPAseGetResponseMetaConfidenceInfoAnnotationsDataSource = "AI_GATEWAY"
const HTTPAseGetResponseMetaConfidenceInfoAnnotationsDataSourceBGP HTTPAseGetResponseMetaConfidenceInfoAnnotationsDataSource = "BGP"
const HTTPAseGetResponseMetaConfidenceInfoAnnotationsDataSourceBots HTTPAseGetResponseMetaConfidenceInfoAnnotationsDataSource = "BOTS"
const HTTPAseGetResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly HTTPAseGetResponseMetaConfidenceInfoAnnotationsDataSource = "CONNECTION_ANOMALY"
const HTTPAseGetResponseMetaConfidenceInfoAnnotationsDataSourceCT HTTPAseGetResponseMetaConfidenceInfoAnnotationsDataSource = "CT"
const HTTPAseGetResponseMetaConfidenceInfoAnnotationsDataSourceDNS HTTPAseGetResponseMetaConfidenceInfoAnnotationsDataSource = "DNS"
const HTTPAseGetResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude HTTPAseGetResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_MAGNITUDE"
const HTTPAseGetResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112 HTTPAseGetResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_AS112"
const HTTPAseGetResponseMetaConfidenceInfoAnnotationsDataSourceDos HTTPAseGetResponseMetaConfidenceInfoAnnotationsDataSource = "DOS"
const HTTPAseGetResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting HTTPAseGetResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_ROUTING"
const HTTPAseGetResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity HTTPAseGetResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_SECURITY"
const HTTPAseGetResponseMetaConfidenceInfoAnnotationsDataSourceFw HTTPAseGetResponseMetaConfidenceInfoAnnotationsDataSource = "FW"
const HTTPAseGetResponseMetaConfidenceInfoAnnotationsDataSourceFwPg HTTPAseGetResponseMetaConfidenceInfoAnnotationsDataSource = "FW_PG"
const HTTPAseGetResponseMetaConfidenceInfoAnnotationsDataSourceHTTP HTTPAseGetResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP"
const HTTPAseGetResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl HTTPAseGetResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CONTROL"
const HTTPAseGetResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer HTTPAseGetResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CRAWLER_REFERER"
const HTTPAseGetResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins HTTPAseGetResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_ORIGINS"
const HTTPAseGetResponseMetaConfidenceInfoAnnotationsDataSourceIQI HTTPAseGetResponseMetaConfidenceInfoAnnotationsDataSource = "IQI"
const HTTPAseGetResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials HTTPAseGetResponseMetaConfidenceInfoAnnotationsDataSource = "LEAKED_CREDENTIALS"
const HTTPAseGetResponseMetaConfidenceInfoAnnotationsDataSourceNet HTTPAseGetResponseMetaConfidenceInfoAnnotationsDataSource = "NET"
const HTTPAseGetResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT HTTPAseGetResponseMetaConfidenceInfoAnnotationsDataSource = "ROBOTS_TXT"
const HTTPAseGetResponseMetaConfidenceInfoAnnotationsDataSourceSpeed HTTPAseGetResponseMetaConfidenceInfoAnnotationsDataSource = "SPEED"
const HTTPAseGetResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI HTTPAseGetResponseMetaConfidenceInfoAnnotationsDataSource = "WORKERS_AI"
Description string
EndDate Time
formatdate-time
EventType HTTPAseGetResponseMetaConfidenceInfoAnnotationsEventType

Event type for annotations.

One of the following:
const HTTPAseGetResponseMetaConfidenceInfoAnnotationsEventTypeEvent HTTPAseGetResponseMetaConfidenceInfoAnnotationsEventType = "EVENT"
const HTTPAseGetResponseMetaConfidenceInfoAnnotationsEventTypeGeneral HTTPAseGetResponseMetaConfidenceInfoAnnotationsEventType = "GENERAL"
const HTTPAseGetResponseMetaConfidenceInfoAnnotationsEventTypeOutage HTTPAseGetResponseMetaConfidenceInfoAnnotationsEventType = "OUTAGE"
const HTTPAseGetResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection HTTPAseGetResponseMetaConfidenceInfoAnnotationsEventType = "PARTIAL_PROJECTION"
const HTTPAseGetResponseMetaConfidenceInfoAnnotationsEventTypePipeline HTTPAseGetResponseMetaConfidenceInfoAnnotationsEventType = "PIPELINE"
const HTTPAseGetResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly HTTPAseGetResponseMetaConfidenceInfoAnnotationsEventType = "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 []HTTPAseGetResponseMetaDateRange
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 HTTPAseGetResponseMetaNormalization

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

One of the following:
const HTTPAseGetResponseMetaNormalizationPercentage HTTPAseGetResponseMetaNormalization = "PERCENTAGE"
const HTTPAseGetResponseMetaNormalizationMin0Max HTTPAseGetResponseMetaNormalization = "MIN0_MAX"
const HTTPAseGetResponseMetaNormalizationMinMax HTTPAseGetResponseMetaNormalization = "MIN_MAX"
const HTTPAseGetResponseMetaNormalizationRawValues HTTPAseGetResponseMetaNormalization = "RAW_VALUES"
const HTTPAseGetResponseMetaNormalizationPercentageChange HTTPAseGetResponseMetaNormalization = "PERCENTAGE_CHANGE"
const HTTPAseGetResponseMetaNormalizationRollingAverage HTTPAseGetResponseMetaNormalization = "ROLLING_AVERAGE"
const HTTPAseGetResponseMetaNormalizationOverlappedPercentage HTTPAseGetResponseMetaNormalization = "OVERLAPPED_PERCENTAGE"
const HTTPAseGetResponseMetaNormalizationRatio HTTPAseGetResponseMetaNormalization = "RATIO"
Units []HTTPAseGetResponseMetaUnit

Measurement units for the results.

Name string
Value string
Top0 []HTTPAseGetResponseTop0
ClientASN int64
ClientAsName string
Value string

A numeric string.

Get top ASes by HTTP requests

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"),
  )
  ase, err := client.Radar.HTTP.Ases.Get(context.TODO(), radar.HTTPAseGetParams{

  })
  if err != nil {
    panic(err.Error())
  }
  fmt.Printf("%+v\n", ase.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"
        }
      ]
    },
    "top_0": [
      {
        "clientASN": 3243,
        "clientASName": "MEO",
        "value": "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"
        }
      ]
    },
    "top_0": [
      {
        "clientASN": 3243,
        "clientASName": "MEO",
        "value": "10"
      }
    ]
  },
  "success": true
}