GET /bgp/rib-paths
List all received BGP paths for a specific prefix. Returns per-peer path detail from bgp_rib_entry with joined peer metadata (peer IP, peer AS, peer router ID). Enables "show ip bgp <prefix>" style analysis.
Auth: all authenticated roles
Query params:
| Param |
Type |
Required |
Description |
prefix |
CIDR |
Yes |
Exact prefix to look up (e.g. 203.0.113.0/24) |
device_id |
UUID |
Yes |
Selecting device (BMP target perspective) |
as_id |
UUID |
Yes |
Autonomous system |
at |
RFC 3339 |
No |
Time-travel timestamp. See the historical-mode note below. |
The three ID/prefix parameters are required; the endpoint returns 400 if any is missing.
Historical mode (at): per-peer received-path history exists where full-RIB
recording (history_mode: "full") covered the AS at at. The endpoint
gates on that capability: with coverage it serves the recorded per-peer paths
from bgp_rib_entry_history (the requesting device's own rows only); without it
โ or when the covered prefix simply had no recorded paths at at โ it returns
an empty paths array, path_count: 0, and a notice explaining why, rather
than returning misleading live data.
Response: 200 OK
{
"prefix": "203.0.113.0/24",
"device_id": "uuid",
"paths": [
{
"peer_id": "uuid",
"prefix": "203.0.113.0/24",
"path_id": 0,
"next_hop": "198.51.100.2",
"as_path": "65002 65099",
"as_path_len": 2,
"origin": "igp",
"local_pref": 100,
"med": 0,
"communities": "65001:100",
"ext_communities": "RT:65001:100",
"large_communities": "",
"is_best": true,
"origin_as": 65099,
"igp_metric": 20,
"first_seen": "2026-03-20T10:00:00Z",
"last_seen": "2026-03-26T12:00:00Z",
"peer_ip": "198.51.100.2",
"peer_as": 65002,
"peer_router_id": "198.51.100.2"
}
],
"path_count": 3
}
The response echoes the requested prefix and device_id, and path_count is the number of entries in paths.
Errors: 400 if any of prefix, device_id, or as_id is missing.