1
21.7 Legacy Series / How to update Gateway Group Tier from using the REST API ?
« on: January 22, 2022, 05:07:40 am »
Hi,
I have a 2 Interface Multi-WAN where Wan1 is main fiber link and Wan2 is VDSL failover link.
I have configured a Wan Group called Wan_Grp where Wan1 is Tier 1 and Wan2 is tier 2.
Some time, when Wan1 is too slow, I manually switch Tier1<->Tier2 on Wan Group so all traffic can be sent out on VDSL WAN2 (secondary link).
I want to automate this via script that later will be triggered from web browser, home automation button or even Alexa/Siri voice command.
"Hey Siri, switch internet..."
I have been playing around with OPNSense REST API but I don't see on API docs what is the name of the endpoint to update wan group configuration.
Does anyone have an example or know what is the endpoint and how to modify it ?
If not, I could try to modify the last LAN firewall rule on Firewall->Rules->Wan where we set the default gateway parameter for all LAN Network to be the Wan_Group.
Any help or examples will be greatly appreciated on how to call the endpoint and what is the correct one to use on either case.
Best regards.
I have a 2 Interface Multi-WAN where Wan1 is main fiber link and Wan2 is VDSL failover link.
I have configured a Wan Group called Wan_Grp where Wan1 is Tier 1 and Wan2 is tier 2.
Some time, when Wan1 is too slow, I manually switch Tier1<->Tier2 on Wan Group so all traffic can be sent out on VDSL WAN2 (secondary link).
I want to automate this via script that later will be triggered from web browser, home automation button or even Alexa/Siri voice command.
"Hey Siri, switch internet..."
I have been playing around with OPNSense REST API but I don't see on API docs what is the name of the endpoint to update wan group configuration.
Does anyone have an example or know what is the endpoint and how to modify it ?
If not, I could try to modify the last LAN firewall rule on Firewall->Rules->Wan where we set the default gateway parameter for all LAN Network to be the Wan_Group.
Any help or examples will be greatly appreciated on how to call the endpoint and what is the correct one to use on either case.
Best regards.