PANOS 6.0 XML - set failed?

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

PANOS 6.0 XML - set failed?

Not applicable

Hello all,

I am trying to edit/set a security rule using the XML API.  So far i have the following: https://x.x.x.x/api/?type=config&action=set&key=hiddenkeyhere&xpath=/config/devices/entry/vsys/entry... 1-1-1-1-1']/&element=<from><member>inside</member></from>

sadly all I get in return is "set failed, may need to override template object first".  When I change the action from set to override I get another error.  I am sure that this rule and element did not get inherited from a template.

I went into the CLI and issued the set command there and it works perfectly.  Just to make sure I formatted the element properly I turned on cli debugging so I could see what needs to be in the element section, below is the output: 

<request cmd="set" obj="/config/devices/entry[@name='localhost.localdomain']/vsys/entry[@name='vsys1']/rulebase/security/rules/entry[@name='Rule 1-1-1-1-1']" cookie="xxxxxxxxxxxxxxxxx"><from><member>inside</member></from></request>

Has anyone overcome this issue with setting elements for security rules?  If so, how?

Thanks in advanced!

2 REPLIES 2

L4 Transporter

Can you remove "/" between xpath and element like

http(s)://hostname/api/?type=config&action=set&key=keyvalue&xpath=xpath-value&element=element-value


~ Sai Srivastava Tumuluri ~

L1 Bithead

Hi Lee,

not sure what point release of 6 you're on, but i upgraded from 5 to 6.0.4 today and had the same error message when attempting to add members to address-groups (which broke all my auto-blocking code lol) - in that instance i found  i was missing a  <static> keyword around the member entry (ill raise a support call on monday with my reseller as an FYI), but in your case, im afraid i dont get the same error and the api call completes successfully..

https://x.x.x.x/api/?type=config&action=set&xpath=/config/devices/entry/vsys/entry[@name='vsys1']/ru... 1-1-1-1-1']&element=<from><member>inside</member></from>&key=hiddenkeyhere

<response status="success" code="20"><msg>command succeeded</msg></response>

cheers

damian

  • 4628 Views
  • 2 replies
  • 0 Likes
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!