Hello all:
I'd appreciate any and all information anyone could provide about the following:
Using the rest API I can get the current rules. However when I attempt to add a new rule I'm getting the error:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?><Errors><Error><code>100030</code><description>Precondition failed.Please update the current configuration.</description></Error></Errors>
Here's the curl command line:
curl -X POST -v -H "Content-Type: application/xml" -k -u "admin:<pwd>" "https://192.168.8.100/api/2.0/app/firewall/datacenter-2/config" -T myNewRule.xml
And here's the contents of myNewRule.xml:
Hello there,
Were you able to resolve this issue?
I am gettign the same error.
Thanks
I found out why this was erroring out but am getting a new error now
"Unmatched rules found in the configurations"
Change Firewall Configuration
We need to put If-Match in request header to resolve below error.
Precondition failed.Please update the current configuration.
For "Unmatched rules found in the configurations" . we need to get the fresh configuration from GET requesteach time before pushing(POST) any configuration.
e.g. in the tag <layer3FirewallRule disabled="false" precedence="none" id="1029"> we have id attribute that get change on every post. so here we just take latest config and add/modify configuration as per need.
Thanks this sorted out my issue 😉