Skip to content
Start here

Get top ASes by HTTP requests for a bot class

client.Radar.HTTP.Ases.BotClass.Get(ctx, botClass, query) (*HTTPAseBotClassGetResponse, error)
GET/radar/http/top/ases/bot_class/{bot_class}

Retrieves the top autonomous systems, by HTTP requests, of the requested bot class.

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

Bot class. Refer to Bot classes.

One of the following:
const HTTPAseBotClassGetParamsBotClassLikelyAutomated HTTPAseBotClassGetParamsBotClass = "LIKELY_AUTOMATED"
const HTTPAseBotClassGetParamsBotClassLikelyHuman HTTPAseBotClassGetParamsBotClass = "LIKELY_HUMAN"
query HTTPAseBotClassGetParams
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.

BrowserFamily param.Field[[]HTTPAseBotClassGetParamsBrowserFamily]Optional

Filters results by browser family.

const HTTPAseBotClassGetParamsBrowserFamilyChrome HTTPAseBotClassGetParamsBrowserFamily = "CHROME"
const HTTPAseBotClassGetParamsBrowserFamilyEdge HTTPAseBotClassGetParamsBrowserFamily = "EDGE"
const HTTPAseBotClassGetParamsBrowserFamilyFirefox HTTPAseBotClassGetParamsBrowserFamily = "FIREFOX"
const HTTPAseBotClassGetParamsBrowserFamilySafari HTTPAseBotClassGetParamsBrowserFamily = "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[[]HTTPAseBotClassGetParamsDeviceType]Optional

Filters results by device type.

const HTTPAseBotClassGetParamsDeviceTypeDesktop HTTPAseBotClassGetParamsDeviceType = "DESKTOP"
const HTTPAseBotClassGetParamsDeviceTypeMobile HTTPAseBotClassGetParamsDeviceType = "MOBILE"
const HTTPAseBotClassGetParamsDeviceTypeOther HTTPAseBotClassGetParamsDeviceType = "OTHER"
Format param.Field[HTTPAseBotClassGetParamsFormat]Optional

Format in which results will be returned.

const HTTPAseBotClassGetParamsFormatJson HTTPAseBotClassGetParamsFormat = "JSON"
const HTTPAseBotClassGetParamsFormatCsv HTTPAseBotClassGetParamsFormat = "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[[]HTTPAseBotClassGetParamsHTTPProtocol]Optional

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

const HTTPAseBotClassGetParamsHTTPProtocolHTTP HTTPAseBotClassGetParamsHTTPProtocol = "HTTP"
const HTTPAseBotClassGetParamsHTTPProtocolHTTPS HTTPAseBotClassGetParamsHTTPProtocol = "HTTPS"
HTTPVersion param.Field[[]HTTPAseBotClassGetParamsHTTPVersion]Optional

Filters results by HTTP version.

const HTTPAseBotClassGetParamsHTTPVersionHttPv1 HTTPAseBotClassGetParamsHTTPVersion = "HTTPv1"
const HTTPAseBotClassGetParamsHTTPVersionHttPv2 HTTPAseBotClassGetParamsHTTPVersion = "HTTPv2"
const HTTPAseBotClassGetParamsHTTPVersionHttPv3 HTTPAseBotClassGetParamsHTTPVersion = "HTTPv3"
IPVersion param.Field[[]HTTPAseBotClassGetParamsIPVersion]Optional

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

const HTTPAseBotClassGetParamsIPVersionIPv4 HTTPAseBotClassGetParamsIPVersion = "IPv4"
const HTTPAseBotClassGetParamsIPVersionIPv6 HTTPAseBotClassGetParamsIPVersion = "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[[]HTTPAseBotClassGetParamsOS]Optional

Filters results by operating system.

const HTTPAseBotClassGetParamsOSWindows HTTPAseBotClassGetParamsOS = "WINDOWS"
const HTTPAseBotClassGetParamsOSMacosx HTTPAseBotClassGetParamsOS = "MACOSX"
const HTTPAseBotClassGetParamsOSIos HTTPAseBotClassGetParamsOS = "IOS"
const HTTPAseBotClassGetParamsOSAndroid HTTPAseBotClassGetParamsOS = "ANDROID"
const HTTPAseBotClassGetParamsOSChromeos HTTPAseBotClassGetParamsOS = "CHROMEOS"
const HTTPAseBotClassGetParamsOSLinux HTTPAseBotClassGetParamsOS = "LINUX"
const HTTPAseBotClassGetParamsOSSmartTv HTTPAseBotClassGetParamsOS = "SMART_TV"
TLSVersion param.Field[[]HTTPAseBotClassGetParamsTLSVersion]Optional

