Skip to content

BGP State


This endpoint returns the state of BGP routes for a resource at a certain point in time, as observed by all the RIS collectors.
This is derived by applying a computation of state to the RIB dump (granularity=8h) that occurred exactly before that time, using the BGP updates observed between the RIB time and the query time.

GET /data/bgp-state/data.json?resource=140.78/16&timestamp=2020-12-21T12:00
Try it

Parameters

KeyValueInfoRequired
resourcePrefix, IP address, AS or a list of valid comma-separated resourcesDefines the resource that the query is performed for. If a list of resources is supplied, the results will be combined for all of them.YES
timestampISO8601 or Unix timestampDefines the time for when to perform the query.NO - default: latest time there is BGP data available
rrcsSingle-value or comma-separated values of RRC numbers (4 or 0,4,12,15)The list of Route Collectors (RRCs) to get the results from.NO - default behaviour: all RRCs
unix_timestampsTRUE or FALSEIf TRUE, will format the timestamps in the result as Unix timestamp.NO - default: FALSE

Data Output

KeyInfo
bgp_stateList of BGP routes.
target_prefixPrefix to which this BGP route refers to.
pathThe AS path in this BGP route, formatted as a list of ASes (first element is the direct BGP neighbour, last element is the origin AS).
communityThe list of communities in this BGP route.
source_idThe id of the route collector (rrc) neighbouring peer through which this BGP route was observed. The format is "[rrc number]-[peer IP address]".
nr_routesThe number of BGP routes observed at that time.
query_timeDefines the time of the query.
resourceDefines the resource used in the query.

Code Examples

bash
curl --location --request GET "https://stat.ripe.net/data/bgp-state/data.json?resource=140.78/16&timestamp=2020-12-21T12:00"
js
const requestOptions = {
	method: 'GET',
};

fetch("https://stat.ripe.net/data/bgp-state/data.json?resource=140.78/16&timestamp=2020-12-21T12:00", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));

Available versions for this endpoint:

1.2 (current)