<?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 Save firewall device state from Panorama (API) in Automation/API Discussions</title>
    <link>https://live.paloaltonetworks.com/t5/automation-api-discussions/save-firewall-device-state-from-panorama-api/m-p/423395#M2737</link>
    <description>&lt;P&gt;I try to backup all the device states of firewalls managed by a Panorama, and to download these device states on the server where the script is run.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When I try to backup using the firewall API itself, it is working (the output file is indeed the device state).&lt;/P&gt;&lt;P&gt;When I try to backup using the Panorama API (with the serial number of the firewall in my command line), the output is an XML file stating that the device state has been created successfully.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I can across an old post describing the very same issue:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://live.paloaltonetworks.com/t5/automation-api-discussions/export-firewall-device-state-file-through-panorama-using-api/td-p/218101" target="_blank"&gt;https://live.paloaltonetworks.com/t5/automation-api-discussions/export-firewall-device-state-file-through-panorama-using-api/td-p/218101&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Are there now some options to achieve this goal?&amp;nbsp; Or are there other automatic options to save all device states at once on a regular basis? I'd like to avoid direct access to firewalls (because of closed firewall ports and/or permissions).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you.&lt;/P&gt;</description>
    <pubDate>Fri, 30 Jul 2021 12:39:49 GMT</pubDate>
    <dc:creator>brisonjf</dc:creator>
    <dc:date>2021-07-30T12:39:49Z</dc:date>
    <item>
      <title>Save firewall device state from Panorama (API)</title>
      <link>https://live.paloaltonetworks.com/t5/automation-api-discussions/save-firewall-device-state-from-panorama-api/m-p/423395#M2737</link>
      <description>&lt;P&gt;I try to backup all the device states of firewalls managed by a Panorama, and to download these device states on the server where the script is run.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When I try to backup using the firewall API itself, it is working (the output file is indeed the device state).&lt;/P&gt;&lt;P&gt;When I try to backup using the Panorama API (with the serial number of the firewall in my command line), the output is an XML file stating that the device state has been created successfully.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I can across an old post describing the very same issue:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://live.paloaltonetworks.com/t5/automation-api-discussions/export-firewall-device-state-file-through-panorama-using-api/td-p/218101" target="_blank"&gt;https://live.paloaltonetworks.com/t5/automation-api-discussions/export-firewall-device-state-file-through-panorama-using-api/td-p/218101&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Are there now some options to achieve this goal?&amp;nbsp; Or are there other automatic options to save all device states at once on a regular basis? I'd like to avoid direct access to firewalls (because of closed firewall ports and/or permissions).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you.&lt;/P&gt;</description>
      <pubDate>Fri, 30 Jul 2021 12:39:49 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/automation-api-discussions/save-firewall-device-state-from-panorama-api/m-p/423395#M2737</guid>
      <dc:creator>brisonjf</dc:creator>
      <dc:date>2021-07-30T12:39:49Z</dc:date>
    </item>
    <item>
      <title>Re: Save firewall device state from Panorama (API)</title>
      <link>https://live.paloaltonetworks.com/t5/automation-api-discussions/save-firewall-device-state-from-panorama-api/m-p/510096#M3078</link>
      <description>&lt;P&gt;It can be done but it's rather awkward. The trick is to transform the CLI command to run as an XML request in this format:&lt;/P&gt;&lt;P&gt;CLI: scp export configuration from MyBackup.xml to user@&amp;lt;scphost&amp;gt;:/path&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;API: https://&lt;/SPAN&gt;&lt;SPAN class=""&gt;&amp;lt;&lt;SPAN class=""&gt;firewall&lt;/SPAN&gt;&amp;gt;&lt;/SPAN&gt;&lt;SPAN&gt;/api/?key=apikey&amp;amp;type=op&amp;amp;cmd=&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;&amp;nbsp; &amp;nbsp;&amp;lt;&lt;SPAN class=""&gt;scp&lt;/SPAN&gt;&amp;gt;&amp;lt;&lt;SPAN class=""&gt;export&lt;/SPAN&gt;&amp;gt;&lt;/SPAN&gt;&lt;SPAN class=""&gt;&amp;lt;&lt;SPAN class=""&gt;configuration&lt;/SPAN&gt;&amp;gt;&amp;lt;from&amp;gt;&amp;lt;device_state_cfg.tgz&amp;gt;&amp;lt;to&amp;gt;&amp;lt;backupuser@10.5.4.3:c:/fw-configs/fw1-config.xml&amp;gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;&lt;SPAN class=""&gt;&amp;lt;/backupuser@10.5.4.3:c:/fw-configs/fw1-config.xml&amp;gt;&lt;/SPAN&gt;&lt;SPAN&gt;&amp;lt;/to&amp;gt;&lt;SPAN class=""&gt;&amp;lt;/device_state_cfg.tgz&amp;gt;&amp;lt;/from&amp;gt;&amp;lt;/&lt;SPAN class=""&gt;configuration&lt;/SPAN&gt;&amp;gt;&lt;SPAN&gt;&amp;lt;/&lt;SPAN class=""&gt;export&lt;/SPAN&gt;&amp;gt;&lt;/SPAN&gt;&amp;lt;/&lt;SPAN class=""&gt;scp&lt;/SPAN&gt;&amp;gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;SPAN class=""&gt;There probably exists examples of an uglier, more kludgy syntax than this but you'd have to reference 1970s mainframe manuals to find it. Why can't the command be fit between single tags? Be that as it may, if you are executing the commands against Panorama, you would want to append the "&amp;amp;target=device_serial_number" to the end of the request URL and iterate through the device serial numbers that Panorama manages.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;SPAN class=""&gt;I was warned that my post has been changed because it claims there was invalid HTML in the body. The change isn't obvious to me so I hope what was posted is reasonably close to what I entered.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 27 Jul 2022 21:16:36 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/automation-api-discussions/save-firewall-device-state-from-panorama-api/m-p/510096#M3078</guid>
      <dc:creator>PersonalPA220</dc:creator>
      <dc:date>2022-07-27T21:16:36Z</dc:date>
    </item>
  </channel>
</rss>

