<?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: User-ID XML-API with cURL in Automation/API Discussions</title>
    <link>https://live.paloaltonetworks.com/t5/automation-api-discussions/user-id-xml-api-with-curl/m-p/8304#M231</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Just out of curiosity what's the fix? Is it to respond with an HTTP status code after the POST succeeds?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 11 Mar 2013 15:08:11 GMT</pubDate>
    <dc:creator>ericgearhart</dc:creator>
    <dc:date>2013-03-11T15:08:11Z</dc:date>
    <item>
      <title>User-ID XML-API with cURL</title>
      <link>https://live.paloaltonetworks.com/t5/automation-api-discussions/user-id-xml-api-with-curl/m-p/8297#M224</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Everyone.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have been playing with a script to effectively write my own PAN user agent for a rather specific reason.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I can confirm that my script generates a valid xml script and I can post it via the api browser and see that the IP address and new username correlate.&lt;/P&gt;&lt;P&gt;The bit where I get stuck is getting cURL to post the the xml file to the api. I am using the following command:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;SPAN&gt;curl --insecure --form file=@output.xml "&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://192.168.60.100/api/?type=user-id&amp;amp;action=set&amp;amp;key=INSERT-KEY-HERE"&gt;https://192.168.1.1/api/?type=user-id&amp;amp;action=set&amp;amp;key=INSERT-KEY-HERE&lt;/A&gt;&lt;SPAN&gt;"&lt;/SPAN&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and receive the following error back:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;lt;response status = 'error' code = '400'&amp;gt;&amp;lt;result&amp;gt;&amp;lt;msg&amp;gt;No file uploaded&amp;lt;/msg&amp;gt;&amp;lt;/result&amp;gt;&amp;lt;/response&amp;gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;any help would be much appreciated thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 11 Mar 2013 01:50:12 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/automation-api-discussions/user-id-xml-api-with-curl/m-p/8297#M224</guid>
      <dc:creator>loki</dc:creator>
      <dc:date>2013-03-11T01:50:12Z</dc:date>
    </item>
    <item>
      <title>Re: User-ID XML-API with cURL</title>
      <link>https://live.paloaltonetworks.com/t5/automation-api-discussions/user-id-xml-api-with-curl/m-p/8298#M225</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;also, when I try this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;SPAN&gt;wget --no-check-certificate --post-file output.xml "&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://192.168.1.1/api/?type=user-id&amp;amp;action=set&amp;amp;client=wget&amp;amp;file-name=output.xml"&gt;https://192.168.1.1/api/?type=user-id&amp;amp;action=set&amp;amp;client=wget&amp;amp;file-name=output.xml&lt;/A&gt;&lt;SPAN&gt;"&lt;/SPAN&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the file is processed by the api and I can see the user to ip mapping, however wget continues to retry the command as it is expecting a response&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 11 Mar 2013 02:00:17 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/automation-api-discussions/user-id-xml-api-with-curl/m-p/8298#M225</guid>
      <dc:creator>loki</dc:creator>
      <dc:date>2013-03-11T02:00:17Z</dc:date>
    </item>
    <item>
      <title>Re: User-ID XML-API with cURL</title>
      <link>https://live.paloaltonetworks.com/t5/automation-api-discussions/user-id-xml-api-with-curl/m-p/8299#M226</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I know this is a ridiculous sounding hack, but couldn't you simply set wget's 'retries' option to 1 and call it a day?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;‘-t number’
