Skip to content
Start here

Get announced IP address space time series

client.Radar.BGP.IPs.Timeseries(ctx, query) (*BgpipTimeseriesResponse, error)
GET/radar/bgp/ips/timeseries

Retrieves time series data for the announced IP space count, represented as the number of IPv4 /24s and IPv6 /48s, for a given ASN.

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 BGPIPTimeseriesParams
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.

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[BgpipTimeseriesParamsFormat]Optional

Format in which results will be returned.

const BgpipTimeseriesParamsFormatJson BgpipTimeseriesParamsFormat = "JSON"
const BgpipTimeseriesParamsFormatCsv BgpipTimeseriesParamsFormat = "CSV"
IncludeDelay param.Field[bool]Optional

Includes data delay meta information.

IPVersion param.Field[[]BgpipTimeseriesParamsIPVersion]Optional

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

const BgpipTimeseriesParamsIPVersionIPv4 BgpipTimeseriesParamsIPVersion = "IPv4"
const BgpipTimeseriesParamsIPVersionIPv6 BgpipTimeseriesParamsIPVersion = "IPv6"
Location param.Field[[]string]Optional

Filters results by location. Specify a comma-separated list of alpha-2 location codes.

Name param.Field[[]string]Optional

Array of names used to label the series in the response.

ReturnsExpand Collapse
type BgpipTimeseriesResponse struct{…}
Meta BgpipTimeseriesResponseMeta

Metadata for the results.

AggInterval BgpipTimeseriesResponseMetaAggInterval

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

One of the following:
const BgpipTimeseriesResponseMetaAggIntervalFifteenMinutes BgpipTimeseriesResponseMetaAggInterval = "FIFTEEN_MINUTES"
const BgpipTimeseriesResponseMetaAggIntervalOneHour BgpipTimeseriesResponseMetaAggInterval = "ONE_HOUR"
const BgpipTimeseriesResponseMetaAggIntervalOneDay BgpipTimeseriesResponseMetaAggInterval = "ONE_DAY"
const BgpipTimeseriesResponseMetaAggIntervalOneWeek BgpipTimeseriesResponseMetaAggInterval = "ONE_WEEK"
const BgpipTimeseriesResponseMetaAggIntervalOneMonth BgpipTimeseriesResponseMetaAggInterval = "ONE_MONTH"
ConfidenceInfo BgpipTimeseriesResponseMetaConfidenceInfo
Annotations []BgpipTimeseriesResponseMetaConfidenceInfoAnnotation
DataSource BgpipTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource

Data source for annotations.

One of the following:
const BgpipTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceAll BgpipTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "ALL"
const BgpipTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceAIBots BgpipTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "AI_BOTS"
const BgpipTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway BgpipTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "AI_GATEWAY"
const BgpipTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceBGP BgpipTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "BGP"
const BgpipTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceBots BgpipTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "BOTS"
const BgpipTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly BgpipTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "CONNECTION_ANOMALY"
const BgpipTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceCT BgpipTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "CT"
const BgpipTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceDNS BgpipTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "DNS"
const BgpipTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude BgpipTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_MAGNITUDE"
const BgpipTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112 BgpipTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_AS112"
const BgpipTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceDos BgpipTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "DOS"
const BgpipTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting BgpipTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_ROUTING"
const BgpipTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity BgpipTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_SECURITY"
const BgpipTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceFw BgpipTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "FW"
const BgpipTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceFwPg BgpipTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "FW_PG"
const BgpipTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceHTTP BgpipTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP"
const BgpipTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl BgpipTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CONTROL"
const BgpipTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer BgpipTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CRAWLER_REFERER"
const BgpipTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins BgpipTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_ORIGINS"
const BgpipTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceIQI BgpipTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "IQI"
const BgpipTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials BgpipTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "LEAKED_CREDENTIALS"
const BgpipTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceNet BgpipTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "NET"
const BgpipTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT BgpipTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "ROBOTS_TXT"
const BgpipTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceSpeed BgpipTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "SPEED"
const BgpipTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI BgpipTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "WORKERS_AI"
Description string
EndDate Time
formatdate-time
EventType BgpipTimeseriesResponseMetaConfidenceInfoAnnotationsEventType

Event type for annotations.

