<?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 trying to do commit and then push from panorama with a script in Automation/API Discussions</title>
    <link>https://live.paloaltonetworks.com/t5/automation-api-discussions/trying-to-do-commit-and-then-push-from-panorama-with-a-script/m-p/516567#M3186</link>
    <description>&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Spending some time to integrate my letsencrypt setup with palo - shame that palo haven't done this yet ... thats another thread.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a script that will take the lets encrypt certs - currently it pushes them into my nginx and my F5 setup ...&lt;/P&gt;&lt;P&gt;I would like to push it into my panorama and commit - with comments and then push with comments&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;curl -F "file=@./combined.pem" "&lt;A href="https://panorama/api?key=${paAPIpassword}&amp;amp;type=import&amp;amp;category=keypair&amp;amp;certificate-name=${certname}&amp;amp;format=pem&amp;amp;target-tpl=${TName}&amp;amp;passphrase=${cpass" target="_blank" rel="noopener"&gt;https://panorama/api?key=${paAPIpassword}&amp;amp;type=import&amp;amp;category=keypair&amp;amp;certificate-name=${certname}&amp;amp;format=pem&amp;amp;target-tpl=${TName}&amp;amp;passphrase=${cpass&lt;/A&gt;}"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;That works fine .. the bit thats failing is&amp;nbsp;&lt;/P&gt;&lt;P&gt;curl "&lt;A href="https://panorama/api?key=${paAPIpassword}&amp;amp;cmd=" target="_blank" rel="noopener"&gt;https://panorama/api?key=${paAPIpassword}&amp;amp;cmd=&lt;/A&gt;&amp;lt;commit&amp;gt;&amp;lt;partial&amp;gt;&amp;lt;admin&amp;gt;&amp;lt;member&amp;gt;${paAPIuser}&amp;lt;/member&amp;gt;&amp;lt;/admin&amp;gt;&amp;lt;no-device-group/&amp;gt;&amp;lt;template&amp;gt;&amp;lt;member&amp;gt;${TName}&amp;lt;/member&amp;gt;&amp;lt;/template&amp;gt;&amp;lt;no-template-stack/&amp;gt;&amp;lt;no-log-collector-group/&amp;gt;&amp;lt;no-log-collector/&amp;gt;&amp;lt;no-wildfire-appliance-cluster/&amp;gt;&amp;lt;no-wildfire-appliance/&amp;gt;&amp;lt;device-and-network&amp;gt;excluded&amp;lt;/device-and-network&amp;gt;&amp;lt;shared-object&amp;gt;excluded&amp;lt;/shared-object&amp;gt;&amp;lt;/partial&amp;gt;&amp;lt;description&amp;gt;Commit from script ${DT}&amp;lt;/description&amp;gt;&amp;lt;/commit&amp;gt;"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I keep getting 403 ...&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a user specifically setup for this. I created an API token - and then modified the security .. does the token have the permission set at the time it was created - I presume it doesn't !!!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But I have turned off all web access and cli access and allowed just about all xml api and api - whats the difference and which one do i need above.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But I still get 403&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm at a loss&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;then what / how do i do a push&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Sun, 02 Oct 2022 09:39:02 GMT</pubDate>
    <dc:creator>Alex_Samad</dc:creator>
    <dc:date>2022-10-02T09:39:02Z</dc:date>
    <item>
      <title>trying to do commit and then push from panorama with a script</title>
      <link>https://live.paloaltonetworks.com/t5/automation-api-discussions/trying-to-do-commit-and-then-push-from-panorama-with-a-script/m-p/516567#M3186</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Spending some time to integrate my letsencrypt setup with palo - shame that palo haven't done this yet ... thats another thread.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a script that will take the lets encrypt certs - currently it pushes them into my nginx and my F5 setup ...&lt;/P&gt;&lt;P&gt;I would like to push it into my panorama and commit - with comments and then push with comments&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;curl -F "file=@./combined.pem" "&lt;A href="https://panorama/api?key=${paAPIpassword}&amp;amp;type=import&amp;amp;category=keypair&amp;amp;certificate-name=${certname}&amp;amp;format=pem&amp;amp;target-tpl=${TName}&amp;amp;passphrase=${cpass" target="_blank" rel="noopener"&gt;https://panorama/api?key=${paAPIpassword}&amp;amp;type=import&amp;amp;category=keypair&amp;amp;certificate-name=${certname}&amp;amp;format=pem&amp;amp;target-tpl=${TName}&amp;amp;passphrase=${cpass&lt;/A&gt;}"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;That works fine .. the bit thats failing is&amp;nbsp;&lt;/P&gt;&lt;P&gt;curl "&lt;A href="https://panorama/api?key=${paAPIpassword}&amp;amp;cmd=" target="_blank" rel="noopener"&gt;https://panorama/api?key=${paAPIpassword}&amp;amp;cmd=&lt;/A&gt;&amp;lt;commit&amp;gt;&amp;lt;partial&amp;gt;&amp;lt;admin&amp;gt;&amp;lt;member&amp;gt;${paAPIuser}&amp;lt;/member&amp;gt;&amp;lt;/admin&amp;gt;&amp;lt;no-device-group/&amp;gt;&amp;lt;template&amp;gt;&amp;lt;member&amp;gt;${TName}&amp;lt;/member&amp;gt;&amp;lt;/template&amp;gt;&amp;lt;no-template-stack/&amp;gt;&amp;lt;no-log-collector-group/&amp;gt;&amp;lt;no-log-collector/&amp;gt;&amp;lt;no-wildfire-appliance-cluster/&amp;gt;&amp;lt;no-wildfire-appliance/&amp;gt;&amp;lt;device-and-network&amp;gt;excluded&amp;lt;/device-and-network&amp;gt;&amp;lt;shared-object&amp;gt;excluded&amp;lt;/shared-object&amp;gt;&amp;lt;/partial&amp;gt;&amp;lt;description&amp;gt;Commit from script ${DT}&amp;lt;/description&amp;gt;&amp;lt;/commit&amp;gt;"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I keep getting 403 ...&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a user specifically setup for this. I created an API token - and then modified the security .. does the token have the permission set at the time it was created - I presume it doesn't !!!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But I have turned off all web access and cli access and allowed just about all xml api and api - whats the difference and which one do i need above.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But I still get 403&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm at a loss&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;then what / how do i do a push&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 02 Oct 2022 09:39:02 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/automation-api-discussions/trying-to-do-commit-and-then-push-from-panorama-with-a-script/m-p/516567#M3186</guid>
      <dc:creator>Alex_Samad</dc:creator>
      <dc:date>2022-10-02T09:39:02Z</dc:date>
    </item>
    <item>
      <title>Re: trying to do commit and then push from panorama with a script</title>
      <link>https://live.paloaltonetworks.com/t5/automation-api-discussions/trying-to-do-commit-and-then-push-from-panorama-with-a-script/m-p/516615#M3187</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://live.paloaltonetworks.com/t5/user/viewprofilepage/user-id/62286"&gt;@Alex_Samad&lt;/a&gt;, there's a few things to clear up to help you:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;The "commit" call is needed first to commit Panorama's candidate configuration to running, then a "commit-all" call is needed to push to managed firewalls (discussed here:&amp;nbsp;&lt;A href="https://docs.paloaltonetworks.com/pan-os/10-2/pan-os-panorama-api/pan-os-xml-api-request-types/commit-configuration-api" target="_blank"&gt;https://docs.paloaltonetworks.com/pan-os/10-2/pan-os-panorama-api/pan-os-xml-api-request-types/commit-configuration-api&lt;/A&gt;)&lt;/LI&gt;