Filters results by TLS version.

const HTTPAseBotClassGetParamsTLSVersionTlSv1_0 HTTPAseBotClassGetParamsTLSVersion = "TLSv1_0"
const HTTPAseBotClassGetParamsTLSVersionTlSv1_1 HTTPAseBotClassGetParamsTLSVersion = "TLSv1_1"
const HTTPAseBotClassGetParamsTLSVersionTlSv1_2 HTTPAseBotClassGetParamsTLSVersion = "TLSv1_2"
const HTTPAseBotClassGetParamsTLSVersionTlSv1_3 HTTPAseBotClassGetParamsTLSVersion = "TLSv1_3"
const HTTPAseBotClassGetParamsTLSVersionTlSvQuic HTTPAseBotClassGetParamsTLSVersion = "TLSvQUIC"
ReturnsExpand Collapse
type HTTPAseBotClassGetResponse struct{…}
Meta HTTPAseBotClassGetResponseMeta

Metadata for the results.

ConfidenceInfo HTTPAseBotClassGetResponseMetaConfidenceInfo
Annotations []HTTPAseBotClassGetResponseMetaConfidenceInfoAnnotation
DataSource HTTPAseBotClassGetResponseMetaConfidenceInfoAnnotationsDataSource

Data source for annotations.

One of the following:
const HTTPAseBotClassGetResponseMetaConfidenceInfoAnnotationsDataSourceAll HTTPAseBotClassGetResponseMetaConfidenceInfoAnnotationsDataSource = "ALL"
const HTTPAseBotClassGetResponseMetaConfidenceInfoAnnotationsDataSourceAIBots HTTPAseBotClassGetResponseMetaConfidenceInfoAnnotationsDataSource = "AI_BOTS"
const HTTPAseBotClassGetResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway HTTPAseBotClassGetResponseMetaConfidenceInfoAnnotationsDataSource = "AI_GATEWAY"
const HTTPAseBotClassGetResponseMetaConfidenceInfoAnnotationsDataSourceBGP HTTPAseBotClassGetResponseMetaConfidenceInfoAnnotationsDataSource = "BGP"
const HTTPAseBotClassGetResponseMetaConfidenceInfoAnnotationsDataSourceBots HTTPAseBotClassGetResponseMetaConfidenceInfoAnnotationsDataSource = "BOTS"
const HTTPAseBotClassGetResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly HTTPAseBotClassGetResponseMetaConfidenceInfoAnnotationsDataSource = "CONNECTION_ANOMALY"
const HTTPAseBotClassGetResponseMetaConfidenceInfoAnnotationsDataSourceCT HTTPAseBotClassGetResponseMetaConfidenceInfoAnnotationsDataSource = "CT"
const HTTPAseBotClassGetResponseMetaConfidenceInfoAnnotationsDataSourceDNS HTTPAseBotClassGetResponseMetaConfidenceInfoAnnotationsDataSource = "DNS"
const HTTPAseBotClassGetResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude HTTPAseBotClassGetResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_MAGNITUDE"
const HTTPAseBotClassGetResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112 HTTPAseBotClassGetResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_AS112"
const HTTPAseBotClassGetResponseMetaConfidenceInfoAnnotationsDataSourceDos HTTPAseBotClassGetResponseMetaConfidenceInfoAnnotationsDataSource = "DOS"
const HTTPAseBotClassGetResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting HTTPAseBotClassGetResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_ROUTING"
const HTTPAseBotClassGetResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity HTTPAseBotClassGetResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_SECURITY"
const HTTPAseBotClassGetResponseMetaConfidenceInfoAnnotationsDataSourceFw HTTPAseBotClassGetResponseMetaConfidenceInfoAnnotationsDataSource = "FW"
const HTTPAseBotClassGetResponseMetaConfidenceInfoAnnotationsDataSourceFwPg HTTPAseBotClassGetResponseMetaConfidenceInfoAnnotationsDataSource = "FW_PG"
const HTTPAseBotClassGetResponseMetaConfidenceInfoAnnotationsDataSourceHTTP HTTPAseBotClassGetResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP"
const HTTPAseBotClassGetResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl HTTPAseBotClassGetResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CONTROL"
const HTTPAseBotClassGetResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer HTTPAseBotClassGetResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CRAWLER_REFERER"
const HTTPAseBotClassGetResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins HTTPAseBotClassGetResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_ORIGINS"
const HTTPAseBotClassGetResponseMetaConfidenceInfoAnnotationsDataSourceIQI HTTPAseBotClassGetResponseMetaConfidenceInfoAnnotationsDataSource = "IQI"
const HTTPAseBotClassGetResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials HTTPAseBotClassGetResponseMetaConfidenceInfoAnnotationsDataSource = "LEAKED_CREDENTIALS"
const HTTPAseBotClassGetResponseMetaConfidenceInfoAnnotationsDataSourceNet HTTPAseBotClassGetResponseMetaConfidenceInfoAnnotationsDataSource = "NET"
const HTTPAseBotClassGetResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT HTTPAseBotClassGetResponseMetaConfidenceInfoAnnotationsDataSource = "ROBOTS_TXT"
const HTTPAseBotClassGetResponseMetaConfidenceInfoAnnotationsDataSourceSpeed HTTPAseBotClassGetResponseMetaConfidenceInfoAnnotationsDataSource = "SPEED"
const HTTPAseBotClassGetResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI HTTPAseBotClassGetResponseMetaConfidenceInfoAnnotationsDataSource = "WORKERS_AI"
Description string
EndDate Time
formatdate-time
EventType HTTPAseBotClassGetResponseMetaConfidenceInfoAnnotationsEventType

