getSiteDeviceRoutes
POST https://{{host}}/api/v1/sites/:site_id/devices/:device_id/show_route
Get routes from the SSR, SRX and Switches. The output will be available through websocket. As there can be multiple command issued against the same device at the same time and the output all goes through the same websocket stream, session
is introduced for demux.
Parameters
Name | Type | Description |
---|---|---|
prefix | string | (optional) route prefix |
protocol | string | (optional) Supported only for bgp |
vrf | string | (optional) VRF name |
neighbor | string | (optional) IP of the neighbor |
route | string | if neighbor is specified, received / advertised, if not specified, both will be shown |
node | string | (Optional) node0 / node1 for HA |
interval | int | (Optional) rate at which output will refresh, default is 0 and valid range 0-10. |
duration | int | (Optional) duration in sec for which refresh is enabled, default is 0 and valid range 0-300 sec. Should be set only if interval is configured to non-zero value. |
subscribe to Device Command outputs
{
"subscribe": "/sites/:site_id/devices/:device_id/cmd"
}
Example output from ws stream
admin@labsystem1.fiedler# show bgp neighbors
BGP neighbor is 192.168.4.1, remote AS 4200000001, local AS 4200000128, external
link
BGP version 4, remote router ID 1.1.1.1
BGP state = Established, up for 00:27:25
Last read 00:00:25, hold time is 90, keepalive interval is 30 seconds
Configured hold time is 90, keepalive interval is 30 seconds
Neighbor capabilities:
4 Byte AS: advertised and received
Route refresh: advertised and received(old & new)
Address family IPv4 Unicast: advertised and received
Graceful Restart Capabilty: advertised and received
Remote Restart timer is 120 seconds
Address families by peer:
none
...
Request Body
{"prefix"=>"192.168.0.5/30", "protocol"=>"bgp", "vrf"=>"default", "neighbor"=>"192.168.4.1", "route"=>"advertised"}
RESPONSES
status: OK
{"session":"session_id"}