<?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 API call to Panorama to get active Firewall and Management IP Address? in Automation/API Discussions</title>
    <link>https://live.paloaltonetworks.com/t5/automation-api-discussions/api-call-to-panorama-to-get-active-firewall-and-management-ip/m-p/481015#M3010</link>
    <description>&lt;P&gt;I am working on a Python automation project that will accept a user entering an IP address, then making API calls to Panorama to find the IP in the network.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So far, I'm able to call the Panorama API call to get aggregate interfaces and ethernet interfaces - and build a dictionary of where subnets are - with their site.&amp;nbsp; Now that I know the subnetwork, I want to call the active firewall at that site, and get the ARP entry for the IP the user entered.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'd like to know&amp;nbsp;&lt;EM&gt;which&lt;/EM&gt; firewall is active at the site, and the management IP of it, to make a call directly to it, to retrieve the ARP information.&lt;BR /&gt;&lt;BR /&gt;I cannot find where to get the firewall status or the management IP - through the Panorama API.&amp;nbsp; Is it even available through the API?&amp;nbsp; Or would I need to use the pan-os-python SDK?&lt;/P&gt;</description>
    <pubDate>Tue, 19 Apr 2022 14:16:15 GMT</pubDate>
    <dc:creator>BrannenTaylor</dc:creator>
    <dc:date>2022-04-19T14:16:15Z</dc:date>
    <item>
      <title>API call to Panorama to get active Firewall and Management IP Address?</title>
      <link>https://live.paloaltonetworks.com/t5/automation-api-discussions/api-call-to-panorama-to-get-active-firewall-and-management-ip/m-p/481015#M3010</link>
      <description>&lt;P&gt;I am working on a Python automation project that will accept a user entering an IP address, then making API calls to Panorama to find the IP in the network.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So far, I'm able to call the Panorama API call to get aggregate interfaces and ethernet interfaces - and build a dictionary of where subnets are - with their site.&amp;nbsp; Now that I know the subnetwork, I want to call the active firewall at that site, and get the ARP entry for the IP the user entered.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'd like to know&amp;nbsp;&lt;EM&gt;which&lt;/EM&gt; firewall is active at the site, and the management IP of it, to make a call directly to it, to retrieve the ARP information.&lt;BR /&gt;&lt;BR /&gt;I cannot find where to get the firewall status or the management IP - through the Panorama API.&amp;nbsp; Is it even available through the API?&amp;nbsp; Or would I need to use the pan-os-python SDK?&lt;/P&gt;</description>
      <pubDate>Tue, 19 Apr 2022 14:16:15 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/automation-api-discussions/api-call-to-panorama-to-get-active-firewall-and-management-ip/m-p/481015#M3010</guid>
      <dc:creator>BrannenTaylor</dc:creator>
      <dc:date>2022-04-19T14:16:15Z</dc:date>
    </item>
    <item>
      <title>Re: API call to Panorama to get active Firewall and Management IP Address?</title>
      <link>https://live.paloaltonetworks.com/t5/automation-api-discussions/api-call-to-panorama-to-get-active-firewall-and-management-ip/m-p/487369#M3025</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I would say pan-os-python SDK is the best option, and there is a method, refresh_devices, inside of panorama module which should give the HA peer relationships. I've tried to write a simple script to get that information but until now i didn't understood how.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 16 May 2022 09:33:01 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/automation-api-discussions/api-call-to-panorama-to-get-active-firewall-and-management-ip/m-p/487369#M3025</guid>
      <dc:creator>adeliomoreira</dc:creator>
      <dc:date>2022-05-16T09:33:01Z</dc:date>
    </item>
    <item>
      <title>Re: API call to Panorama to get active Firewall and Management IP Address?</title>
      <link>https://live.paloaltonetworks.com/t5/automation-api-discussions/api-call-to-panorama-to-get-active-firewall-and-management-ip/m-p/514288#M3109</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://live.paloaltonetworks.com/t5/user/viewprofilepage/user-id/115571"&gt;@BrannenTaylor&lt;/a&gt;,&lt;BR /&gt;The XML API call&amp;nbsp;&lt;FONT face="courier new,courier"&gt;&lt;SPAN data-offset-key="78hpr-0-0"&gt;https://&lt;/SPAN&gt;&lt;SPAN class="resolvedVariable" data-testid="resolvedVariable"&gt;&lt;SPAN data-offset-key="78hpr-1-0"&gt;{{host}}&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN data-offset-key="78hpr-2-0"&gt;/api?key=&lt;/SPAN&gt;&lt;SPAN class="resolvedVariable" data-testid="resolvedVariable"&gt;&lt;SPAN data-offset-key="78hpr-3-0"&gt;{{key}}&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;SPAN data-offset-key="78hpr-4-0"&gt;&lt;FONT face="courier new,courier"&gt;&amp;amp;type=op&amp;amp;cmd=&amp;lt;show&amp;gt;&amp;lt;devices&amp;gt;&amp;lt;all/&amp;gt;&amp;lt;/devices&amp;gt;&amp;lt;/show&amp;gt;&lt;/FONT&gt; will get you an XML response for you to parse, which includes the hostname, management IP and HA status (active/passive). You could do the same OP command with pan-os-python with &lt;A href="https://pan-os-python.readthedocs.io/en/latest/module-panorama.html#panos.panorama.Panorama.op" target="_self"&gt;this&lt;/A&gt;, or use the suggestion from&amp;nbsp;&lt;a href="https://live.paloaltonetworks.com/t5/user/viewprofilepage/user-id/139038"&gt;@adeliomoreira&lt;/a&gt;, which uses the same XML API call under the hood.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN data-offset-key="78hpr-4-0"&gt;Hope that helps!&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 08 Sep 2022 15:36:53 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/automation-api-discussions/api-call-to-panorama-to-get-active-firewall-and-management-ip/m-p/514288#M3109</guid>
      <dc:creator>JimmyHolland</dc:creator>
      <dc:date>2022-09-08T15:36:53Z</dc:date>
    </item>
  </channel>
</rss>

