Skip to content
Start here

Get AS112 DNS queries by type time series

client.Radar.AS112.TimeseriesGroups.QueryType(ctx, query) (*AS112TimeseriesGroupQueryTypeResponse, error)
GET/radar/as112/timeseries_groups/query_type

Retrieves the distribution of AS112 DNS queries by type over time.

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 AS112TimeseriesGroupQueryTypeParams
AggInterval param.Field[AS112TimeseriesGroupQueryTypeParamsAggInterval]Optional

Aggregation interval of the results (e.g., in 15 minutes or 1 hour intervals). Refer to Aggregation intervals.

const AS112TimeseriesGroupQueryTypeParamsAggInterval15m AS112TimeseriesGroupQueryTypeParamsAggInterval = "15m"
const AS112TimeseriesGroupQueryTypeParamsAggInterval1h AS112TimeseriesGroupQueryTypeParamsAggInterval = "1h"
const AS112TimeseriesGroupQueryTypeParamsAggInterval1d AS112TimeseriesGroupQueryTypeParamsAggInterval = "1d"
const AS112TimeseriesGroupQueryTypeParamsAggInterval1w AS112TimeseriesGroupQueryTypeParamsAggInterval = "1w"
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[AS112TimeseriesGroupQueryTypeParamsFormat]Optional

Format in which results will be returned.

const AS112TimeseriesGroupQueryTypeParamsFormatJson AS112TimeseriesGroupQueryTypeParamsFormat = "JSON"
const AS112TimeseriesGroupQueryTypeParamsFormatCsv AS112TimeseriesGroupQueryTypeParamsFormat = "CSV"
LimitPerGroup param.Field[int64]Optional

Limits the number of objects per group to the top items within the specified time range. When item count exceeds the limit, extra items appear grouped under an “other” category.

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.

Protocol param.Field[[]AS112TimeseriesGroupQueryTypeParamsProtocol]Optional

Filters results by DNS transport protocol.

const AS112TimeseriesGroupQueryTypeParamsProtocolUdp AS112TimeseriesGroupQueryTypeParamsProtocol = "UDP"
const AS112TimeseriesGroupQueryTypeParamsProtocolTCP AS112TimeseriesGroupQueryTypeParamsProtocol = "TCP"
const AS112TimeseriesGroupQueryTypeParamsProtocolHTTPS AS112TimeseriesGroupQueryTypeParamsProtocol = "HTTPS"
const AS112TimeseriesGroupQueryTypeParamsProtocolTLS AS112TimeseriesGroupQueryTypeParamsProtocol = "TLS"
ResponseCode param.Field[[]AS112TimeseriesGroupQueryTypeParamsResponseCode]Optional

Filters results by DNS response code.

