Skip to content
Start here

Get top locations by AS112 DNS queries with EDNS support

client.Radar.AS112.Top.Edns(ctx, edns, query) (*AS112TopEdnsResponse, error)
GET/radar/as112/top/locations/edns/{edns}

Retrieves the top locations of DNS queries to AS112 with EDNS (Extension Mechanisms for DNS) support.

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

EDNS (Extension Mechanisms for DNS) status.

One of the following:
const AS112TopEdnsParamsEdnsSupported AS112TopEdnsParamsEdns = "SUPPORTED"
const AS112TopEdnsParamsEdnsNotSupported AS112TopEdnsParamsEdns = "NOT_SUPPORTED"
query AS112TopEdnsParams
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[AS112TopEdnsParamsFormat]Optional

Format in which results will be returned.

const AS112TopEdnsParamsFormatJson AS112TopEdnsParamsFormat = "JSON"
const AS112TopEdnsParamsFormatCsv AS112TopEdnsParamsFormat = "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 AS112TopEdnsResponse struct{…}
Meta AS112TopEdnsResponseMeta

Metadata for the results.

ConfidenceInfo AS112TopEdnsResponseMetaConfidenceInfo
Annotations []AS112TopEdnsResponseMetaConfidenceInfoAnnotation
DataSource AS112TopEdnsResponseMetaConfidenceInfoAnnotationsDataSource

Data source for annotations.

One of the following:
const AS112TopEdnsResponseMetaConfidenceInfoAnnotationsDataSourceAll AS112TopEdnsResponseMetaConfidenceInfoAnnotationsDataSource = "ALL"
const AS112TopEdnsResponseMetaConfidenceInfoAnnotationsDataSourceAIBots AS112TopEdnsResponseMetaConfidenceInfoAnnotationsDataSource = "AI_BOTS"
const AS112TopEdnsResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway AS112TopEdnsResponseMetaConfidenceInfoAnnotationsDataSource = "AI_GATEWAY"
const AS112TopEdnsResponseMetaConfidenceInfoAnnotationsDataSourceBGP AS112TopEdnsResponseMetaConfidenceInfoAnnotationsDataSource = "BGP"
const AS112TopEdnsResponseMetaConfidenceInfoAnnotationsDataSourceBots AS112TopEdnsResponseMetaConfidenceInfoAnnotationsDataSource = "BOTS"
const AS112TopEdnsResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly AS112TopEdnsResponseMetaConfidenceInfoAnnotationsDataSource = "CONNECTION_ANOMALY"
const AS112TopEdnsResponseMetaConfidenceInfoAnnotationsDataSourceCT AS112TopEdnsResponseMetaConfidenceInfoAnnotationsDataSource = "CT"
const AS112TopEdnsResponseMetaConfidenceInfoAnnotationsDataSourceDNS AS112TopEdnsResponseMetaConfidenceInfoAnnotationsDataSource = "DNS"
const AS112TopEdnsResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude AS112TopEdnsResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_MAGNITUDE"
const AS112TopEdnsResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112 AS112TopEdnsResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_AS112"
const AS112TopEdnsResponseMetaConfidenceInfoAnnotationsDataSourceDos AS112TopEdnsResponseMetaConfidenceInfoAnnotationsDataSource = "DOS"
const AS112TopEdnsResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting AS112TopEdnsResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_ROUTING"
const AS112TopEdnsResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity AS112TopEdnsResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_SECURITY"
const AS112TopEdnsResponseMetaConfidenceInfoAnnotationsDataSourceFw AS112TopEdnsResponseMetaConfidenceInfoAnnotationsDataSource = "FW"
const AS112TopEdnsResponseMetaConfidenceInfoAnnotationsDataSourceFwPg AS112TopEdnsResponseMetaConfidenceInfoAnnotationsDataSource = "FW_PG"
const AS112TopEdnsResponseMetaConfidenceInfoAnnotationsDataSourceHTTP AS112TopEdnsResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP"
const AS112TopEdnsResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl AS112TopEdnsResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CONTROL"
const AS112TopEdnsResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer AS112TopEdnsResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CRAWLER_REFERER"
const AS112TopEdnsResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins AS112TopEdnsResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_ORIGINS"
const AS112TopEdnsResponseMetaConfidenceInfoAnnotationsDataSourceIQI AS112TopEdnsResponseMetaConfidenceInfoAnnotationsDataSource = "IQI"
const AS112TopEdnsResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials AS112TopEdnsResponseMetaConfidenceInfoAnnotationsDataSource = "LEAKED_CREDENTIALS"
const AS112TopEdnsResponseMetaConfidenceInfoAnnotationsDataSourceNet AS112TopEdnsResponseMetaConfidenceInfoAnnotationsDataSource = "NET"
const AS112TopEdnsResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT AS112TopEdnsResponseMetaConfidenceInfoAnnotationsDataSource = "ROBOTS_TXT"
const AS112TopEdnsResponseMetaConfidenceInfoAnnotationsDataSourceSpeed AS112TopEdnsResponseMetaConfidenceInfoAnnotationsDataSource = "SPEED"
const AS112TopEdnsResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI AS112TopEdnsResponseMetaConfidenceInfoAnnotationsDataSource = "WORKERS_AI"
Description string
EndDate Time
formatdate-time
EventType AS112TopEdnsResponseMetaConfidenceInfoAnnotationsEventType

