-
-
Notifications
You must be signed in to change notification settings - Fork 111
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add JSON API on bird-lg #35
base: master
Are you sure you want to change the base?
Conversation
…ow route as JSON value Example : https://[[LG_MASTER]]/api/[[LG_NODES_LIST]]/ipv4?q=8.8.8.8 Return : { "[[LG_NODES_LIST]]": { "result": [ { "origin": "IGP", "med": 0, "via": "1.1.1.2", "last": "2018-07-10", "network": "8.8.8.0", "localPref": 350, "asPath": "15169", "originatorId": { "addr": "4.4.4.4", "reverse": "router.fr.eu" }, "community": [ "65000:65000" ], "clusterList": [ "9.89.6.6", "9.89.8.8" ], "netmask": "24", "fromPeer": "bird", "from": "4.4.4.4", "nextHop": { "addr": "1.1.1.2", "reverse": "google.fr.eu" }, "ipType": "IPv4" } ] } }
Example : https://[[LG_MASTER]]/api/[[LG_NODES_LIST]]/ipv4?q=8.8.8.8 Return : { "[[LG_NODES_LIST]]": { "result": [ { "origin": "IGP", "med": 0, "via": "1.1.1.2", "last": "2018-07-10", "network": "8.8.8.0", "localPref": 350, "asPath": "15169", "originatorId": { "addr": "4.4.4.4", "reverse": "router.fr.eu" }, "community": [ "65000:65000" ], "clusterList": [ "9.89.6.6", "9.89.8.8" ], "netmask": "24", "fromPeer": "bird", "from": "4.4.4.4", "nextHop": { "addr": "1.1.1.2", "reverse": "google.fr.eu" }, "ipType": "IPv4" } ] } }
Thanks for this contribution! I have a few questions:
There have been upstream discussions about structured output in Bird: https://bird.network.cz/pipermail/bird-users/2017-June/011356.html There's also Periscope from CAIDA, that parses many kind of looking glasses and outputs JSON: |
Thanks for your feedback. mipv4 / mipv6 are here to add the reverse on links for whois. I can split into another pull/merge request For structured output Bird, I would love it also ;) But waiting for this, perhaps we can rework a bit the output format and include a better patch ? |
Allow to show route as for "prefix_detail" route but as JSON value
Example : https://[[LG_MASTER]]/api/[[LG_NODES_LIST]]/ipv4?q=8.8.8.8
Return :
{
}