Skip to content
Start here

Get ASPA objects snapshot

client.radar.bgp.rpki.aspa.snapshot(ASPASnapshotParams { customerAsn, date, format, 2 more } query?, RequestOptionsoptions?): ASPASnapshotResponse { asnInfo, aspaObjects, meta }
GET/radar/bgp/rpki/aspa/snapshot

Retrieves current or historical ASPA (Autonomous System Provider Authorization) objects. ASPA objects define which ASNs are authorized upstream providers for a customer 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: ASPASnapshotParams { customerAsn, date, format, 2 more }
customerAsn?: number

Filter by customer ASN (the ASN publishing the ASPA object).

date?: string

Filters results by the specified datetime (ISO 8601).

formatdate-time
format?: "JSON" | "CSV"

Format in which results will be returned.

One of the following:
"JSON"
"CSV"
includeAsnInfo?: boolean

Include ASN metadata (name, country) in response.

providerAsn?: number

Filter by provider ASN (an authorized upstream provider in ASPA objects).

ReturnsExpand Collapse
ASPASnapshotResponse { asnInfo, aspaObjects, meta }
asnInfo: ASNInfo { 13335 }
"13335": _13335 { asn, country, name }
asn: number

ASN number.

country: string

Alpha-2 country code.

name: string

AS name.

aspaObjects: Array<ASPAObject>
customerAsn: number

The customer ASN publishing the ASPA object.

providers: Array<number>
meta: Meta { dataTime, queryTime, totalCount }
dataTime: string

Timestamp of the underlying data.

formatdate-time
queryTime: string

Timestamp when the query was executed.

formatdate-time
totalCount: number

Total number of ASPA objects.

Get ASPA objects snapshot

import Cloudflare from 'cloudflare';

const client = new Cloudflare({
  apiToken: process.env['CLOUDFLARE_API_TOKEN'], // This is the default and can be omitted
});

const response = await client.radar.bgp.rpki.aspa.snapshot();

console.log(response.asnInfo);
{
  "result": {
    "asnInfo": {
      "13335": {
        "asn": 0,
        "country": "country",
        "name": "name"
      }
    },
    "aspaObjects": [
      {
        "customerAsn": 0,
        "providers": [
          0
        ]
      }
    ],
    "meta": {
      "dataTime": "2019-12-27T18:11:19.117Z",
      "queryTime": "2019-12-27T18:11:19.117Z",
      "totalCount": 0
    }
  },
  "success": true
}
Returns Examples
{
  "result": {
    "asnInfo": {
      "13335": {
        "asn": 0,
        "country": "country",
        "name": "name"
      }
    },
    "aspaObjects": [
      {
        "customerAsn": 0,
        "providers": [
          0
        ]
      }
    ],
    "meta": {
      "dataTime": "2019-12-27T18:11:19.117Z",
      "queryTime": "2019-12-27T18:11:19.117Z",
      "totalCount": 0
    }
  },
  "success": true
}