<?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 REST API to update Panorama Servers in Firewall in Automation/API Discussions</title>
    <link>https://live.paloaltonetworks.com/t5/automation-api-discussions/rest-api-to-update-panorama-servers-in-firewall/m-p/200493#M1589</link>
    <description>&lt;P&gt;Hi all&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I wonder can anyone offer some insight, I am trying to write a script to update all of the panorama server settings on a given list of firewalls. That's all fine but I am having an issue with the actual rest api -&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I&amp;nbsp;used debug CLI output to determine the syntax in order to build the command and it looks right according to the guides I've read, however it doesnt' work. I am testing against a local VM running 7.1.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;To test I am trying - (I've replaced my key below with k&lt;SPAN&gt;ey_removed and the IP addresses with x.x.x.x&lt;/SPAN&gt;)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;https://x.x.x.x/api/type=config&amp;amp;action=set&amp;amp;xpath=/config/devices/entry[@name='localhost.localdomain']/deviceconfig/system&amp;lt;panorama-server&amp;gt;x.x.x.x&amp;lt;/panorama-server&amp;gt;&amp;lt;panorama-server-2&amp;gt;x.x.x.x&amp;lt;/panorama-server-2&amp;gt;&amp;amp;key=key_removed&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It fails with the following -&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV class="pretty-print"&gt;&lt;DIV class="collapsible"&gt;&lt;DIV class="expanded"&gt;&lt;DIV class="line"&gt;&lt;PRE&gt;&amp;lt;response&amp;nbsp;status="error"&amp;nbsp;code="13"&amp;gt;
&amp;lt;msg&amp;gt;
&amp;lt;line&amp;gt;
Could not find schema node for xpath /config/devices/entry[@name='localhost.localdomain']/deviceconfig/system
&amp;lt;panorama-server&amp;gt;x.x.x.x&amp;lt;/panorama-server&amp;gt;
&amp;lt;panorama-server-2&amp;gt;x.x.x.x&amp;lt;/panorama-server-2&amp;gt;
&amp;lt;/line&amp;gt;
&amp;lt;/msg&amp;gt;
&amp;lt;/response&amp;gt;&lt;/PRE&gt;&lt;SPAN class="html-tag"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV class="line"&gt;&lt;SPAN class="html-tag"&gt;So I know something is wrong with&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;the&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;xpath, but I can't seem to figure out what.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV class="line"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class="line"&gt;&lt;SPAN class="html-tag"&gt;Does anyone know what I am doing wrong ?&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV class="line"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class="line"&gt;&lt;SPAN class="html-tag"&gt;Thanks&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV class="line"&gt;&lt;SPAN class="html-tag"&gt;James&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV class="line"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
    <pubDate>Wed, 14 Feb 2018 16:43:35 GMT</pubDate>
    <dc:creator>James.Kelly</dc:creator>
    <dc:date>2018-02-14T16:43:35Z</dc:date>
    <item>
      <title>REST API to update Panorama Servers in Firewall</title>
      <link>https://live.paloaltonetworks.com/t5/automation-api-discussions/rest-api-to-update-panorama-servers-in-firewall/m-p/200493#M1589</link>
      <description>&lt;P&gt;Hi all&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I wonder can anyone offer some insight, I am trying to write a script to update all of the panorama server settings on a given list of firewalls. That's all fine but I am having an issue with the actual rest api -&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I&amp;nbsp;used debug CLI output to determine the syntax in order to build the command and it looks right according to the guides I've read, however it doesnt' work. I am testing against a local VM running 7.1.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;To test I am trying - (I've replaced my key below with k&lt;SPAN&gt;ey_removed and the IP addresses with x.x.x.x&lt;/SPAN&gt;)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;https://x.x.x.x/api/type=config&amp;amp;action=set&amp;amp;xpath=/config/devices/entry[@name='localhost.localdomain']/deviceconfig/system&amp;lt;panorama-server&amp;gt;x.x.x.x&amp;lt;/panorama-server&amp;gt;&amp;lt;panorama-server-2&amp;gt;x.x.x.x&amp;lt;/panorama-server-2&amp;gt;&amp;amp;key=key_removed&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It fails with the following -&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV class="pretty-print"&gt;&lt;DIV class="collapsible"&gt;&lt;DIV class="expanded"&gt;&lt;DIV class="line"&gt;&lt;PRE&gt;&amp;lt;response&amp;nbsp;status="error"&amp;nbsp;code="13"&amp;gt;
&amp;lt;msg&amp;gt;
&amp;lt;line&amp;gt;
Could not find schema node for xpath /config/devices/entry[@name='localhost.localdomain']/deviceconfig/system
&amp;lt;panorama-server&amp;gt;x.x.x.x&amp;lt;/panorama-server&amp;gt;
&amp;lt;panorama-server-2&amp;gt;x.x.x.x&amp;lt;/panorama-server-2&amp;gt;
&amp;lt;/line&amp;gt;
&amp;lt;/msg&amp;gt;
&amp;lt;/response&amp;gt;&lt;/PRE&gt;&lt;SPAN class="html-tag"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV class="line"&gt;&lt;SPAN class="html-tag"&gt;So I know something is wrong with&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;the&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;xpath, but I can't seem to figure out what.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV class="line"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class="line"&gt;&lt;SPAN class="html-tag"&gt;Does anyone know what I am doing wrong ?&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV class="line"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class="line"&gt;&lt;SPAN class="html-tag"&gt;Thanks&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV class="line"&gt;&lt;SPAN class="html-tag"&gt;James&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV class="line"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Wed, 14 Feb 2018 16:43:35 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/automation-api-discussions/rest-api-to-update-panorama-servers-in-firewall/m-p/200493#M1589</guid>
      <dc:creator>James.Kelly</dc:creator>
      <dc:date>2018-02-14T16:43:35Z</dc:date>
    </item>
    <item>
      <title>Re: REST API to update Panorama Servers in Firewall</title>
      <link>https://live.paloaltonetworks.com/t5/automation-api-discussions/rest-api-to-update-panorama-servers-in-firewall/m-p/200496#M1590</link>
      <description>&lt;P&gt;Nevermind I found the issue, I needed to add&amp;nbsp;&amp;amp;element= as per below -&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;https://x.x.x.x/api/type=config&amp;amp;action=set&amp;amp;xpath=/config/devices/entry[@name='localhost.localdomain']/deviceconfig/system&amp;amp;element=&amp;lt;panorama-server&amp;gt;x.x.x.x&amp;lt;/panorama-server&amp;gt;&amp;lt;panorama-server-2&amp;gt;x.x.x.x&amp;lt;/panorama-server-2&amp;gt;&amp;amp;key=key_removed&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hope this helps somebody else.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards&lt;BR /&gt;James&lt;/P&gt;</description>
      <pubDate>Wed, 14 Feb 2018 18:15:55 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/automation-api-discussions/rest-api-to-update-panorama-servers-in-firewall/m-p/200496#M1590</guid>
      <dc:creator>James.Kelly</dc:creator>
      <dc:date>2018-02-14T18:15:55Z</dc:date>
    </item>
  </channel>
</rss>

