Skip to content
Start here

Get ASPA changes over time

radar.bgp.rpki.aspa.changes(ASPAChangesParams**kwargs) -> ASPAChangesResponse
GET/radar/bgp/rpki/aspa/changes

Retrieves ASPA (Autonomous System Provider Authorization) changes over time. Returns daily aggregated changes including additions, removals, and modifications of ASPA objects.

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
asn: Optional[int]

Filter changes involving this ASN (as customer or provider).

date_end: Optional[Union[str, datetime]]

End of the date range (inclusive).

formatdate-time
date_start: Optional[Union[str, datetime]]

Start of the date range (inclusive).

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.

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

ASN number.

country: str

Alpha-2 country code.

name: str

AS name.

changes: List[Change]
customers_added: int

Number of new ASPA objects created.

customers_removed: int

Number of ASPA objects deleted.

date: datetime

Date of the changes in ISO 8601 format.

formatdate-time
entries: List[ChangeEntry]
customer_asn: int

The customer ASN affected.

providers: List[int]
type: Literal["CustomerAdded", "CustomerRemoved", "ProvidersAdded", "ProvidersRemoved"]
One of the following:
"CustomerAdded"
"CustomerRemoved"
"ProvidersAdded"
"ProvidersRemoved"
providers_added: int

Number of providers added to existing objects.

providers_removed: int

Number of providers removed from existing objects.

total_count: int

Running total of active ASPA objects after this day.

meta: Meta
data_time: datetime

Timestamp of the underlying data.

formatdate-time
query_time: datetime

Timestamp when the query was executed.

formatdate-time

Get ASPA changes over time

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.changes()
print(response.asn_info)
{
  "result": {
    "asnInfo": {
      "13335": {
        "asn": 0,
        "country": "country",
        "name": "name"
      }
    },
    "changes": [
      {
        "customersAdded": 0,
        "customersRemoved": 0,
        "date": "2019-12-27T18:11:19.117Z",
        "entries": [
          {
            "customerAsn": 0,
            "providers": [
              0
            ],
            "type": "CustomerAdded"
          }
        ],
        "providersAdded": 0,
        "providersRemoved": 0,
        "totalCount": 0
      }
    ],
    "meta": {
      "dataTime": "2019-12-27T18:11:19.117Z",
      "queryTime": "2019-12-27T18:11:19.117Z"
    }
  },
  "success": true
}
Returns Examples
{
  "result": {
    "asnInfo": {
      "13335": {
        "asn": 0,
        "country": "country",
        "name": "name"
      }
    },
    "changes": [
      {
        "customersAdded": 0,
        "customersRemoved": 0,
        "date": "2019-12-27T18:11:19.117Z",
        "entries": [
          {
            "customerAsn": 0,
            "providers": [
              0
            ],
            "type": "CustomerAdded"
          }
        ],
        "providersAdded": 0,
        "providersRemoved": 0,
        "totalCount": 0
      }
    ],
    "meta": {
      "dataTime": "2019-12-27T18:11:19.117Z",
      "queryTime": "2019-12-27T18:11:19.117Z"
    }
  },
  "success": true
}