Event type for annotations.

One of the following:
const HTTPAseBotClassGetResponseMetaConfidenceInfoAnnotationsEventTypeEvent HTTPAseBotClassGetResponseMetaConfidenceInfoAnnotationsEventType = "EVENT"
const HTTPAseBotClassGetResponseMetaConfidenceInfoAnnotationsEventTypeGeneral HTTPAseBotClassGetResponseMetaConfidenceInfoAnnotationsEventType = "GENERAL"
const HTTPAseBotClassGetResponseMetaConfidenceInfoAnnotationsEventTypeOutage HTTPAseBotClassGetResponseMetaConfidenceInfoAnnotationsEventType = "OUTAGE"
const HTTPAseBotClassGetResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection HTTPAseBotClassGetResponseMetaConfidenceInfoAnnotationsEventType = "PARTIAL_PROJECTION"
const HTTPAseBotClassGetResponseMetaConfidenceInfoAnnotationsEventTypePipeline HTTPAseBotClassGetResponseMetaConfidenceInfoAnnotationsEventType = "PIPELINE"
const HTTPAseBotClassGetResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly HTTPAseBotClassGetResponseMetaConfidenceInfoAnnotationsEventType = "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 []HTTPAseBotClassGetResponseMetaDateRange
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 HTTPAseBotClassGetResponseMetaNormalization

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

One of the following:
const HTTPAseBotClassGetResponseMetaNormalizationPercentage HTTPAseBotClassGetResponseMetaNormalization = "PERCENTAGE"
const HTTPAseBotClassGetResponseMetaNormalizationMin0Max HTTPAseBotClassGetResponseMetaNormalization = "MIN0_MAX"
const HTTPAseBotClassGetResponseMetaNormalizationMinMax HTTPAseBotClassGetResponseMetaNormalization = "MIN_MAX"
const HTTPAseBotClassGetResponseMetaNormalizationRawValues HTTPAseBotClassGetResponseMetaNormalization = "RAW_VALUES"
const HTTPAseBotClassGetResponseMetaNormalizationPercentageChange HTTPAseBotClassGetResponseMetaNormalization = "PERCENTAGE_CHANGE"
const HTTPAseBotClassGetResponseMetaNormalizationRollingAverage HTTPAseBotClassGetResponseMetaNormalization = "ROLLING_AVERAGE"
const HTTPAseBotClassGetResponseMetaNormalizationOverlappedPercentage HTTPAseBotClassGetResponseMetaNormalization = "OVERLAPPED_PERCENTAGE"
const HTTPAseBotClassGetResponseMetaNormalizationRatio HTTPAseBotClassGetResponseMetaNormalization = "RATIO"
Units []HTTPAseBotClassGetResponseMetaUnit

Measurement units for the results.

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

A numeric string.

Get top ASes by HTTP requests for a bot class

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

    },
  )
  if err != nil {
    panic(err.Error())
  }
  fmt.Printf("%+v\n", botClass.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
}