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×tamp=2020-12-21T12:00
Parameters
Key | Value | Info | Required |
---|---|---|---|
resource | Prefix, IP address, AS or a list of valid comma-separated resources | Defines 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 |
timestamp | ISO8601 or Unix timestamp | Defines the time for when to perform the query. | NO - default: latest time there is BGP data available |
rrcs | Single-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_timestamps | TRUE or FALSE | If TRUE, will format the timestamps in the result as Unix timestamp. | NO - default: FALSE |
Data Output
Key | Info | ||||||||
---|---|---|---|---|---|---|---|---|---|
bgp_state | List of BGP routes.
| ||||||||
nr_routes | The number of BGP routes observed at that time. | ||||||||
query_time | Defines the time of the query. | ||||||||
resource | Defines 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×tamp=2020-12-21T12:00"
js
const requestOptions = {
method: 'GET',
};
fetch("https://stat.ripe.net/data/bgp-state/data.json?resource=140.78/16×tamp=2020-12-21T12:00", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));