&lt;LI&gt;XML API is what you are using here, as opposed to the REST API (discussed here:&amp;nbsp;&lt;A href="https://docs.paloaltonetworks.com/pan-os/10-2/pan-os-panorama-api/about-the-pan-os-xml-api" target="_blank"&gt;https://docs.paloaltonetworks.com/pan-os/10-2/pan-os-panorama-api/about-the-pan-os-xml-api&lt;/A&gt;), so when constructing your administrator roles, keep that in mind&lt;/LI&gt;
&lt;LI&gt;The administrator's generated API key gives access to the privileges of that administrator at the time of making API calls, not at the time the API key was generated&lt;/LI&gt;
&lt;LI&gt;If the access is incorrect, you would expect a 403 as you described:&lt;/LI&gt;
&lt;/UL&gt;
&lt;LI-CODE lang="markup"&gt;&amp;lt;response status = 'error' code = '403'&amp;gt;
    &amp;lt;result&amp;gt;
        &amp;lt;msg&amp;gt;Type [commit] not authorized for user role.&amp;lt;/msg&amp;gt;
    &amp;lt;/result&amp;gt;
&amp;lt;/response&amp;gt;&lt;/LI-CODE&gt;
&lt;UL&gt;
&lt;LI&gt;...so maybe the access needs re-configuring?&amp;nbsp;&lt;A href="https://docs.paloaltonetworks.com/panorama/10-2/panorama-admin/panorama-overview/role-based-access-control" target="_blank"&gt;https://docs.paloaltonetworks.com/panorama/10-2/panorama-admin/panorama-overview/role-based-access-control&lt;/A&gt;&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Hope that helps!&lt;/P&gt;</description>
      <pubDate>Mon, 03 Oct 2022 11:21:20 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/automation-api-discussions/trying-to-do-commit-and-then-push-from-panorama-with-a-script/m-p/516615#M3187</guid>
      <dc:creator>JimmyHolland</dc:creator>
      <dc:date>2022-10-03T11:21:20Z</dc:date>
    </item>
    <item>
      <title>Re: trying to do commit and then push from panorama with a script</title>
      <link>https://live.paloaltonetworks.com/t5/automation-api-discussions/trying-to-do-commit-and-then-push-from-panorama-with-a-script/m-p/516683#M3190</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thats very helpful, I didn't know about the commit commit-all&lt;/P&gt;&lt;P&gt;The problem is I have given the admin role all the permissions under xml api .. and I still get 403 &lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;&lt;/P&gt;&lt;P&gt;On the safe side I had also given it all of the permissions under api as well .&lt;/P&gt;&lt;P&gt;I have turned off all of the web ui&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;EDIT - I tried logging in as the user and I can't see much ... I will have to double check the permissions ...&lt;/P&gt;&lt;P&gt;EDIT2 - think this is the problem - I have assigned the role panorama profile - that looks like I can't admin the device itself.&amp;nbsp; which is interesting - cause if I give it device group and template rights not sure i will have the right to commit and push ..&amp;nbsp;&lt;/P&gt;&lt;P&gt;Edit3 .. given it all of the roles permissions I can log into the web site and commit and push, but still can't from the CLI ...&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 03 Oct 2022 21:37:59 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/automation-api-discussions/trying-to-do-commit-and-then-push-from-panorama-with-a-script/m-p/516683#M3190</guid>
      <dc:creator>Alex_Samad</dc:creator>
      <dc:date>2022-10-03T21:37:59Z</dc:date>
    </item>
    <item>
      <title>Re: trying to do commit and then push from panorama with a script</title>
      <link>https://live.paloaltonetworks.com/t5/automation-api-discussions/trying-to-do-commit-and-then-push-from-panorama-with-a-script/m-p/516733#M3191</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://live.paloaltonetworks.com/t5/user/viewprofilepage/user-id/62286"&gt;@Alex_Samad&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;I'll post screenshots of the admin role and administrator account I used, I only allowed XML API in the role and assigned that role the to the administrator account. Remember that exact options for configuring this could differ between PAN-OS versions. If you believe the administrative role-based access control is not working as expected, you can raise a ticket via your normal support process to have this investigated.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Hope that helps!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screenshot 2022-10-04 at 10.31.56.png" style="width: 400px;"&gt;&lt;img src="https://live.paloaltonetworks.com/t5/image/serverpage/image-id/44374i21AC2F2B13D9060A/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Screenshot 2022-10-04 at 10.31.56.png" alt="Screenshot 2022-10-04 at 10.31.56.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screenshot 2022-10-04 at 10.31.00.png" style="width: 400px;"&gt;&lt;img src="https://live.paloaltonetworks.com/t5/image/serverpage/image-id/44377i555C12CC33EAB922/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Screenshot 2022-10-04 at 10.31.00.png" alt="Screenshot 2022-10-04 at 10.31.00.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screenshot 2022-10-04 at 10.31.12.png" style="width: 400px;"&gt;&lt;img src="https://live.paloaltonetworks.com/t5/image/serverpage/image-id/44376i0B3D7E760B74FFE9/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Screenshot 2022-10-04 at 10.31.12.png" alt="Screenshot 2022-10-04 at 10.31.12.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screenshot 2022-10-04 at 10.31.20.png" style="width: 400px;"&gt;&lt;img src="https://live.paloaltonetworks.com/t5/image/serverpage/image-id/44375i000F709B729D092B/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Screenshot 2022-10-04 at 10.31.20.png" alt="Screenshot 2022-10-04 at 10.31.20.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screenshot 2022-10-04 at 10.31.30.png" style="width: 400px;"&gt;&lt;img src="https://live.paloaltonetworks.com/t5/image/serverpage/image-id/44373i92EABC57349F0123/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Screenshot 2022-10-04 at 10.31.30.png" alt="Screenshot 2022-10-04 at 10.31.30.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;     &lt;/P&gt;</description>
      <pubDate>Tue, 04 Oct 2022 09:36:00 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/automation-api-discussions/trying-to-do-commit-and-then-push-from-panorama-with-a-script/m-p/516733#M3191</guid>
      <dc:creator>JimmyHolland</dc:creator>
      <dc:date>2022-10-04T09:36:00Z</dc:date>
    </item>
    <item>
      <title>Re: trying to do commit and then push from panorama with a script</title>
      <link>https://live.paloaltonetworks.com/t5/automation-api-discussions/trying-to-do-commit-and-then-push-from-panorama-with-a-script/m-p/516798#M3196</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for that. Mine is the same - except I have added in the all perms from the rest api tab as well.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have already logged a case with support - taken 4 days of them wanting to do a screen session cause they don't understand .. sigh&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I tried recreating the api key ... not luck&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="c"&gt;curl 'https://panorama.yieldbroker.com/api?key=&amp;lt;APIKEY&amp;gt;&amp;amp;cmd=&amp;lt;commit&amp;gt;&amp;lt;partial&amp;gt;&amp;lt;admin&amp;gt;&amp;lt;member&amp;gt;&amp;lt;APIUSER&amp;gt;&amp;lt;/member&amp;gt;&amp;lt;/admin&amp;gt;&amp;lt;no-device-group/&amp;gt;&amp;lt;template&amp;gt;&amp;lt;member&amp;gt;YBCert&amp;lt;/member&amp;gt;&amp;lt;/template&amp;gt;&amp;lt;no-template-stack/&amp;gt;&amp;lt;no-log-collector-group/&amp;gt;&amp;lt;no-log-collector/&amp;gt;&amp;lt;no-wildfire-appliance-cluster/&amp;gt;&amp;lt;no-wildfire-appliance/&amp;gt;&amp;lt;device-and-network&amp;gt;excluded&amp;lt;/device-and-network&amp;gt;&amp;lt;shared-object&amp;gt;excluded&amp;lt;/shared-object&amp;gt;&amp;lt;/partial&amp;gt;&amp;lt;description&amp;gt;Commitfromscript20221005-262646&amp;lt;/description&amp;gt;&amp;lt;/commit&amp;gt;'&lt;/LI-CODE&gt;</description>
      <pubDate>Tue, 04 Oct 2022 19:03:47 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/automation-api-discussions/trying-to-do-commit-and-then-push-from-panorama-with-a-script/m-p/516798#M3196</guid>
      <dc:creator>Alex_Samad</dc:creator>
      <dc:date>2022-10-04T19:03:47Z</dc:date>
    </item>
    <item>
      <title>Re: trying to do commit and then push from panorama with a script</title>
      <link>https://live.paloaltonetworks.com/t5/automation-api-discussions/trying-to-do-commit-and-then-push-from-panorama-with-a-script/m-p/516894#M3197</link>
      <description>&lt;P&gt;Do you still receive a 403 like the one I posted earlier in the thread? Does it say:&lt;/P&gt;
&lt;PRE class="lia-code-sample  language-markup"&gt;&lt;CODE&gt;Type [commit] not authorized for user role.&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;If so then there must still be something that needs fixing with the Admin Role, or the assignment of the Administrator to the Admin Role, or using the wrong Administrator to generate the API key, or something along those lines... You can share (DM) me the case number if you want.&lt;/P&gt;</description>
      <pubDate>Wed, 05 Oct 2022 11:47:08 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/automation-api-discussions/trying-to-do-commit-and-then-push-from-panorama-with-a-script/m-p/516894#M3197</guid>
      <dc:creator>JimmyHolland</dc:creator>
      <dc:date>2022-10-05T11:47:08Z</dc:date>
    </item>
    <item>
      <title>Re: trying to do commit and then push from panorama with a script</title>
      <link>https://live.paloaltonetworks.com/t5/automation-api-discussions/trying-to-do-commit-and-then-push-from-panorama-with-a-script/m-p/517892#M3208</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Trying to work with palo support - 2 weeks .... 1 week person didn't understand ... 2nd week got somebody enthusiastic, 5 days nothing.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I tried setting the role to super user ... that failed as well !&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;lt;response status = 'error' code = '400'&amp;gt;&amp;lt;result&amp;gt;&amp;lt;msg&amp;gt;Missing value for parameter &amp;amp;quot;type&amp;amp;quot;.&amp;lt;/msg&amp;gt;&amp;lt;/result&amp;gt;&amp;lt;/response&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;sent him updated tech support and details .. silence ...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;curl -F "file=@./combined.pem" "&lt;A href="https://panorama/api?key=${paAPIpassword}&amp;amp;type=import&amp;amp;category=keypair&amp;amp;certificate-name=decrypt&amp;amp;format=pem&amp;amp;target-tpl=YBCert&amp;amp;passphrase=xXxXxX" target="_blank"&gt;https://panorama/api?key=${paAPIpassword}&amp;amp;type=import&amp;amp;category=keypair&amp;amp;certificate-name=decrypt&amp;amp;format=pem&amp;amp;target-tpl=YBCert&amp;amp;passphrase=xXxXxX&lt;/A&gt;"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;curl "&lt;A href="https://panorama/api?key=${paAPIpassword}&amp;amp;cmd=" target="_blank"&gt;https://panorama/api?key=${paAPIpassword}&amp;amp;cmd=&lt;/A&gt;&amp;lt;commit&amp;gt;&amp;lt;/commit&amp;gt;"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 14 Oct 2022 00:17:43 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/automation-api-discussions/trying-to-do-commit-and-then-push-from-panorama-with-a-script/m-p/517892#M3208</guid>
      <dc:creator>Alex_Samad</dc:creator>
      <dc:date>2022-10-14T00:17:43Z</dc:date>
    </item>
    <item>
      <title>Re: trying to do commit and then push from panorama with a script</title>
      <link>https://live.paloaltonetworks.com/t5/automation-api-discussions/trying-to-do-commit-and-then-push-from-panorama-with-a-script/m-p/517928#M3209</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://live.paloaltonetworks.com/t5/user/viewprofilepage/user-id/62286"&gt;@Alex_Samad&lt;/a&gt;, the response you get now (400 and "Missing value...") shows that your admin user can talk to the API, you are no longer getting 403 "unauthorised"). This shows your original problem was around admin users and/or roles.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The new error means your API call is not constructed correctly. The API calls are below, it looks like your commit API call is missing the "type" parameter per the 400 error. After commit to Panorama, you would then push to the firewalls (managed devices)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;# Upload keypair
https://{{host}}/api/?key={{key}}&amp;amp;type=import&amp;amp;category=keypair&amp;amp;format=pem&amp;amp;certificate-name={{cert-name}}&amp;amp;target-tpl={{template-name}}&amp;amp;passphrase={{passphrase}}

# Commit to Panorama
https://{{host}}/api/?key={{key}}&amp;amp;type=commit&amp;amp;cmd=&amp;lt;commit-all&amp;gt;&amp;lt;/commit-all&amp;gt;

# Push to managed devices using relavant template stack
https://{{host}}/api?key={{key}}&amp;amp;type=commit&amp;amp;action=all&amp;amp;cmd=&amp;lt;commit-all&amp;gt;&amp;lt;template-stack&amp;gt;&amp;lt;name&amp;gt;{{tpl-stack-name}}&amp;lt;/name&amp;gt;&amp;lt;/template-stack&amp;gt;&amp;lt;/commit-all&amp;gt;&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Hope this helps&lt;/P&gt;</description>
      <pubDate>Fri, 14 Oct 2022 09:27:25 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/automation-api-discussions/trying-to-do-commit-and-then-push-from-panorama-with-a-script/m-p/517928#M3209</guid>
      <dc:creator>JimmyHolland</dc:creator>
      <dc:date>2022-10-14T09:27:25Z</dc:date>
    </item>
    <item>
      <title>Re: trying to do commit and then push from panorama with a script</title>
      <link>https://live.paloaltonetworks.com/t5/automation-api-discussions/trying-to-do-commit-and-then-push-from-panorama-with-a-script/m-p/517992#M3210</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;OMG - i double checked it with /api browser, sigh missed the obvious&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;As for the permission - I have given the role all of the permissions - apart from cli&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;also used the web debugger to get the commands&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&amp;lt;request cmd="op" cookie="X" target="panorama"&amp;gt;
  &amp;lt;operations xml="yes"&amp;gt;
    &amp;lt;commit-and-push&amp;gt;
      &amp;lt;description&amp;gt;Test Commit Push&amp;lt;/description&amp;gt;
      &amp;lt;push-to&amp;gt;
        &amp;lt;template-stack-config&amp;gt;
          &amp;lt;merge-with-candidate-cfg&amp;gt;yes&amp;lt;/merge-with-candidate-cfg&amp;gt;
          &amp;lt;force-template-values&amp;gt;no&amp;lt;/force-template-values&amp;gt;
          &amp;lt;template-stack&amp;gt;
            &amp;lt;entry name="Stacka_AP"&amp;gt;
              &amp;lt;device&amp;gt;
                &amp;lt;member&amp;gt;1&amp;lt;/member&amp;gt;
              &amp;lt;/device&amp;gt;
            &amp;lt;/entry&amp;gt;
            &amp;lt;entry name="Stacky"&amp;gt;
              &amp;lt;device&amp;gt;
                &amp;lt;member&amp;gt;2&amp;lt;/member&amp;gt;
              &amp;lt;/device&amp;gt;
            &amp;lt;/entry&amp;gt;
            &amp;lt;entry name="StackP"&amp;gt;
              &amp;lt;device&amp;gt;
                &amp;lt;member&amp;gt;3&amp;lt;/member&amp;gt;
              &amp;lt;/device&amp;gt;
            &amp;lt;/entry&amp;gt;
          &amp;lt;/template-stack&amp;gt;
          &amp;lt;description&amp;gt;Test Commit Push&amp;lt;/description&amp;gt;
        &amp;lt;/template-stack-config&amp;gt;
      &amp;lt;/push-to&amp;gt;
    &amp;lt;/commit-and-push&amp;gt;
  &amp;lt;/operations&amp;gt;
&amp;lt;/request&amp;gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Found this when doing a commit and push from the GUI. how does this translate into a API call what would be the type ? op ?&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;EDIT :- found my own answer - not commit-push via xml api ... WTF&lt;/P&gt;&lt;P&gt;So commit - starts job - you get job id .. okay&amp;nbsp; how do you work out if a job is finished - how do i know when to do the commit-all&amp;nbsp;&lt;/P&gt;&lt;P&gt;Side not how can i do a commit push from the cli . I could ssh there.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It just seems sometime the people who create the panos interface have no idea..&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 14 Oct 2022 23:08:53 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/automation-api-discussions/trying-to-do-commit-and-then-push-from-panorama-with-a-script/m-p/517992#M3210</guid>
      <dc:creator>Alex_Samad</dc:creator>
      <dc:date>2022-10-14T23:08:53Z</dc:date>
    </item>
    <item>
      <title>Re: trying to do commit and then push from panorama with a script</title>
      <link>https://live.paloaltonetworks.com/t5/automation-api-discussions/trying-to-do-commit-and-then-push-from-panorama-with-a-script/m-p/518209#M3211</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://live.paloaltonetworks.com/t5/user/viewprofilepage/user-id/62286"&gt;@Alex_Samad&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;"&lt;SPAN&gt;Found this when doing a commit and push from the GUI. how does this translate into a API call what would be the type ? op ?&amp;nbsp; "&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;No, the commit operations are their own type, as shown in my previous response on 14 October. More docs here FYI: &lt;A href="https://docs.paloaltonetworks.com/pan-os/10-2/pan-os-panorama-api/pan-os-xml-api-request-types/commit-configuration-api" target="_blank"&gt;https://docs.paloaltonetworks.com/pan-os/10-2/pan-os-panorama-api/pan-os-xml-api-request-types/commit-configuration-api&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;"&lt;SPAN&gt;okay&amp;nbsp; how do you work out if a job is finished"&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;This is also in the docs, see the link just above. Commit works as an asynchronous operation, allowing the script/program to not be held waiting for a synchronous&amp;nbsp;response.&amp;nbsp;The API call would be:&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;https://{{host}}/api?key={{key}}&amp;amp;type=op&amp;amp;cmd=&amp;lt;show&amp;gt;&amp;lt;jobs&amp;gt;&amp;lt;id&amp;gt;{{job}}&amp;lt;/id&amp;gt;&amp;lt;/jobs&amp;gt;&amp;lt;/show&amp;gt;&lt;/LI-CODE&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;"Side not how can i do a commit push from the cli . I could ssh there."&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Commit to Panorama is done in configuration mode:&lt;/SPAN&gt;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;admin@Panorama# commit 
+ description   Enter commit description
&amp;gt; force         force 
&amp;gt; partial       partial 
  &amp;lt;Enter&amp;gt;       Finish input&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Push to managed devices is done in operational mode:&lt;/SPAN&gt;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;admin@Panorama&amp;gt; commit-all 
&amp;gt; log-collector-config        log-collector-config 
&amp;gt; shared-policy               shared-policy 
&amp;gt; template                    template 
&amp;gt; template-stack              template-stack 
&amp;gt; wildfire-appliance-config   wildfire-appliance-config &lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Hope this helps!&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 18 Oct 2022 10:29:49 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/automation-api-discussions/trying-to-do-commit-and-then-push-from-panorama-with-a-script/m-p/518209#M3211</guid>
      <dc:creator>JimmyHolland</dc:creator>
      <dc:date>2022-10-18T10:29:49Z</dc:date>
    </item>
  </channel>
</rss>