const AS112TimeseriesGroupQueryTypeParamsResponseCodeNoerror AS112TimeseriesGroupQueryTypeParamsResponseCode = "NOERROR"
const AS112TimeseriesGroupQueryTypeParamsResponseCodeFormerr AS112TimeseriesGroupQueryTypeParamsResponseCode = "FORMERR"
const AS112TimeseriesGroupQueryTypeParamsResponseCodeServfail AS112TimeseriesGroupQueryTypeParamsResponseCode = "SERVFAIL"
const AS112TimeseriesGroupQueryTypeParamsResponseCodeNxdomain AS112TimeseriesGroupQueryTypeParamsResponseCode = "NXDOMAIN"
const AS112TimeseriesGroupQueryTypeParamsResponseCodeNotimp AS112TimeseriesGroupQueryTypeParamsResponseCode = "NOTIMP"
const AS112TimeseriesGroupQueryTypeParamsResponseCodeRefused AS112TimeseriesGroupQueryTypeParamsResponseCode = "REFUSED"
const AS112TimeseriesGroupQueryTypeParamsResponseCodeYxdomain AS112TimeseriesGroupQueryTypeParamsResponseCode = "YXDOMAIN"
const AS112TimeseriesGroupQueryTypeParamsResponseCodeYxrrset AS112TimeseriesGroupQueryTypeParamsResponseCode = "YXRRSET"
const AS112TimeseriesGroupQueryTypeParamsResponseCodeNxrrset AS112TimeseriesGroupQueryTypeParamsResponseCode = "NXRRSET"
const AS112TimeseriesGroupQueryTypeParamsResponseCodeNotauth AS112TimeseriesGroupQueryTypeParamsResponseCode = "NOTAUTH"
const AS112TimeseriesGroupQueryTypeParamsResponseCodeNotzone AS112TimeseriesGroupQueryTypeParamsResponseCode = "NOTZONE"
const AS112TimeseriesGroupQueryTypeParamsResponseCodeBadsig AS112TimeseriesGroupQueryTypeParamsResponseCode = "BADSIG"
const AS112TimeseriesGroupQueryTypeParamsResponseCodeBadkey AS112TimeseriesGroupQueryTypeParamsResponseCode = "BADKEY"
const AS112TimeseriesGroupQueryTypeParamsResponseCodeBadtime AS112TimeseriesGroupQueryTypeParamsResponseCode = "BADTIME"
const AS112TimeseriesGroupQueryTypeParamsResponseCodeBadmode AS112TimeseriesGroupQueryTypeParamsResponseCode = "BADMODE"
const AS112TimeseriesGroupQueryTypeParamsResponseCodeBadname AS112TimeseriesGroupQueryTypeParamsResponseCode = "BADNAME"
const AS112TimeseriesGroupQueryTypeParamsResponseCodeBadalg AS112TimeseriesGroupQueryTypeParamsResponseCode = "BADALG"
const AS112TimeseriesGroupQueryTypeParamsResponseCodeBadtrunc AS112TimeseriesGroupQueryTypeParamsResponseCode = "BADTRUNC"
const AS112TimeseriesGroupQueryTypeParamsResponseCodeBadcookie AS112TimeseriesGroupQueryTypeParamsResponseCode = "BADCOOKIE"
ReturnsExpand Collapse
type AS112TimeseriesGroupQueryTypeResponse struct{…}
Meta AS112TimeseriesGroupQueryTypeResponseMeta

Metadata for the results.

AggInterval AS112TimeseriesGroupQueryTypeResponseMetaAggInterval

Aggregation interval of the results (e.g., in 15 minutes or 1 hour intervals). Refer to Aggregation intervals.

One of the following:
const AS112TimeseriesGroupQueryTypeResponseMetaAggIntervalFifteenMinutes AS112TimeseriesGroupQueryTypeResponseMetaAggInterval = "FIFTEEN_MINUTES"
const AS112TimeseriesGroupQueryTypeResponseMetaAggIntervalOneHour AS112TimeseriesGroupQueryTypeResponseMetaAggInterval = "ONE_HOUR"
const AS112TimeseriesGroupQueryTypeResponseMetaAggIntervalOneDay AS112TimeseriesGroupQueryTypeResponseMetaAggInterval = "ONE_DAY"
const AS112TimeseriesGroupQueryTypeResponseMetaAggIntervalOneWeek AS112TimeseriesGroupQueryTypeResponseMetaAggInterval = "ONE_WEEK"
const AS112TimeseriesGroupQueryTypeResponseMetaAggIntervalOneMonth AS112TimeseriesGroupQueryTypeResponseMetaAggInterval = "ONE_MONTH"
ConfidenceInfo AS112TimeseriesGroupQueryTypeResponseMetaConfidenceInfo
Annotations []AS112TimeseriesGroupQueryTypeResponseMetaConfidenceInfoAnnotation
DataSource AS112TimeseriesGroupQueryTypeResponseMetaConfidenceInfoAnnotationsDataSource

Data source for annotations.

