BGP history scenario
GET /bgp/history/scenario
Replay payload for a single prefix over a time window, reconstructed from the bitemporal best-path/peer history (bgp_best_path_history, bgp_peer_history). Backs the BGP change-animation replay panel. Shaped like the RIPEstat bgplay data call: the state open at from, plus the ordered transitions within the window.
Auth: all authenticated roles
Query params:
| Param |
Type |
Required |
Description |
as_id |
UUID |
Yes |
Autonomous-system scope |
prefix |
CIDR |
Yes |
The prefix to replay (guided-attention surface — a prefix is mandatory; use /bgp/history/bins for an AS-wide overview) |
from, to |
RFC 3339 |
Yes |
Window bounds; from must be strictly before to |
match |
string |
No |
exact (default) or covering (prefix >>= $) |
routing_domain_id |
UUID |
No |
Restrict to one routing domain |
device_id |
UUID |
No |
Restrict to one selecting device's perspective |
cap |
int |
No |
Max events (default 5000, max 20000); when hit, truncated=true |
Response: 200 OK
{
"initial_state": [ { "prefix": "10.0.0.0/24", "device_id": "…", "next_hop": "198.51.100.1", "as_path": "65001 65002", "…": "…" } ],
"events": [
{ "type": "announce", "event_time": "2026-07-01T10:00:00Z", "prefix": "10.0.0.0/24", "device_id": "…", "origin": "change", "new": { "next_hop": "198.51.100.1", "…": "…" } },
{ "type": "change", "event_time": "2026-07-01T10:05:00Z", "prefix": "10.0.0.0/24", "device_id": "…", "origin": "change", "new": { "next_hop": "198.51.100.2" }, "old": { "next_hop": "198.51.100.1" } },
{ "type": "withdraw", "event_time": "2026-07-01T10:10:00Z", "prefix": "10.0.0.0/24", "device_id": "…", "origin": "change", "old": { "next_hop": "198.51.100.2" } }
],
"peer_events": [ { "event_time": "…", "device_id": "…", "peer_ip": "198.51.100.1", "address_family": "ipv4", "peer_as": 65002, "peer_type": "ebgp", "state": "down", "origin": "change" } ],
"truncated": false
}
type is derived from interval adjacency: announce (no interval ended exactly at this open), change (an interval ended here — old carries the prior next-hop / AS-path / local-pref / MED for the diff lane), withdraw (a terminal close — no interval begins at this instant).
origin is change or seed. Seed transitions (D-SEED reconciliation at engine start) are labeled, not dropped — the UI de-emphasizes them ("changed during a monitoring gap"). Bitemporal note: a route that vanished while the engine was down surfaces as a withdraw at reconciliation time (there is no close-side origin marker) — correlate with a peer_events session gap at the same instant.
- Replay temporal floor = the recorder's debounce (30 s default): sub-debounce flaps are coalesced and do not appear.
Errors: 400 if as_id, prefix, or the window is missing/invalid.