<?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: API Results browser versus cURL in Automation/API Discussions</title>
    <link>https://live.paloaltonetworks.com/t5/automation-api-discussions/api-results-browser-versus-curl/m-p/36185#M861</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;you might run 'tail follow yes mp-log appWeb.log' in the CLI then do a request with browser then&lt;/P&gt;&lt;P&gt;curl and compare the logs.&amp;nbsp; In particular the line with the key to see if there is a difference:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;panPhpSymbolLookupInArray(pan_php.c:197): panPhpSymbolLookupInArray, _REQUEST[key] = kxA5lTLW3OoJ5E/8KCLRfplJvALJ1cAJufitTERVxpY=&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 18 Jun 2012 20:49:21 GMT</pubDate>
    <dc:creator>ksteves1</dc:creator>
    <dc:date>2012-06-18T20:49:21Z</dc:date>
    <item>
      <title>API Results browser versus cURL</title>
      <link>https://live.paloaltonetworks.com/t5/automation-api-discussions/api-results-browser-versus-curl/m-p/36182#M858</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm trying to setup automatic config backups via the API per this article:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A class="jive-link-external-small" href="https://live.paloaltonetworks.com/docs/DOC-1714"&gt;https://live.paloaltonetworks.com/docs/DOC-1714&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I use a command like this to get my key:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A class="active_link" href="https://pan-firewall.example.com/esp/restapi.esp?type=keygen&amp;amp;user=jmesser&amp;amp;password=notmypassword" style="color: #4262a1; font-family: 'courier new', courier; font-size: 12px; background-color: #f8f4e6;"&gt;https://pan-firewall.example.com/esp/restapi.esp?type=keygen&amp;amp;user=jmesser&amp;amp;password=notmypassword&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And then use the key in this command to get the config:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A class="active_link" href="https://pan-firewall.example.com/esp/restapi.esp?type=config&amp;amp;action=show&amp;amp;key=abcde-random-bunch-of-letters-abcde" style="color: #4262a1; font-family: 'courier new', courier; font-size: 12px; background-color: #f8f4e6;"&gt;https://pan-firewall.example.com/esp/restapi.esp?type=config&amp;amp;action=show&amp;amp;key=abcde-random-bunch-of-letters-abcde&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have superuser permissions and these commands work great in my browser. I've tested both Chrome and Firefox. I get the key no problem and the config comes up without issue. Slick. But what I can't figure out is that when I use cURL or wget instead of the browser I get a 403 "User not authorized to perform this operation" error. The command I use is simply:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;curl --insecure &amp;lt;the_URLs_above&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Anybody know why the browser would work but not cURL? I just can't think why they would be different.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Chris&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 15 Jun 2012 16:35:34 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/automation-api-discussions/api-results-browser-versus-curl/m-p/36182#M858</guid>
      <dc:creator>GV27</dc:creator>
      <dc:date>2012-06-15T16:35:34Z</dc:date>
    </item>
    <item>
      <title>Re: API Results browser versus cURL</title>
      <link>https://live.paloaltonetworks.com/t5/automation-api-discussions/api-results-browser-versus-curl/m-p/36183#M859</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;What is the PAN-OS version?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In 4.0 the user must be superuser.&lt;/P&gt;&lt;P&gt;In 4.1 the user can be superreader, though I recall it not working in early 4.1.x versions.&amp;nbsp; superreader works for me with action=show using 4.1.6.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 18 Jun 2012 19:59:27 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/automation-api-discussions/api-results-browser-versus-curl/m-p/36183#M859</guid>
      <dc:creator>ksteves1</dc:creator>
      <dc:date>2012-06-18T19:59:27Z</dc:date>
    </item>
    <item>
      <title>Re: API Results browser versus cURL</title>
      <link>https://live.paloaltonetworks.com/t5/automation-api-discussions/api-results-browser-versus-curl/m-p/36184#M860</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm running 4.1.6 and am using a superuser account. It works fine with a browser. Just not from the command line.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 18 Jun 2012 20:01:43 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/automation-api-discussions/api-results-browser-versus-curl/m-p/36184#M860</guid>
      <dc:creator>GV27</dc:creator>
      <dc:date>2012-06-18T20:01:43Z</dc:date>
    </item>
    <item>
      <title>Re: API Results browser versus cURL</title>
      <link>https://live.paloaltonetworks.com/t5/automation-api-discussions/api-results-browser-versus-curl/m-p/36185#M861</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;you might run 'tail follow yes mp-log appWeb.log' in the CLI then do a request with browser then&lt;/P&gt;&lt;P&gt;curl and compare the logs.&amp;nbsp; In particular the line with the key to see if there is a difference:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;panPhpSymbolLookupInArray(pan_php.c:197): panPhpSymbolLookupInArray, _REQUEST[key] = kxA5lTLW3OoJ5E/8KCLRfplJvALJ1cAJufitTERVxpY=&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 18 Jun 2012 20:49:21 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/automation-api-discussions/api-results-browser-versus-curl/m-p/36185#M861</guid>
      <dc:creator>ksteves1</dc:creator>
      <dc:date>2012-06-18T20:49:21Z</dc:date>
    </item>
  </channel>
</rss>

