Skip to content
Start here

Get ASPA objects snapshot

radar.bgp.rpki.aspa.snapshot(ASPASnapshotParams**kwargs) -> ASPASnapshotResponse
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
customer_asn: Optional[int]

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

date: Optional[Union[str, datetime]]

Filters results by the specified datetime (ISO 8601).

formatdate-time
format: Optional[Literal["JSON", "CSV"]]

Format in which results will be returned.

One of the following:
"JSON"
"CSV"
include_asn_info: Optional[bool]

Include ASN metadata (name, country) in response.

provider_asn: Optional[int]

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

ReturnsExpand Collapse
class ASPASnapshotResponse:
asn_info: ASNInfo
_13335: ASNInfo_13335
asn: int

ASN number.

country: str

Alpha-2 country code.

name: str

AS name.

aspa_objects: List[ASPAObject]
customer_asn: int

The customer ASN publishing the ASPA object.

providers: List[int]
meta: Meta
data_time: datetime

Timestamp of the underlying data.

formatdate-time
query_time: datetime

Timestamp when the query was executed.

formatdate-time
total_count: int

Total number of ASPA objects.

Get ASPA objects snapshot

import os
from cloudflare import Cloudflare

client = Cloudflare(
    api_token=os.environ.get("CLOUDFLARE_API_TOKEN"),  # This is the default and can be omitted
)
response = client.radar.bgp.rpki.aspa.snapshot()
print(response.asn_info)
{
  "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
}