This data call 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.
https://stat.ripe.net/data/bgp-state/data.<format>?<parameters>
e.g. https://stat.ripe.net/data/bgp-state/data.json?resource=140.78/16×tamp=2012-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
|
Output
Data
Key
|
Info
|
bgp_state
|
List of BGP routes.
target_prefix |
Prefix to which this BGP route refers to. |
path |
The 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). |
community |
The list of communities in this BGP route. |
source_id |
The id of the route collector (rrc) neighbouring peer through which this BGP route was observed. The format is "[rrc number]-[peer IP address]". |
|
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.
|
Example
"data": {
"bgp_state": [
{
"community": [
"174:1001",
"174:21000",
"174:22013",
"45896:1001"
],
"path": [
45896,
174,
3356,
1853,
1205
],
"source_id": "00-111.91.233.1",
"target_prefix": "140.78.0.0/16"
},
(...)
{
"community": [ ],
"path": [
13237,
1853,
1205
],
"source_id": "12-80.81.192.74",
"target_prefix": "140.78.0.0/16"
},
(...)
],
"nr_routes": 106,
"query_time": "2012-12-21T12:00:00",
"resource": "140.78.0.0/16"
}