Skip to content
Start here

Get RPKI ROA deployment time series

client.Radar.BGP.RPKI.Roas.Timeseries(ctx, query) (*BgprpkiRoaTimeseriesResponse, error)
GET/radar/bgp/rpki/roas/timeseries

Retrieves RPKI ROA (Route Origin Authorization) validation ratios over time. Returns the selected metric as a time series. Supports filtering by ASN or location (country code) — multiple values of the same filter type produce one series per value. If no ASN or location is specified, returns the global aggregate.

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 BGPRPKIRoaTimeseriesParams
ASN param.Field[[]string]Optional

Filters results by Autonomous System Number. Specify one or more ASNs. Multiple values generate one series per ASN.

DateEnd param.Field[Time]Optional

End of the date range (inclusive).

formatdate-time
DateStart param.Field[Time]Optional

Start of the date range (inclusive).

formatdate-time
Format param.Field[BgprpkiRoaTimeseriesParamsFormat]Optional

Format in which results will be returned.

const BgprpkiRoaTimeseriesParamsFormatJson BgprpkiRoaTimeseriesParamsFormat = "JSON"
const BgprpkiRoaTimeseriesParamsFormatCsv BgprpkiRoaTimeseriesParamsFormat = "CSV"
Location param.Field[[]string]Optional

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

Metric param.Field[BgprpkiRoaTimeseriesParamsMetric]Optional

Which RPKI ROA validation metric to return. validPfxsRatio = ratio of RPKI-valid prefixes (IPv4+IPv6 combined). validPfxsV4Ratio / validPfxsV6Ratio = same, split by IP version. validIpsRatio = ratio of RPKI-valid address space (IPv4 /24s + IPv6 /48s). validIpsV4Ratio / validIpsV6Ratio = same, split by IP version.

const BgprpkiRoaTimeseriesParamsMetricValidPfxsRatio BgprpkiRoaTimeseriesParamsMetric = "validPfxsRatio"
const BgprpkiRoaTimeseriesParamsMetricValidPfxsV4Ratio BgprpkiRoaTimeseriesParamsMetric = "validPfxsV4Ratio"
const BgprpkiRoaTimeseriesParamsMetricValidPfxsV6Ratio BgprpkiRoaTimeseriesParamsMetric = "validPfxsV6Ratio"
const BgprpkiRoaTimeseriesParamsMetricValidIPsRatio BgprpkiRoaTimeseriesParamsMetric = "validIpsRatio"
const BgprpkiRoaTimeseriesParamsMetricValidIPsV4Ratio BgprpkiRoaTimeseriesParamsMetric = "validIpsV4Ratio"
const BgprpkiRoaTimeseriesParamsMetricValidIPsV6Ratio BgprpkiRoaTimeseriesParamsMetric = "validIpsV6Ratio"
Name param.Field[[]string]Optional

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

ReturnsExpand Collapse
type BgprpkiRoaTimeseriesResponse struct{…}
Meta BgprpkiRoaTimeseriesResponseMeta
DataTime Time

Timestamp of the underlying data.

formatdate-time
QueryTime Time

Timestamp when the query was executed.

formatdate-time
Serie0 BgprpkiRoaTimeseriesResponseSerie0
Timestamps []Time
Values []string

Get RPKI ROA deployment 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.RPKI.Roas.Timeseries(context.TODO(), radar.BGPRPKIRoaTimeseriesParams{

  })
  if err != nil {
    panic(err.Error())
  }
  fmt.Printf("%+v\n", response.Meta)
}
{
  "result": {
    "meta": {
      "dataTime": "2019-12-27T18:11:19.117Z",
      "queryTime": "2019-12-27T18:11:19.117Z"
    },
    "serie_0": {
      "timestamps": [
        "2019-12-27T18:11:19.117Z"
      ],
      "values": [
        "10"
      ]
    }
  },
  "success": true
}
Returns Examples
{
  "result": {
    "meta": {
      "dataTime": "2019-12-27T18:11:19.117Z",
      "queryTime": "2019-12-27T18:11:19.117Z"
    },
    "serie_0": {
      "timestamps": [
        "2019-12-27T18:11:19.117Z"
      ],
      "values": [
        "10"
      ]
    }
  },
  "success": true
}