One of the following:
const BgpipTimeseriesResponseMetaConfidenceInfoAnnotationsEventTypeEvent BgpipTimeseriesResponseMetaConfidenceInfoAnnotationsEventType = "EVENT"
const BgpipTimeseriesResponseMetaConfidenceInfoAnnotationsEventTypeGeneral BgpipTimeseriesResponseMetaConfidenceInfoAnnotationsEventType = "GENERAL"
const BgpipTimeseriesResponseMetaConfidenceInfoAnnotationsEventTypeOutage BgpipTimeseriesResponseMetaConfidenceInfoAnnotationsEventType = "OUTAGE"
const BgpipTimeseriesResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection BgpipTimeseriesResponseMetaConfidenceInfoAnnotationsEventType = "PARTIAL_PROJECTION"
const BgpipTimeseriesResponseMetaConfidenceInfoAnnotationsEventTypePipeline BgpipTimeseriesResponseMetaConfidenceInfoAnnotationsEventType = "PIPELINE"
const BgpipTimeseriesResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly BgpipTimeseriesResponseMetaConfidenceInfoAnnotationsEventType = "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 []BgpipTimeseriesResponseMetaDateRange
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 BgpipTimeseriesResponseMetaNormalization

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

One of the following:
const BgpipTimeseriesResponseMetaNormalizationPercentage BgpipTimeseriesResponseMetaNormalization = "PERCENTAGE"
const BgpipTimeseriesResponseMetaNormalizationMin0Max BgpipTimeseriesResponseMetaNormalization = "MIN0_MAX"
const BgpipTimeseriesResponseMetaNormalizationMinMax BgpipTimeseriesResponseMetaNormalization = "MIN_MAX"
const BgpipTimeseriesResponseMetaNormalizationRawValues BgpipTimeseriesResponseMetaNormalization = "RAW_VALUES"
const BgpipTimeseriesResponseMetaNormalizationPercentageChange BgpipTimeseriesResponseMetaNormalization = "PERCENTAGE_CHANGE"
const BgpipTimeseriesResponseMetaNormalizationRollingAverage BgpipTimeseriesResponseMetaNormalization = "ROLLING_AVERAGE"
const BgpipTimeseriesResponseMetaNormalizationOverlappedPercentage BgpipTimeseriesResponseMetaNormalization = "OVERLAPPED_PERCENTAGE"
const BgpipTimeseriesResponseMetaNormalizationRatio BgpipTimeseriesResponseMetaNormalization = "RATIO"
Units []BgpipTimeseriesResponseMetaUnit

Measurement units for the results.

Name string
Value string
Delay BgpipTimeseriesResponseMetaDelayOptional
ASNData BgpipTimeseriesResponseMetaDelayASNData
DelaySecs float64
DelayStr string
Healthy bool
Latest BgpipTimeseriesResponseMetaDelayASNDataLatest
EntriesCount float64
Path string
Timestamp float64
CountryData BgpipTimeseriesResponseMetaDelayCountryData
DelaySecs float64
DelayStr string
Healthy bool
Latest BgpipTimeseriesResponseMetaDelayCountryDataLatest
Count float64
Timestamp float64
Healthy bool
NowTs float64
Serie0 BgpipTimeseriesResponseSerie0
IPV4 []string
IPV6 []string
Timestamps []Time

Get announced IP address space 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.BGP.IPs.Timeseries(context.TODO(), radar.BGPIPTimeseriesParams{

  })
  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"
        }
      ],
      "delay": {
        "asn_data": {
          "delaySecs": 0,
          "delayStr": "delayStr",
          "healthy": true,
          "latest": {
            "entries_count": 0,
            "path": "path",
            "timestamp": 0
          }
        },
        "country_data": {
          "delaySecs": 0,
          "delayStr": "delayStr",
          "healthy": true,
          "latest": {
            "count": 0,
            "timestamp": 0
          }
        },
        "healthy": true,
        "nowTs": 0
      }
    },
    "serie_0": {
      "ipv4": [
        "10"
      ],
      "ipv6": [
        "10"
      ],
      "timestamps": [
        "2019-12-27T18:11:19.117Z"
      ]
    }
  },
  "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"
        }
      ],
      "delay": {
        "asn_data": {
          "delaySecs": 0,
          "delayStr": "delayStr",
          "healthy": true,
          "latest": {
            "entries_count": 0,
            "path": "path",
            "timestamp": 0
          }
        },
        "country_data": {
          "delaySecs": 0,
          "delayStr": "delayStr",
          "healthy": true,
          "latest": {
            "count": 0,
            "timestamp": 0
          }
        },
        "healthy": true,
        "nowTs": 0
      }
    },
    "serie_0": {
      "ipv4": [
        "10"
      ],
      "ipv6": [
        "10"
      ],
      "timestamps": [
        "2019-12-27T18:11:19.117Z"
      ]
    }
  },
  "success": true
}