This is the server counterpart to my lg-web frontend. It performs server-side commands, and returns the responses back to the authenticated caller as JSON payloads.
- php5-sqlite
- php5-phalcon
via HTTP GET -> /api/v1/{task}/{target}[/]?{mask}
mask is optional, and only useful for OpenBGPd BGP table lookups. task may be any of the following,
- ping
- ping6
- traceroute
- traceroute6
- bgp
- stream
The traceroute commands return a live stream ID which can then be used to stream their output in real time in conjunction with task 6. This makes it seem as if the user is running the command on their own system.
The default API key (HTTP basic Auth - username only) is odske710r3KyS8e32X5zCKnIjV82L6S4odske710r3KyS8e32X5zCUnIjV82L6S4
via HTTP PUT -> /api/v1/update-key/{key}
Here, key is the new API key for the instance. It's recommended to update the key immediately after install. Note that it has to be exactly 64 characters long.
This is doable like this, or via the API -- whichever you prefer.
A typical response looks like this,
{"state":"ok","code":200,"timestamp":1422285039,"message":"The stream object has been successfully created.","data":"54c658ef5ed8d"}
Tools it's meant to be used with,
- inet-utils ping/ping6
- inet-utils traceroute/traceroute6
- openbgpd bgpctl