One of the following:
const AS112TimeseriesGroupQueryTypeResponseMetaConfidenceInfoAnnotationsDataSourceAll AS112TimeseriesGroupQueryTypeResponseMetaConfidenceInfoAnnotationsDataSource = "ALL"
const AS112TimeseriesGroupQueryTypeResponseMetaConfidenceInfoAnnotationsDataSourceAIBots AS112TimeseriesGroupQueryTypeResponseMetaConfidenceInfoAnnotationsDataSource = "AI_BOTS"
const AS112TimeseriesGroupQueryTypeResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway AS112TimeseriesGroupQueryTypeResponseMetaConfidenceInfoAnnotationsDataSource = "AI_GATEWAY"
const AS112TimeseriesGroupQueryTypeResponseMetaConfidenceInfoAnnotationsDataSourceBGP AS112TimeseriesGroupQueryTypeResponseMetaConfidenceInfoAnnotationsDataSource = "BGP"
const AS112TimeseriesGroupQueryTypeResponseMetaConfidenceInfoAnnotationsDataSourceBots AS112TimeseriesGroupQueryTypeResponseMetaConfidenceInfoAnnotationsDataSource = "BOTS"
const AS112TimeseriesGroupQueryTypeResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly AS112TimeseriesGroupQueryTypeResponseMetaConfidenceInfoAnnotationsDataSource = "CONNECTION_ANOMALY"
const AS112TimeseriesGroupQueryTypeResponseMetaConfidenceInfoAnnotationsDataSourceCT AS112TimeseriesGroupQueryTypeResponseMetaConfidenceInfoAnnotationsDataSource = "CT"
const AS112TimeseriesGroupQueryTypeResponseMetaConfidenceInfoAnnotationsDataSourceDNS AS112TimeseriesGroupQueryTypeResponseMetaConfidenceInfoAnnotationsDataSource = "DNS"
const AS112TimeseriesGroupQueryTypeResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude AS112TimeseriesGroupQueryTypeResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_MAGNITUDE"
const AS112TimeseriesGroupQueryTypeResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112 AS112TimeseriesGroupQueryTypeResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_AS112"
const AS112TimeseriesGroupQueryTypeResponseMetaConfidenceInfoAnnotationsDataSourceDos AS112TimeseriesGroupQueryTypeResponseMetaConfidenceInfoAnnotationsDataSource = "DOS"
const AS112TimeseriesGroupQueryTypeResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting AS112TimeseriesGroupQueryTypeResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_ROUTING"
const AS112TimeseriesGroupQueryTypeResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity AS112TimeseriesGroupQueryTypeResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_SECURITY"
const AS112TimeseriesGroupQueryTypeResponseMetaConfidenceInfoAnnotationsDataSourceFw AS112TimeseriesGroupQueryTypeResponseMetaConfidenceInfoAnnotationsDataSource = "FW"
const AS112TimeseriesGroupQueryTypeResponseMetaConfidenceInfoAnnotationsDataSourceFwPg AS112TimeseriesGroupQueryTypeResponseMetaConfidenceInfoAnnotationsDataSource = "FW_PG"
const AS112TimeseriesGroupQueryTypeResponseMetaConfidenceInfoAnnotationsDataSourceHTTP AS112TimeseriesGroupQueryTypeResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP"
const AS112TimeseriesGroupQueryTypeResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl AS112TimeseriesGroupQueryTypeResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CONTROL"
const AS112TimeseriesGroupQueryTypeResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer AS112TimeseriesGroupQueryTypeResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CRAWLER_REFERER"
const AS112TimeseriesGroupQueryTypeResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins AS112TimeseriesGroupQueryTypeResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_ORIGINS"
const AS112TimeseriesGroupQueryTypeResponseMetaConfidenceInfoAnnotationsDataSourceIQI AS112TimeseriesGroupQueryTypeResponseMetaConfidenceInfoAnnotationsDataSource = "IQI"
const AS112TimeseriesGroupQueryTypeResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials AS112TimeseriesGroupQueryTypeResponseMetaConfidenceInfoAnnotationsDataSource = "LEAKED_CREDENTIALS"
const AS112TimeseriesGroupQueryTypeResponseMetaConfidenceInfoAnnotationsDataSourceNet AS112TimeseriesGroupQueryTypeResponseMetaConfidenceInfoAnnotationsDataSource = "NET"
const AS112TimeseriesGroupQueryTypeResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT AS112TimeseriesGroupQueryTypeResponseMetaConfidenceInfoAnnotationsDataSource = "ROBOTS_TXT"
const AS112TimeseriesGroupQueryTypeResponseMetaConfidenceInfoAnnotationsDataSourceSpeed AS112TimeseriesGroupQueryTypeResponseMetaConfidenceInfoAnnotationsDataSource = "SPEED"
const AS112TimeseriesGroupQueryTypeResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI AS112TimeseriesGroupQueryTypeResponseMetaConfidenceInfoAnnotationsDataSource = "WORKERS_AI"
Description string
EndDate Time
formatdate-time
EventType AS112TimeseriesGroupQueryTypeResponseMetaConfidenceInfoAnnotationsEventType

