<?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: Commit-All to Specific Device Using API in Powershell in General Topics</title>
    <link>https://live.paloaltonetworks.com/t5/general-topics/commit-all-to-specific-device-using-api-in-powershell/m-p/450499#M101056</link>
    <description>&lt;P&gt;Thanks for the suggestion. Unfortunately, the guidance at /api doesn't get that granular for commit-all.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It turns out that the answer was to add a&amp;nbsp;&amp;lt;/entry&amp;gt; tag after the serial number entry as shown:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;&amp;lt;entry name="&amp;lt;serial_number&amp;gt;"&amp;gt;&amp;lt;/entry&amp;gt;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;Then, to get it to run properly in Powershell, add backticks to escape quotation marks around the DG name and serial number.&lt;/P&gt;</description>
    <pubDate>Tue, 30 Nov 2021 21:12:09 GMT</pubDate>
    <dc:creator>OwenFuller</dc:creator>
    <dc:date>2021-11-30T21:12:09Z</dc:date>
    <item>
      <title>Commit-All to Specific Device Using API in Powershell</title>
      <link>https://live.paloaltonetworks.com/t5/general-topics/commit-all-to-specific-device-using-api-in-powershell/m-p/450449#M101051</link>
      <description>&lt;P&gt;I am using Powershell to make API requests to &lt;LI-PRODUCT title="Panorama" id="Panorama"&gt;&lt;/LI-PRODUCT&gt;&amp;nbsp;which cause various commands to be executed on specific &lt;LI-PRODUCT title="NGFW" id="NGFW"&gt;&lt;/LI-PRODUCT&gt;s. I would like to do a commit-all to a specific firewall, not the entire DG/template stack. The documentation&amp;nbsp;&lt;A href="https://docs.paloaltonetworks.com/pan-os/8-1/pan-os-panorama-api/pan-os-xml-api-request-types/commit-configuration-api/commit-all.html" target="_blank"&gt;Commit-All (paloaltonetworks.com)&lt;/A&gt; lists the following command:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;curl -X GET "https://&amp;lt;panorama&amp;gt;/api/?key=apikey&amp;amp;type=commit&amp;amp;action=all&amp;amp;cmd=&amp;lt;commit-all&amp;gt;&amp;lt;shared-policy&amp;gt;&amp;lt;device-group&amp;gt;&amp;lt;entry name="&amp;lt;device-group-name&amp;gt;"&amp;gt;&amp;lt;devices&amp;gt;&amp;lt;entry name="&amp;lt;serial_number&amp;gt;"&amp;gt;&amp;lt;/devices&amp;gt;&amp;lt;entry/&amp;gt;&amp;lt;/device-group&amp;gt;&amp;lt;/shared-policy&amp;gt;&amp;lt;/commit-all&amp;gt;"&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;However, when I try this (using Invoke-RestMethod in Powershell as well as just trying in my web browser), I get an error saying "&lt;SPAN&gt;Request is not a valid XML."&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Can anyone help me out w/ the syntax?&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 30 Nov 2021 18:30:56 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/general-topics/commit-all-to-specific-device-using-api-in-powershell/m-p/450449#M101051</guid>
      <dc:creator>OwenFuller</dc:creator>
      <dc:date>2021-11-30T18:30:56Z</dc:date>
    </item>
    <item>
      <title>Re: Commit-All to Specific Device Using API in Powershell</title>
      <link>https://live.paloaltonetworks.com/t5/general-topics/commit-all-to-specific-device-using-api-in-powershell/m-p/450483#M101054</link>
      <description>&lt;P&gt;Hi &lt;a href="https://live.paloaltonetworks.com/t5/user/viewprofilepage/user-id/107710"&gt;@OwenFuller&lt;/a&gt; ,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You can verify the XMP path by logging into the XML API Browser of Panorama at x.x.x.x/api.&amp;nbsp; Then drill down into the menu tree (e.g., Commit &amp;gt; all &amp;gt; shared-policy etc.) and you will see the XML API URL on the bottom of the web page.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Tom&lt;/P&gt;</description>
      <pubDate>Tue, 30 Nov 2021 20:37:38 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/general-topics/commit-all-to-specific-device-using-api-in-powershell/m-p/450483#M101054</guid>
      <dc:creator>TomYoung</dc:creator>
      <dc:date>2021-11-30T20:37:38Z</dc:date>
    </item>
    <item>
      <title>Re: Commit-All to Specific Device Using API in Powershell</title>
      <link>https://live.paloaltonetworks.com/t5/general-topics/commit-all-to-specific-device-using-api-in-powershell/m-p/450499#M101056</link>
      <description>&lt;P&gt;Thanks for the suggestion. Unfortunately, the guidance at /api doesn't get that granular for commit-all.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It turns out that the answer was to add a&amp;nbsp;&amp;lt;/entry&amp;gt; tag after the serial number entry as shown:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;&amp;lt;entry name="&amp;lt;serial_number&amp;gt;"&amp;gt;&amp;lt;/entry&amp;gt;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;Then, to get it to run properly in Powershell, add backticks to escape quotation marks around the DG name and serial number.&lt;/P&gt;</description>
      <pubDate>Tue, 30 Nov 2021 21:12:09 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/general-topics/commit-all-to-specific-device-using-api-in-powershell/m-p/450499#M101056</guid>
      <dc:creator>OwenFuller</dc:creator>
      <dc:date>2021-11-30T21:12:09Z</dc:date>
    </item>
  </channel>
</rss>

