<?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 Re: Loading partial configuration snapshot in Automation/API Discussions</title>
    <link>https://live.paloaltonetworks.com/t5/automation-api-discussions/loading-partial-configuration-snapshot/m-p/315462#M2222</link>
    <description>&lt;P&gt;&lt;a href="https://live.paloaltonetworks.com/t5/user/viewprofilepage/user-id/130874"&gt;@batd2&lt;/a&gt;&amp;nbsp;Thanks for your reply!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I was hoping to keep the local-user-database unchanged during the whole operation because if some of the defined users are doing something, when I switch to a configuration without them, then add them back, I might cause some interruptions I guess? As the configuration change does not seem disruptive per se (no reboot and stuff) this seems avoidable, although I may be misunderstanding how it all works so it may be a pointless effort.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Nonetheless I realised I still need to download the unselected configuration snapshots (to show some of the data to the end-user), I know can get the list of available named configs with:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P class="p1"&gt;&lt;SPAN class="s1"&gt;/api/?type=op&amp;amp;action=complete&amp;amp;xpath=/operations/show/config/saved&amp;amp;key=&amp;lt;key&amp;gt;&lt;BR /&gt;&lt;BR /&gt;but can't figure out how to get them with an api call (can only get them via&amp;nbsp;&lt;EM&gt;/php/device/config.export.php?name=&amp;nbsp;&lt;/EM&gt;&amp;nbsp;with the PHPSESSION cookie, like palo alto web interface does, but that's not ideal)&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Tue, 10 Mar 2020 13:58:38 GMT</pubDate>
    <dc:creator>LucaVitali</dc:creator>
    <dc:date>2020-03-10T13:58:38Z</dc:date>
    <item>
      <title>Loading partial configuration snapshot</title>
      <link>https://live.paloaltonetworks.com/t5/automation-api-discussions/loading-partial-configuration-snapshot/m-p/314697#M2217</link>
      <description>&lt;P&gt;Hello,&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;I am new to Palo Alto and its API, and I am a bit lost: I need to load a named configuration snapshot, which may be uploaded from a third party, without changing the&lt;/P&gt;&lt;P class="p1"&gt;&lt;SPAN class="s1"&gt;/config/shared/local-user-database&lt;/SPAN&gt;-user-database entry.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am currently downloading the snapshot, editing it and re-uploading it in a very messy fashion:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P class="p1"&gt;&lt;SPAN class="s1"&gt;From the documentation I only found how to get the&lt;STRONG&gt;&amp;nbsp;&lt;/STRONG&gt;current&amp;nbsp;configuration with &lt;/SPAN&gt;&lt;SPAN class="s1"&gt;&lt;EM&gt;/api/?type=config&amp;amp;action=show&amp;amp;key=&amp;lt;key&amp;gt;&lt;/EM&gt;, but can't find any way to get a named saved configuration via normal API call.&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="p1"&gt;&amp;nbsp;&lt;/P&gt;&lt;P class="p1"&gt;&lt;SPAN class="s1"&gt;I can download the named snapshot with &lt;EM&gt;/php/device/config.export.php?name=&amp;lt;config name&amp;gt;&lt;/EM&gt; but it requires mimicking a web admin login, is there any way to do so normally via API?&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="p1"&gt;&amp;nbsp;&lt;/P&gt;&lt;P class="p1"&gt;&lt;SPAN class="s1"&gt;&lt;BR /&gt;I also tried to use &amp;lt;partial&amp;gt; (which, in the documentation, is used with &amp;lt;commit&amp;gt; and some other commands) but I can't get it to work with &amp;lt;load&amp;gt;, for instance with:&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="p1"&gt;&amp;nbsp;&lt;/P&gt;&lt;P class="p1"&gt;&lt;SPAN class="s1"&gt;/api/?&amp;amp;type=op&amp;amp;cmd=&amp;lt;load&amp;gt;&amp;lt;config&amp;gt;&amp;lt;regenerate-rule-uuid-all&amp;gt;no&amp;lt;/regenerate-rule-uuid-all&amp;gt;&amp;lt;from&amp;gt;&lt;EM&gt;config_name&lt;/EM&gt;&lt;/SPAN&gt;&lt;SPAN class="s1"&gt;&amp;lt;/from&amp;gt;&lt;STRONG&gt;&amp;lt;partial&amp;gt;&amp;lt;local-user-database&amp;gt;excluded&amp;lt;/local-user-database&amp;gt;&amp;lt;/partial&amp;gt;&lt;/STRONG&gt;&amp;lt;/config&amp;gt;&amp;lt;/load&amp;gt;&amp;amp;key=&lt;EM&gt;key&lt;BR /&gt;&lt;BR /&gt;&lt;/EM&gt;But I get&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="p1"&gt;&lt;SPAN class="s1"&gt;&amp;lt;response status="error" code="17"&amp;gt;&amp;lt;msg&amp;gt;&amp;lt;line&amp;gt;&amp;lt;![CDATA[ load -&amp;gt; config -&amp;gt; partial -&amp;gt; local-user-database unexpected here]]&amp;gt;&amp;lt;/line&amp;gt;&amp;lt;line&amp;gt;&amp;lt;![CDATA[ load -&amp;gt; config -&amp;gt; partial is invalid]]&amp;gt;&amp;lt;/line&amp;gt;&amp;lt;/msg&amp;gt;&amp;lt;/response&amp;gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="p1"&gt;&lt;BR /&gt;Is my syntax wrong or &amp;lt;partial&amp;gt; can't be used with &amp;lt;load&amp;gt; at all?&lt;/P&gt;</description>
      <pubDate>Thu, 05 Mar 2020 15:12:31 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/automation-api-discussions/loading-partial-configuration-snapshot/m-p/314697#M2217</guid>
      <dc:creator>LucaVitali</dc:creator>
      <dc:date>2020-03-05T15:12:31Z</dc:date>
    </item>
    <item>
      <title>Re: Loading partial configuration snapshot</title>
      <link>https://live.paloaltonetworks.com/t5/automation-api-discussions/loading-partial-configuration-snapshot/m-p/315409#M2219</link>
      <description>&lt;P&gt;&lt;a href="https://live.paloaltonetworks.com/t5/user/viewprofilepage/user-id/134940"&gt;@LucaVitali&lt;/a&gt;&amp;nbsp;I think the your approach is slightly wrong. You can load any part of the configuration (e.g. address objects), but you can't directly load the whole configuration file, but exclude some conifg items.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am not sure why exactly you need to do that, but one way to automate it could be to take the current config of the "&lt;SPAN class="s1"&gt;/config/shared/local-user-database&lt;/SPAN&gt;&lt;SPAN&gt;-user-database" then load the old&amp;nbsp;configuration&amp;nbsp;snapshot file and have a second API call to load the most up to date content of&amp;nbsp;"&lt;SPAN class="s1"&gt;/config/shared/local-user-database&lt;/SPAN&gt;-user-database".&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 10 Mar 2020 07:16:54 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/automation-api-discussions/loading-partial-configuration-snapshot/m-p/315409#M2219</guid>
      <dc:creator>batd2</dc:creator>
      <dc:date>2020-03-10T07:16:54Z</dc:date>
    </item>
    <item>
      <title>Re: Loading partial configuration snapshot</title>
      <link>https://live.paloaltonetworks.com/t5/automation-api-discussions/loading-partial-configuration-snapshot/m-p/315462#M2222</link>
      <description>&lt;P&gt;&lt;a href="https://live.paloaltonetworks.com/t5/user/viewprofilepage/user-id/130874"&gt;@batd2&lt;/a&gt;&amp;nbsp;Thanks for your reply!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I was hoping to keep the local-user-database unchanged during the whole operation because if some of the defined users are doing something, when I switch to a configuration without them, then add them back, I might cause some interruptions I guess? As the configuration change does not seem disruptive per se (no reboot and stuff) this seems avoidable, although I may be misunderstanding how it all works so it may be a pointless effort.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Nonetheless I realised I still need to download the unselected configuration snapshots (to show some of the data to the end-user), I know can get the list of available named configs with:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P class="p1"&gt;&lt;SPAN class="s1"&gt;/api/?type=op&amp;amp;action=complete&amp;amp;xpath=/operations/show/config/saved&amp;amp;key=&amp;lt;key&amp;gt;&lt;BR /&gt;&lt;BR /&gt;but can't figure out how to get them with an api call (can only get them via&amp;nbsp;&lt;EM&gt;/php/device/config.export.php?name=&amp;nbsp;&lt;/EM&gt;&amp;nbsp;with the PHPSESSION cookie, like palo alto web interface does, but that's not ideal)&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 10 Mar 2020 13:58:38 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/automation-api-discussions/loading-partial-configuration-snapshot/m-p/315462#M2222</guid>
      <dc:creator>LucaVitali</dc:creator>
      <dc:date>2020-03-10T13:58:38Z</dc:date>
    </item>
  </channel>
</rss>

