Hello all,
I am trying to use the API to modify the WAN configuration on my MAX Transit Duo (8.1.3 firmware) via the REST API (from Python, but I’ve also tried CURL). I’m finding that no changes ever take effect.
For context, the ultimate goal is to be able to disable/enable WANs selectively to allow for automated speed testing. I’d really like to be able to change the Outbound Policy for that purpose, but the API does not seem to support that.
I have sample code below that does the following steps:
• Log in (user/pass) and preserve the pauth cookie
• Query the current ‘name’ and ‘enable’ state for a specific WAN (status.wan.connection)
• Attempt to change those values (config.wan.connection & cmd.config.apply)
• Re-query the current ‘name’ and ‘enable’ state for that WAN
Observe that the values do not change.
Questions:
• Am I missing something in the API invocation? The documentation discusses creating client and auth tokens, but that seems like an alternate authentication path.
They do not seem to be needed here, and I’ve tried that with no different results.
• Has anyone else been successful with these API calls?
• Is there a better approach than the API? (The CLI does not appear to support making these sorts of changes).
Code and the output are posted in a reply beacuse the forum software takes forever to render it as a code snippet. Wait for 2-4 minutes for it to render.
Thanks for any assistance!
–Roger