Add a public-facing API
zorun opened this issue · 2 comments
We need an API for bird-lg. It would allow to better separate the web UI and the backend, and allow external tools to query bird-lg.
This is about a public API that would be exposed by bird-lg, and not about router <--> bird-lg
communication (routers should not expose a publicly-available interface anyway)
The API should:
- use a standard format (JSON)
- cover everything that is currently possible in the web UI (i.e. we could rewrite the web frontend to use the API)
- if possible, adhere to some "standard" for this kind of API
Here is some initial research about existing looking glass APIs (from #35) :
There have been upstream discussions about structured output in Bird: https://bird.network.cz/pipermail/bird-users/2017-June/011356.html
And a patch from Netflix enabling JSON output directly in Bird: https://bird.network.cz/pipermail/bird-users/2018-March/012088.html
There's also Periscope from CAIDA, that parses many kind of looking glasses and outputs JSON:
https://www.caida.org/tools/utilities/looking-glass-api/
https://www.nanog.org/sites/default/files/20161018_Giotsas_Periscope_Standardizing_And_v1.pdf
The "Bird's Eye" project from INEX also has an API: https://github.com/inex/birdseye
Example here: https://www.inex.ie/rc1-cork-ipv4/