- Access exclusive content
- Connect with peers
- Share your expertise
- Find support resources
03-07-2013 03:56 AM
Dear alll,
I am trying to disable a specific rule from the security policy using the XML api...
I am sending the following URL:
https://192.168.1.1/api/?type=config&action=edit&key=<my_key_here>=&xpath=/config/devices/entry/vsys/entry/rulebase/security/rules/entry[@name='rule1']&element=<disabled>yes</disabled>
But as a result I get the following error:
<response status="error" code="12"><msg><line>Edit breaks config validity</line></msg></response>
What am I doing wrong?
George
03-07-2013 01:48 PM
Try changing the action to "action=set", rather than edit.
03-07-2013 05:23 PM
edit wants an xpath node which 'overlaps' with the element (XML) data, so add '/disabled' at the end of your xpath.
03-31-2013 01:20 AM
I tried this last one worked.
Thanks for useful command.I also wonder how debug commands can be used by Api (or if we can)
04-01-2013 11:26 AM
Debug commands are not supported by the API.
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!