<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic PANOS 6.0 XML - set failed? in Automation/API Discussions</title>
    <link>https://live.paloaltonetworks.com/t5/automation-api-discussions/panos-6-0-xml-set-failed/m-p/5496#M142</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I am trying to edit/set a security rule using the XML API.&amp;nbsp; So far i have the following: &lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://x.x.x.x/api/?type=config&amp;amp;action=set&amp;amp;key=hiddenkeyhere&amp;amp;xpath=/config/devices/entry/vsys/entry/rulebase/security/rules/entry[@name='Rule" rel="nofollow"&gt;https://x.x.x.x/api/?type=config&amp;amp;action=set&amp;amp;key=hiddenkeyhere&amp;amp;xpath=/config/devices/entry/vsys/entry/rulebase/security/rules/entry[@name='Rule&lt;/A&gt;&lt;SPAN&gt; 1-1-1-1-1']/&amp;amp;element=&amp;lt;from&amp;gt;&amp;lt;member&amp;gt;inside&amp;lt;/member&amp;gt;&amp;lt;/from&amp;gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sadly all I get in return is "&lt;SPAN style="color: #000000; font-family: monospace;"&gt;set failed, may need to override template object first&lt;/SPAN&gt;".&amp;nbsp; When I change the action from set to override I get another error.&amp;nbsp; I am sure that this rule and element did not get inherited from a template.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I went into the CLI and issued the set command there and it works perfectly.&amp;nbsp; 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:&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;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"&amp;gt;&amp;lt;from&amp;gt;&amp;lt;member&amp;gt;inside&amp;lt;/member&amp;gt;&amp;lt;/from&amp;gt;&amp;lt;/request&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Has anyone overcome this issue with setting elements for security rules?&amp;nbsp; If so, how?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advanced!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 08 Aug 2014 00:15:39 GMT</pubDate>
    <dc:creator>lee_noc</dc:creator>
    <dc:date>2014-08-08T00:15:39Z</dc:date>
    <item>
      <title>PANOS 6.0 XML - set failed?</title>
      <link>https://live.paloaltonetworks.com/t5/automation-api-discussions/panos-6-0-xml-set-failed/m-p/5496#M142</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I am trying to edit/set a security rule using the XML API.&amp;nbsp; So far i have the following: &lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://x.x.x.x/api/?type=config&amp;amp;action=set&amp;amp;key=hiddenkeyhere&amp;amp;xpath=/config/devices/entry/vsys/entry/rulebase/security/rules/entry[@name='Rule" rel="nofollow"&gt;https://x.x.x.x/api/?type=config&amp;amp;action=set&amp;amp;key=hiddenkeyhere&amp;amp;xpath=/config/devices/entry/vsys/entry/rulebase/security/rules/entry[@name='Rule&lt;/A&gt;&lt;SPAN&gt; 1-1-1-1-1']/&amp;amp;element=&amp;lt;from&amp;gt;&amp;lt;member&amp;gt;inside&amp;lt;/member&amp;gt;&amp;lt;/from&amp;gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sadly all I get in return is "&lt;SPAN style="color: #000000; font-family: monospace;"&gt;set failed, may need to override template object first&lt;/SPAN&gt;".&amp;nbsp; When I change the action from set to override I get another error.&amp;nbsp; I am sure that this rule and element did not get inherited from a template.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I went into the CLI and issued the set command there and it works perfectly.&amp;nbsp; 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:&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;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"&amp;gt;&amp;lt;from&amp;gt;&amp;lt;member&amp;gt;inside&amp;lt;/member&amp;gt;&amp;lt;/from&amp;gt;&amp;lt;/request&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Has anyone overcome this issue with setting elements for security rules?&amp;nbsp; If so, how?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advanced!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 08 Aug 2014 00:15:39 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/automation-api-discussions/panos-6-0-xml-set-failed/m-p/5496#M142</guid>
      <dc:creator>lee_noc</dc:creator>
      <dc:date>2014-08-08T00:15:39Z</dc:date>
    </item>
    <item>
      <title>Re: PANOS 6.0 XML - set failed?</title>
      <link>https://live.paloaltonetworks.com/t5/automation-api-discussions/panos-6-0-xml-set-failed/m-p/5497#M143</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Can you remove "/" between xpath and element like&lt;/P&gt;&lt;P&gt;http(s)://hostname/api/?type=config&amp;amp;action=set&amp;amp;key=keyvalue&amp;amp;xpath=xpath-value&amp;amp;element=element-value&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 Aug 2014 01:21:09 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/automation-api-discussions/panos-6-0-xml-set-failed/m-p/5497#M143</guid>
      <dc:creator>Sai_Tumuluri</dc:creator>
      <dc:date>2014-08-19T01:21:09Z</dc:date>
    </item>
    <item>
      <title>Re: PANOS 6.0 XML - set failed?</title>
      <link>https://live.paloaltonetworks.com/t5/automation-api-discussions/panos-6-0-xml-set-failed/m-p/5498#M144</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Lee,&lt;/P&gt;&lt;P&gt;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&amp;nbsp; i was missing a&amp;nbsp; &amp;lt;static&amp;gt; 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..&lt;/P&gt;&lt;P&gt;&lt;A class="jive-link-external-small" href="https://x.x.x.x/api/?type=config&amp;amp;action=set&amp;amp;key=hiddenkeyhere&amp;amp;xpath=/config/devices/entry/vsys/entry/rulebase/security/rules/entry[@name=%27Rule" rel="nofollow"&gt;https://x.x.x.x/api/?type=config&amp;amp;action=set&amp;amp;xpath=/config/devices/entry/vsys/entry[@name='vsys1']/rulebase/security/rules/entry[@name='Rule&lt;/A&gt; 1-1-1-1-1']&amp;amp;element=&amp;lt;from&amp;gt;&amp;lt;member&amp;gt;inside&amp;lt;/member&amp;gt;&amp;lt;/from&amp;gt;&amp;amp;key=hiddenkeyhere&lt;/P&gt;&lt;P&gt;&amp;lt;response status="success" code="20"&amp;gt;&amp;lt;msg&amp;gt;command succeeded&amp;lt;/msg&amp;gt;&amp;lt;/response&amp;gt;&lt;/P&gt;&lt;P&gt;cheers&lt;/P&gt;&lt;P&gt;damian&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 30 Aug 2014 15:01:16 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/automation-api-discussions/panos-6-0-xml-set-failed/m-p/5498#M144</guid>
      <dc:creator>dsouthard</dc:creator>
      <dc:date>2014-08-30T15:01:16Z</dc:date>
    </item>
  </channel>
</rss>

