Skip to content
Start here

Get ASPA changes over time

client.Radar.BGP.RPKI.ASPA.Changes(ctx, query) (*BgprpkiaspaChangesResponse, error)
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
query BGPRPKIASPAChangesParams
ASN param.Field[int64]Optional

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

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

Format in which results will be returned.

const BgprpkiaspaChangesParamsFormatJson BgprpkiaspaChangesParamsFormat = "JSON"
const BgprpkiaspaChangesParamsFormatCsv BgprpkiaspaChangesParamsFormat = "CSV"
IncludeASNInfo param.Field[bool]Optional

Include ASN metadata (name, country) in response.

ReturnsExpand Collapse
type BgprpkiaspaChangesResponse struct{…}
ASNInfo BgprpkiaspaChangesResponseASNInfo
Number13335 BgprpkiaspaChangesResponseASNInfo13335
ASN int64

ASN number.

Country string

Alpha-2 country code.

Name string

AS name.

Changes []BgprpkiaspaChangesResponseChange
CustomersAdded int64

Number of new ASPA objects created.

CustomersRemoved int64

Number of ASPA objects deleted.

Date Time

Date of the changes in ISO 8601 format.

formatdate-time
Entries []BgprpkiaspaChangesResponseChangesEntry
CustomerASN int64

The customer ASN affected.

Providers []int64
Type BgprpkiaspaChangesResponseChangesEntriesType
One of the following:
const BgprpkiaspaChangesResponseChangesEntriesTypeCustomerAdded BgprpkiaspaChangesResponseChangesEntriesType = "CustomerAdded"
const BgprpkiaspaChangesResponseChangesEntriesTypeCustomerRemoved BgprpkiaspaChangesResponseChangesEntriesType = "CustomerRemoved"
const BgprpkiaspaChangesResponseChangesEntriesTypeProvidersAdded BgprpkiaspaChangesResponseChangesEntriesType = "ProvidersAdded"
const BgprpkiaspaChangesResponseChangesEntriesTypeProvidersRemoved BgprpkiaspaChangesResponseChangesEntriesType = "ProvidersRemoved"
ProvidersAdded int64

Number of providers added to existing objects.

ProvidersRemoved int64

Number of providers removed from existing objects.

TotalCount int64

Running total of active ASPA objects after this day.

Meta BgprpkiaspaChangesResponseMeta
DataTime Time

Timestamp of the underlying data.

formatdate-time
QueryTime Time

Timestamp when the query was executed.

formatdate-time

Get ASPA changes over time

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.ASPA.Changes(context.TODO(), radar.BGPRPKIASPAChangesParams{

  })
  if err != nil {
    panic(err.Error())
  }
  fmt.Printf("%+v\n", response.ASNInfo)
}
{
  "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
}