- Access exclusive content
- Connect with peers
- Share your expertise
- Find support resources
06-06-2020 03:29 PM - edited 06-06-2020 03:34 PM
All, trying to send a command via the API to change the metric value of a static route, this is because occassionally my primary connection is extremely slow, but doesnt fail so path monitoring doesnt remove the primary static route. I'd like to be able to integrate this into some other home automation I have.
I feel like I'm close, but cant seem to get the correct syntax from debug CLI ouput, I've done it with SET commands easily enough.
The below returns an error:
My not working command:
https://FIREWALL/api?key=APIKEY&type=config&action=set&xpath=/config/devices/entry[@name='localhost.localdomain']/network/virtual-router/entry[@name='default']/routing-table/ip/static-route/entry[@name='Backup Default Route']/metric&element=<'entry name='200''/>
My Debug CLI output after successful SET command:
<request cmd="set" obj="/config/devices/entry[@name='localhost.localdomain']/network/virtual-router/entry[@name='default']/routing-table/ip/static-route/entry[@name='Backup Default Route']" cookie="7921424603090921"><metric>200</metric></request>
As a bonus, the commit command for the API would also be nice 🙂
Help would be appreciated.
06-06-2020 03:57 PM
06-07-2020 02:25 AM
Absoluletly perfect!
Thankyou very much!
Click Accept as Solution to acknowledge that the answer to your question has been provided.
The button appears next to the replies on topics you’ve started. The member who gave the solution and all future visitors to this topic will appreciate it!
These simple actions take just seconds of your time, but go a long way in showing appreciation for community members and the LIVEcommunity as a whole!
The LIVEcommunity thanks you for your participation!