Event type for annotations.

One of the following:
const AS112TopEdnsResponseMetaConfidenceInfoAnnotationsEventTypeEvent AS112TopEdnsResponseMetaConfidenceInfoAnnotationsEventType = "EVENT"
const AS112TopEdnsResponseMetaConfidenceInfoAnnotationsEventTypeGeneral AS112TopEdnsResponseMetaConfidenceInfoAnnotationsEventType = "GENERAL"
const AS112TopEdnsResponseMetaConfidenceInfoAnnotationsEventTypeOutage AS112TopEdnsResponseMetaConfidenceInfoAnnotationsEventType = "OUTAGE"
const AS112TopEdnsResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection AS112TopEdnsResponseMetaConfidenceInfoAnnotationsEventType = "PARTIAL_PROJECTION"
const AS112TopEdnsResponseMetaConfidenceInfoAnnotationsEventTypePipeline AS112TopEdnsResponseMetaConfidenceInfoAnnotationsEventType = "PIPELINE"
const AS112TopEdnsResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly AS112TopEdnsResponseMetaConfidenceInfoAnnotationsEventType = "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 []AS112TopEdnsResponseMetaDateRange
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 AS112TopEdnsResponseMetaNormalization

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

One of the following:
const AS112TopEdnsResponseMetaNormalizationPercentage AS112TopEdnsResponseMetaNormalization = "PERCENTAGE"
const AS112TopEdnsResponseMetaNormalizationMin0Max AS112TopEdnsResponseMetaNormalization = "MIN0_MAX"
const AS112TopEdnsResponseMetaNormalizationMinMax AS112TopEdnsResponseMetaNormalization = "MIN_MAX"
const AS112TopEdnsResponseMetaNormalizationRawValues AS112TopEdnsResponseMetaNormalization = "RAW_VALUES"
const AS112TopEdnsResponseMetaNormalizationPercentageChange AS112TopEdnsResponseMetaNormalization = "PERCENTAGE_CHANGE"
const AS112TopEdnsResponseMetaNormalizationRollingAverage AS112TopEdnsResponseMetaNormalization = "ROLLING_AVERAGE"
const AS112TopEdnsResponseMetaNormalizationOverlappedPercentage AS112TopEdnsResponseMetaNormalization = "OVERLAPPED_PERCENTAGE"
const AS112TopEdnsResponseMetaNormalizationRatio AS112TopEdnsResponseMetaNormalization = "RATIO"
Units []AS112TopEdnsResponseMetaUnit

Measurement units for the results.

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

A numeric string.

Get top locations by AS112 DNS queries with EDNS support

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.Edns(
    context.TODO(),
    radar.AS112TopEdnsParamsEdnsSupported,
    radar.AS112TopEdnsParams{

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