Event type for annotations.

One of the following:
const AS112TimeseriesGroupQueryTypeResponseMetaConfidenceInfoAnnotationsEventTypeEvent AS112TimeseriesGroupQueryTypeResponseMetaConfidenceInfoAnnotationsEventType = "EVENT"
const AS112TimeseriesGroupQueryTypeResponseMetaConfidenceInfoAnnotationsEventTypeGeneral AS112TimeseriesGroupQueryTypeResponseMetaConfidenceInfoAnnotationsEventType = "GENERAL"
const AS112TimeseriesGroupQueryTypeResponseMetaConfidenceInfoAnnotationsEventTypeOutage AS112TimeseriesGroupQueryTypeResponseMetaConfidenceInfoAnnotationsEventType = "OUTAGE"
const AS112TimeseriesGroupQueryTypeResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection AS112TimeseriesGroupQueryTypeResponseMetaConfidenceInfoAnnotationsEventType = "PARTIAL_PROJECTION"
const AS112TimeseriesGroupQueryTypeResponseMetaConfidenceInfoAnnotationsEventTypePipeline AS112TimeseriesGroupQueryTypeResponseMetaConfidenceInfoAnnotationsEventType = "PIPELINE"
const AS112TimeseriesGroupQueryTypeResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly AS112TimeseriesGroupQueryTypeResponseMetaConfidenceInfoAnnotationsEventType = "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 []AS112TimeseriesGroupQueryTypeResponseMetaDateRange
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 AS112TimeseriesGroupQueryTypeResponseMetaNormalization

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

One of the following:
const AS112TimeseriesGroupQueryTypeResponseMetaNormalizationPercentage AS112TimeseriesGroupQueryTypeResponseMetaNormalization = "PERCENTAGE"
const AS112TimeseriesGroupQueryTypeResponseMetaNormalizationMin0Max AS112TimeseriesGroupQueryTypeResponseMetaNormalization = "MIN0_MAX"
const AS112TimeseriesGroupQueryTypeResponseMetaNormalizationMinMax AS112TimeseriesGroupQueryTypeResponseMetaNormalization = "MIN_MAX"
const AS112TimeseriesGroupQueryTypeResponseMetaNormalizationRawValues AS112TimeseriesGroupQueryTypeResponseMetaNormalization = "RAW_VALUES"
const AS112TimeseriesGroupQueryTypeResponseMetaNormalizationPercentageChange AS112TimeseriesGroupQueryTypeResponseMetaNormalization = "PERCENTAGE_CHANGE"
const AS112TimeseriesGroupQueryTypeResponseMetaNormalizationRollingAverage AS112TimeseriesGroupQueryTypeResponseMetaNormalization = "ROLLING_AVERAGE"
const AS112TimeseriesGroupQueryTypeResponseMetaNormalizationOverlappedPercentage AS112TimeseriesGroupQueryTypeResponseMetaNormalization = "OVERLAPPED_PERCENTAGE"
const AS112TimeseriesGroupQueryTypeResponseMetaNormalizationRatio AS112TimeseriesGroupQueryTypeResponseMetaNormalization = "RATIO"
Units []AS112TimeseriesGroupQueryTypeResponseMetaUnit

Measurement units for the results.

Name string
Value string
Serie0 AS112TimeseriesGroupQueryTypeResponseSerie0
Timestamps []Time

Get AS112 DNS queries by type time series

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.TimeseriesGroups.QueryType(context.TODO(), radar.AS112TimeseriesGroupQueryTypeParams{

  })
  if err != nil {
    panic(err.Error())
  }
  fmt.Printf("%+v\n", response.Meta)
}
{
  "result": {
    "meta": {
      "aggInterval": "FIFTEEN_MINUTES",
      "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"
        }
      ]
    },
    "serie_0": {
      "timestamps": [
        "2023-08-08T10:15:00Z"
      ]
    }
  },
  "success": true
}
Returns Examples
{
  "result": {
    "meta": {
      "aggInterval": "FIFTEEN_MINUTES",
      "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"
        }
      ]
    },
    "serie_0": {
      "timestamps": [
        "2023-08-08T10:15:00Z"
      ]
    }
  },
  "success": true
}