‘--tries=number’
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Set number of retries to number. Specify 0 or ‘inf’ for infinite retrying. 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; The default is to retry 20 times, with the exception of fatal errors like 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; “connection refused” or “not found” (404), which are not retried. 
&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 11 Mar 2013 02:17:18 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/automation-api-discussions/user-id-xml-api-with-curl/m-p/8299#M226</guid>
      <dc:creator>ericgearhart</dc:creator>
      <dc:date>2013-03-11T02:17:18Z</dc:date>
    </item>
    <item>
      <title>Re: User-ID XML-API with cURL</title>
      <link>https://live.paloaltonetworks.com/t5/automation-api-discussions/user-id-xml-api-with-curl/m-p/8300#M227</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;definitely wont be calling it a day, but this *may* get me out of the woods for now and only because I am in a hurry&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 11 Mar 2013 02:20:13 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/automation-api-discussions/user-id-xml-api-with-curl/m-p/8300#M227</guid>
      <dc:creator>loki</dc:creator>
      <dc:date>2013-03-11T02:20:13Z</dc:date>
    </item>
    <item>
      <title>Re: User-ID XML-API with cURL</title>
      <link>https://live.paloaltonetworks.com/t5/automation-api-discussions/user-id-xml-api-with-curl/m-p/8301#M228</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes I meant "call it a day" as a relative term, just to get it temporarily working &lt;img id="smileyhappy" class="emoticon emoticon-smileyhappy" src="https://live.paloaltonetworks.com/i/smilies/16x16_smiley-happy.png" alt="Smiley Happy" title="Smiley Happy" /&gt; I suppose the response from the PA should be a 200 'OK' that curl or wget never receives... might be a bug report you have to end up working with support on&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 11 Mar 2013 02:30:34 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/automation-api-discussions/user-id-xml-api-with-curl/m-p/8301#M228</guid>
      <dc:creator>ericgearhart</dc:creator>
      <dc:date>2013-03-11T02:30:34Z</dc:date>
    </item>
    <item>
      <title>Re: User-ID XML-API with cURL</title>
      <link>https://live.paloaltonetworks.com/t5/automation-api-discussions/user-id-xml-api-with-curl/m-p/8302#M229</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Looks like a '201 Created' is the correct response to a POST:&lt;/P&gt;&lt;P&gt;&lt;A class="active_link" href="http://stackoverflow.com/questions/420103/what-is-the-correct-response-to-an-http-post-request" title="http://stackoverflow.com/questions/420103/what-is-the-correct-response-to-an-http-post-request"&gt;asp.net mvc - What is the correct response to an HTTP POST request? - Stack Overflow&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you can get a pcap of the request/response from and to the PA device (you could even pull down the SSL certificate and load it into Wireshark to decrypt the SSL session), and show that the PA never responds appropriately to the HTTP POST that might help your case with support too&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 11 Mar 2013 02:32:42 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/automation-api-discussions/user-id-xml-api-with-curl/m-p/8302#M229</guid>
      <dc:creator>ericgearhart</dc:creator>
      <dc:date>2013-03-11T02:32:42Z</dc:date>
    </item>
    <item>
      <title>Re: User-ID XML-API with cURL</title>
      <link>https://live.paloaltonetworks.com/t5/automation-api-discussions/user-id-xml-api-with-curl/m-p/8303#M230</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The behavior you are seeing with cURL is a known issue which has been fixed and is currently targeted to be included in PAN-OS 5.0.4.&amp;nbsp; The open bug number is 48966.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 11 Mar 2013 15:05:49 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/automation-api-discussions/user-id-xml-api-with-curl/m-p/8303#M230</guid>
      <dc:creator>kfindlen</dc:creator>
      <dc:date>2013-03-11T15:05:49Z</dc:date>
    </item>
    <item>
      <title>Re: User-ID XML-API with cURL</title>
      <link>https://live.paloaltonetworks.com/t5/automation-api-discussions/user-id-xml-api-with-curl/m-p/8304#M231</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Just out of curiosity what's the fix? Is it to respond with an HTTP status code after the POST succeeds?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 11 Mar 2013 15:08:11 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/automation-api-discussions/user-id-xml-api-with-curl/m-p/8304#M231</guid>
      <dc:creator>ericgearhart</dc:creator>
      <dc:date>2013-03-11T15:08:11Z</dc:date>
    </item>
    <item>
      <title>Re: User-ID XML-API with cURL</title>
      <link>https://live.paloaltonetworks.com/t5/automation-api-discussions/user-id-xml-api-with-curl/m-p/8305#M232</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I don't have much detail, but it is related to some validation checks being applied incorrectly when cURL was used.&amp;nbsp; Due to the failed check the device would ignore the uploaded file and not create a user mapping based on the file.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 11 Mar 2013 15:21:36 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/automation-api-discussions/user-id-xml-api-with-curl/m-p/8305#M232</guid>
      <dc:creator>kfindlen</dc:creator>
      <dc:date>2013-03-11T15:21:36Z</dc:date>
    </item>
    <item>
      <title>Re: User-ID XML-API with cURL</title>
      <link>https://live.paloaltonetworks.com/t5/automation-api-discussions/user-id-xml-api-with-curl/m-p/8306#M233</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Would it be also fair to say that the wget waiting for a response from the PAN and not getting one could be related to this as well?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;also, do we have a rough eta on a release date for 5.0.4?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 11 Mar 2013 20:54:22 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/automation-api-discussions/user-id-xml-api-with-curl/m-p/8306#M233</guid>
      <dc:creator>loki</dc:creator>
      <dc:date>2013-03-11T20:54:22Z</dc:date>
    </item>
    <item>
      <title>Re: User-ID XML-API with cURL</title>
      <link>https://live.paloaltonetworks.com/t5/automation-api-discussions/user-id-xml-api-with-curl/m-p/8307#M234</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;ffs 5.0.3 is just out and you already want 5.0.4? &lt;img id="smileyhappy" class="emoticon emoticon-smileyhappy" src="https://live.paloaltonetworks.com/i/smilies/16x16_smiley-happy.png" alt="Smiley Happy" title="Smiley Happy" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 11 Mar 2013 22:59:06 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/automation-api-discussions/user-id-xml-api-with-curl/m-p/8307#M234</guid>
      <dc:creator>mikand</dc:creator>
      <dc:date>2013-03-11T22:59:06Z</dc:date>
    </item>
    <item>
      <title>Re: User-ID XML-API with cURL</title>
      <link>https://live.paloaltonetworks.com/t5/automation-api-discussions/user-id-xml-api-with-curl/m-p/8308#M235</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;There is no ETA on 5.0.4 at this time.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 11 Mar 2013 23:06:52 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/automation-api-discussions/user-id-xml-api-with-curl/m-p/8308#M235</guid>
      <dc:creator>kfindlen</dc:creator>
      <dc:date>2013-03-11T23:06:52Z</dc:date>
    </item>
    <item>
      <title>Re: User-ID XML-API with cURL</title>
      <link>https://live.paloaltonetworks.com/t5/automation-api-discussions/user-id-xml-api-with-curl/m-p/8309#M236</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;only because the fix is described (hopefully) in 5.0.4 &lt;img id="smileywink" class="emoticon emoticon-smileywink" src="https://live.paloaltonetworks.com/i/smilies/16x16_smiley-wink.png" alt="Smiley Wink" title="Smiley Wink" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 11 Mar 2013 23:09:23 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/automation-api-discussions/user-id-xml-api-with-curl/m-p/8309#M236</guid>
      <dc:creator>loki</dc:creator>
      <dc:date>2013-03-11T23:09:23Z</dc:date>
    </item>
  </channel>
</rss>

