Enable/Disable security rules via XML API

Showing results for 
Show  only  | Search instead for 
Did you mean: 

Enable/Disable security rules via XML API

L1 Bithead

Hi all,

is it possible to enable / disable an existing security rule via XML API ?

Looking at the documentation (both the XML config guide and the api on the firewall) I found no useful informations on this topic Smiley Sad

thank's !


L5 Sessionator


You can do so using the following command:

To disable:


To enable:


Great Answer ...

bat thank you for being awesome.  question: any idea why a get on the same xpath (without the element arg) won't simply return an XML object with the state of a security rule?

e.g. https://firewall/api/?type=config&action=get&xpath=%2Fconfig%2Fdevices%2Fentry%5B%40name%3D%27localh... returns something completely useless, like:

<response status="success" code="19">



What the deuce does that tell me?  Neither the status or the code change based on the state of the rule, so...

Hi cjsteele

To know the status of rule query should be:


Let me know if this is what you are looking for.

  • 4 replies
  • 71 Subscriptions
Like what you see?

Show your appreciation!

Click Like if a post is helpful to you or if you just want to show your support.

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!