Skip to content
Start here

Get top locations by AS112 DNS queries

client.Radar.AS112.Top.Locations(ctx, query) (*AS112TopLocationsResponse, error)
GET/radar/as112/top/locations

Retrieves the top locations by AS112 DNS queries.

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 AS112TopLocationsParams
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[AS112TopLocationsParamsFormat]Optional

Format in which results will be returned.

const AS112TopLocationsParamsFormatJson AS112TopLocationsParamsFormat = "JSON"
const AS112TopLocationsParamsFormatCsv AS112TopLocationsParamsFormat = "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 AS112TopLocationsResponse struct{…}
Meta AS112TopLocationsResponseMeta

Metadata for the results.

ConfidenceInfo AS112TopLocationsResponseMetaConfidenceInfo
Annotations []AS112TopLocationsResponseMetaConfidenceInfoAnnotation
DataSource AS112TopLocationsResponseMetaConfidenceInfoAnnotationsDataSource

Data source for annotations.

One of the following:
const AS112TopLocationsResponseMetaConfidenceInfoAnnotationsDataSourceAll AS112TopLocationsResponseMetaConfidenceInfoAnnotationsDataSource = "ALL"
const AS112TopLocationsResponseMetaConfidenceInfoAnnotationsDataSourceAIBots AS112TopLocationsResponseMetaConfidenceInfoAnnotationsDataSource = "AI_BOTS"
const AS112TopLocationsResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway AS112TopLocationsResponseMetaConfidenceInfoAnnotationsDataSource = "AI_GATEWAY"
const AS112TopLocationsResponseMetaConfidenceInfoAnnotationsDataSourceBGP AS112TopLocationsResponseMetaConfidenceInfoAnnotationsDataSource = "BGP"
const AS112TopLocationsResponseMetaConfidenceInfoAnnotationsDataSourceBots AS112TopLocationsResponseMetaConfidenceInfoAnnotationsDataSource = "BOTS"
const AS112TopLocationsResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly AS112TopLocationsResponseMetaConfidenceInfoAnnotationsDataSource = "CONNECTION_ANOMALY"
const AS112TopLocationsResponseMetaConfidenceInfoAnnotationsDataSourceCT AS112TopLocationsResponseMetaConfidenceInfoAnnotationsDataSource = "CT"
const AS112TopLocationsResponseMetaConfidenceInfoAnnotationsDataSourceDNS AS112TopLocationsResponseMetaConfidenceInfoAnnotationsDataSource = "DNS"
const AS112TopLocationsResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude AS112TopLocationsResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_MAGNITUDE"
const AS112TopLocationsResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112 AS112TopLocationsResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_AS112"
const AS112TopLocationsResponseMetaConfidenceInfoAnnotationsDataSourceDos AS112TopLocationsResponseMetaConfidenceInfoAnnotationsDataSource = "DOS"
const AS112TopLocationsResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting AS112TopLocationsResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_ROUTING"
const AS112TopLocationsResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity AS112TopLocationsResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_SECURITY"
const AS112TopLocationsResponseMetaConfidenceInfoAnnotationsDataSourceFw AS112TopLocationsResponseMetaConfidenceInfoAnnotationsDataSource = "FW"
const AS112TopLocationsResponseMetaConfidenceInfoAnnotationsDataSourceFwPg AS112TopLocationsResponseMetaConfidenceInfoAnnotationsDataSource = "FW_PG"
const AS112TopLocationsResponseMetaConfidenceInfoAnnotationsDataSourceHTTP AS112TopLocationsResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP"
const AS112TopLocationsResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl AS112TopLocationsResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CONTROL"
const AS112TopLocationsResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer AS112TopLocationsResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CRAWLER_REFERER"
const AS112TopLocationsResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins AS112TopLocationsResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_ORIGINS"
const AS112TopLocationsResponseMetaConfidenceInfoAnnotationsDataSourceIQI AS112TopLocationsResponseMetaConfidenceInfoAnnotationsDataSource = "IQI"
const AS112TopLocationsResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials AS112TopLocationsResponseMetaConfidenceInfoAnnotationsDataSource = "LEAKED_CREDENTIALS"
const AS112TopLocationsResponseMetaConfidenceInfoAnnotationsDataSourceNet AS112TopLocationsResponseMetaConfidenceInfoAnnotationsDataSource = "NET"
const AS112TopLocationsResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT AS112TopLocationsResponseMetaConfidenceInfoAnnotationsDataSource = "ROBOTS_TXT"
const AS112TopLocationsResponseMetaConfidenceInfoAnnotationsDataSourceSpeed AS112TopLocationsResponseMetaConfidenceInfoAnnotationsDataSource = "SPEED"
const AS112TopLocationsResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI AS112TopLocationsResponseMetaConfidenceInfoAnnotationsDataSource = "WORKERS_AI"
Description string
EndDate Time
formatdate-time
EventType AS112TopLocationsResponseMetaConfidenceInfoAnnotationsEventType

Event type for annotations.

One of the following:
const AS112TopLocationsResponseMetaConfidenceInfoAnnotationsEventTypeEvent AS112TopLocationsResponseMetaConfidenceInfoAnnotationsEventType = "EVENT"
const AS112TopLocationsResponseMetaConfidenceInfoAnnotationsEventTypeGeneral AS112TopLocationsResponseMetaConfidenceInfoAnnotationsEventType = "GENERAL"
const AS112TopLocationsResponseMetaConfidenceInfoAnnotationsEventTypeOutage AS112TopLocationsResponseMetaConfidenceInfoAnnotationsEventType = "OUTAGE"
const AS112TopLocationsResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection AS112TopLocationsResponseMetaConfidenceInfoAnnotationsEventType = "PARTIAL_PROJECTION"
const AS112TopLocationsResponseMetaConfidenceInfoAnnotationsEventTypePipeline AS112TopLocationsResponseMetaConfidenceInfoAnnotationsEventType = "PIPELINE"
const AS112TopLocationsResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly AS112TopLocationsResponseMetaConfidenceInfoAnnotationsEventType = "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 []AS112TopLocationsResponseMetaDateRange
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 AS112TopLocationsResponseMetaNormalization

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

One of the following:
const AS112TopLocationsResponseMetaNormalizationPercentage AS112TopLocationsResponseMetaNormalization = "PERCENTAGE"
const AS112TopLocationsResponseMetaNormalizationMin0Max AS112TopLocationsResponseMetaNormalization = "MIN0_MAX"
const AS112TopLocationsResponseMetaNormalizationMinMax AS112TopLocationsResponseMetaNormalization = "MIN_MAX"
const AS112TopLocationsResponseMetaNormalizationRawValues AS112TopLocationsResponseMetaNormalization = "RAW_VALUES"
const AS112TopLocationsResponseMetaNormalizationPercentageChange AS112TopLocationsResponseMetaNormalization = "PERCENTAGE_CHANGE"
const AS112TopLocationsResponseMetaNormalizationRollingAverage AS112TopLocationsResponseMetaNormalization = "ROLLING_AVERAGE"
const AS112TopLocationsResponseMetaNormalizationOverlappedPercentage AS112TopLocationsResponseMetaNormalization = "OVERLAPPED_PERCENTAGE"
const AS112TopLocationsResponseMetaNormalizationRatio AS112TopLocationsResponseMetaNormalization = "RATIO"
Units []AS112TopLocationsResponseMetaUnit

Measurement units for the results.

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

A numeric string.

Get top locations by AS112 DNS queries

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.Locations(context.TODO(), radar.AS112TopLocationsParams{

  })
  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
}