Skip to content
Start here

Get top locations by AS112 DNS queries for an IP version

client.Radar.AS112.Top.IPVersion(ctx, ipVersion, query) (*AS112TopIPVersionResponse, error)
GET/radar/as112/top/locations/ip_version/{ip_version}

Retrieves the top locations of DNS queries to AS112 for an 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
One of the following:
const AS112TopIPVersionParamsIPVersionIPv4 AS112TopIPVersionParamsIPVersion = "IPv4"
const AS112TopIPVersionParamsIPVersionIPv6 AS112TopIPVersionParamsIPVersion = "IPv6"
query AS112TopIPVersionParams
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.

Format param.Field[AS112TopIPVersionParamsFormat]Optional

Format in which results will be returned.

const AS112TopIPVersionParamsFormatJson AS112TopIPVersionParamsFormat = "JSON"
const AS112TopIPVersionParamsFormatCsv AS112TopIPVersionParamsFormat = "CSV"
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.

ReturnsExpand Collapse
type AS112TopIPVersionResponse struct{…}
Meta AS112TopIPVersionResponseMeta

Metadata for the results.

ConfidenceInfo AS112TopIPVersionResponseMetaConfidenceInfo
Annotations []AS112TopIPVersionResponseMetaConfidenceInfoAnnotation
DataSource AS112TopIPVersionResponseMetaConfidenceInfoAnnotationsDataSource

Data source for annotations.

One of the following:
const AS112TopIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceAll AS112TopIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "ALL"
const AS112TopIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceAIBots AS112TopIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "AI_BOTS"
const AS112TopIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway AS112TopIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "AI_GATEWAY"
const AS112TopIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceBGP AS112TopIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "BGP"
const AS112TopIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceBots AS112TopIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "BOTS"
const AS112TopIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly AS112TopIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "CONNECTION_ANOMALY"
const AS112TopIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceCT AS112TopIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "CT"
const AS112TopIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceDNS AS112TopIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "DNS"
const AS112TopIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude AS112TopIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_MAGNITUDE"
const AS112TopIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112 AS112TopIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_AS112"
const AS112TopIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceDos AS112TopIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "DOS"
const AS112TopIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting AS112TopIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_ROUTING"
const AS112TopIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity AS112TopIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_SECURITY"
const AS112TopIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceFw AS112TopIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "FW"
const AS112TopIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceFwPg AS112TopIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "FW_PG"
const AS112TopIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceHTTP AS112TopIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP"
const AS112TopIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl AS112TopIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CONTROL"
const AS112TopIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer AS112TopIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CRAWLER_REFERER"
const AS112TopIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins AS112TopIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_ORIGINS"
const AS112TopIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceIQI AS112TopIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "IQI"
const AS112TopIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials AS112TopIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "LEAKED_CREDENTIALS"
const AS112TopIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceNet AS112TopIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "NET"
const AS112TopIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT AS112TopIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "ROBOTS_TXT"
const AS112TopIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceSpeed AS112TopIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "SPEED"
const AS112TopIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI AS112TopIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "WORKERS_AI"
Description string
EndDate Time
formatdate-time
EventType AS112TopIPVersionResponseMetaConfidenceInfoAnnotationsEventType

Event type for annotations.

One of the following:
const AS112TopIPVersionResponseMetaConfidenceInfoAnnotationsEventTypeEvent AS112TopIPVersionResponseMetaConfidenceInfoAnnotationsEventType = "EVENT"
const AS112TopIPVersionResponseMetaConfidenceInfoAnnotationsEventTypeGeneral AS112TopIPVersionResponseMetaConfidenceInfoAnnotationsEventType = "GENERAL"
const AS112TopIPVersionResponseMetaConfidenceInfoAnnotationsEventTypeOutage AS112TopIPVersionResponseMetaConfidenceInfoAnnotationsEventType = "OUTAGE"
const AS112TopIPVersionResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection AS112TopIPVersionResponseMetaConfidenceInfoAnnotationsEventType = "PARTIAL_PROJECTION"
const AS112TopIPVersionResponseMetaConfidenceInfoAnnotationsEventTypePipeline AS112TopIPVersionResponseMetaConfidenceInfoAnnotationsEventType = "PIPELINE"
const AS112TopIPVersionResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly AS112TopIPVersionResponseMetaConfidenceInfoAnnotationsEventType = "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 []AS112TopIPVersionResponseMetaDateRange
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 AS112TopIPVersionResponseMetaNormalization

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

One of the following:
const AS112TopIPVersionResponseMetaNormalizationPercentage AS112TopIPVersionResponseMetaNormalization = "PERCENTAGE"
const AS112TopIPVersionResponseMetaNormalizationMin0Max AS112TopIPVersionResponseMetaNormalization = "MIN0_MAX"
const AS112TopIPVersionResponseMetaNormalizationMinMax AS112TopIPVersionResponseMetaNormalization = "MIN_MAX"
const AS112TopIPVersionResponseMetaNormalizationRawValues AS112TopIPVersionResponseMetaNormalization = "RAW_VALUES"
const AS112TopIPVersionResponseMetaNormalizationPercentageChange AS112TopIPVersionResponseMetaNormalization = "PERCENTAGE_CHANGE"
const AS112TopIPVersionResponseMetaNormalizationRollingAverage AS112TopIPVersionResponseMetaNormalization = "ROLLING_AVERAGE"
const AS112TopIPVersionResponseMetaNormalizationOverlappedPercentage AS112TopIPVersionResponseMetaNormalization = "OVERLAPPED_PERCENTAGE"
const AS112TopIPVersionResponseMetaNormalizationRatio AS112TopIPVersionResponseMetaNormalization = "RATIO"
Units []AS112TopIPVersionResponseMetaUnit

Measurement units for the results.

Name string
Value string
Top0 []AS112TopIPVersionResponseTop0
ClientCountryAlpha2 string
ClientCountryName string
Value string

A numeric string.

Get top locations by AS112 DNS queries for an IP version

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.AS112.Top.IPVersion(
    context.TODO(),
    radar.AS112TopIPVersionParamsIPVersionIPv4,
    radar.AS112TopIPVersionParams{

    },
  )
  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"
        }
      ]
    },
    "top_0": [
      {
        "clientCountryAlpha2": "PT",
        "clientCountryName": "Portugal",
        "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": [
      {
        "clientCountryAlpha2": "PT",
        "clientCountryName": "Portugal",
        "value": "10"
      }
    ]
  },
  "success": true
}