REST API Commands?

Is there plans to expand the REST API to include other commands? I’d like to be able to “bounce” a VPN tunnel or BGP session (I like to use VyOS for some network alerting & testing) but as of now the REST API is pretty limited:

https://docs.vyos.io/en/equuleus/automation/vyos-api.html#vyosapi

I’d love to be able to do a reset vpn ipsec-peer 1.2.3.4 or reset ip bgp 1.2.3.4. This would have benefits on automation (if automation detects a loss of connectivity to a peer, reset the VPN tunnel, for example), and I wouldn’t have to rely upon expect and other SSH-specific methods.

Thanks!

@SlothCroissant sure, and this would seem a reasonable addition. Feel free to open a task on
https://phabricator.vyos.net/
regarding the feature; if you are willing/able, you can submit a PR with the changes, otherwise, as this is a simple extension, I expect that we can add it soon.

Task ⚓ T4442 HTTP API add action "reset"

1 Like

Thanks @Viacheslav! Quick question - will this be back ported into 1.3.x? If so, is there a release schedule so I’d know which version will have it? I presume 1.4-rolling will have it as soon as the PR lands and we get a build daily, etc. But just checking on the 1.3 branch as well.

Thanks for your quick work on this!

I hope it will be in 1.3.2
I’m going to create a pr also for 1.3
You can already use it in the next rolling release

1 Like

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.