<?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: ‘HTTP/1.1 406 Not Acceptable’ response from API when using CURL in Automation/API Discussions</title>
    <link>https://live.paloaltonetworks.com/t5/automation-api-discussions/http-1-1-406-not-acceptable-response-from-api-when-using-curl/m-p/76430#M1218</link>
    <description>&lt;P&gt;I've added&amp;nbsp;-H "Accept: text/javascript, text/html, application/xml, */*" to curl but still the same error. At least I see Accept header set correctly in the request&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&amp;gt; User-Agent: curl/7.19.7 (x86_64-redhat-linux-gnu) libcurl/7.19.7 NSS/3.18 Basic ECC zlib/1.2.3 libidn/1.18 libssh2/1.4.2
&amp;gt; Host: 10.95.2.234
&amp;gt; Accept: text/javascript, text/html, application/xml, */*
&amp;gt; 
&amp;lt; HTTP/1.1 406 Not Acceptable
&amp;lt; Server: 
&amp;lt; Date: Thu, 14 Apr 2016 16:56:32 GMT
&amp;lt; Content-Type: text/html
&amp;lt; Transfer-Encoding: chunked
&amp;lt; Connection: keep-alive
&amp;lt; ETag: "2b27-5c-5596c066"
&amp;lt; X-FRAME-OPTIONS: SAMEORIGIN&lt;/PRE&gt;</description>
    <pubDate>Thu, 14 Apr 2016 16:57:28 GMT</pubDate>
    <dc:creator>niuk</dc:creator>
    <dc:date>2016-04-14T16:57:28Z</dc:date>
    <item>
      <title>‘HTTP/1.1 406 Not Acceptable’ response from API when using CURL</title>
      <link>https://live.paloaltonetworks.com/t5/automation-api-discussions/http-1-1-406-not-acceptable-response-from-api-when-using-curl/m-p/76426#M1217</link>
      <description>&lt;P&gt;I am running curl against&amp;nbsp;the API URL where I have VM-1000-HV PAN (7.0.1) and getting ‘HTTP/1.1 406 Not Acceptable’ response (see output below). The same URL works fine in the browser (just copied and pasted to Chrome), so it is correct.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;$ curl -v --insecure "https://10.95.2.234/esp/restapi.esp?type=op&amp;amp;cmd=&amp;lt;show&amp;gt;&amp;lt;running&amp;gt;&amp;lt;resource-monitor&amp;gt;&amp;lt;second&amp;gt;&amp;lt;/second&amp;gt;&amp;lt;/resource-monitor&amp;gt;&amp;lt;/running&amp;gt;&amp;lt;/show&amp;gt;&amp;amp;key=LUFRPT0wOFBSTWxOdGIvazFxRkc2b2VpZnNnTUEyc1E9QnRPY0ZGNWhMd3Rya3l6VndyZnVhUT09 ="
* About to connect() to 10.95.2.234 port 443 (#0)
*&amp;nbsp;&amp;nbsp; Trying 10.95.2.234... connected
* Connected to 10.95.2.234 (10.95.2.234) port 443 (#0)
* Initializing NSS with certpath: sql:/etc/pki/nssdb
* warning: ignoring value of ssl.verifyhost
* skipping SSL peer certificate verification
* SSL connection using TLS_RSA_WITH_AES_256_CBC_SHA
* Server certificate:
*&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; subject: E=support@paloaltonetworks.com,CN=localhost,OU=Support,O=Palo Alto Networks,L=Sunnyvale,ST=CA,C=US
*&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; start date: Jul 12 22:18:24 2010 GMT
*&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; expire date: Jul 11 22:18:24 2020 GMT
*&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; common name: localhost
*&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; issuer: E=support@paloaltonetworks.com,CN=localhost,OU=Support,O=Palo Alto Networks,L=Sunnyvale,ST=CA,C=US
&amp;gt; GET /esp/restapi.esp?type=op&amp;amp;cmd=&amp;lt;show&amp;gt;&amp;lt;running&amp;gt;&amp;lt;resource-monitor&amp;gt;&amp;lt;second&amp;gt;&amp;lt;/second&amp;gt;&amp;lt;/resource-monitor&amp;gt;&amp;lt;/running&amp;gt;&amp;lt;/show&amp;gt;&amp;amp;key=LUFRPT0wOFBSTWxOdGIvazFxRkc2b2VpZnNnTUEyc1E9QnRPY0ZGNWhMd3Rya3l6VndyZnVhUT09 = HTTP/1.1
&amp;gt; User-Agent: curl/7.19.7 (x86_64-redhat-linux-gnu) libcurl/7.19.7 NSS/3.18 Basic ECC zlib/1.2.3 libidn/1.18 libssh2/1.4.2
&amp;gt; Host: 10.95.2.234
&amp;gt; Accept: */*
&amp;gt;
&amp;lt; HTTP/1.1 406 Not Acceptable
&amp;lt; Server:
&amp;lt; Date: Thu, 14 Apr 2016 14:28:55 GMT
&amp;lt; Content-Type: text/html
&amp;lt; Transfer-Encoding: chunked
&amp;lt; Connection: keep-alive
&amp;lt; ETag: "2b27-5c-5596c066"
&amp;lt; X-FRAME-OPTIONS: SAMEORIGIN
&amp;lt;
* Connection #0 to host 10.95.2.234 left intact
* Closing connection #0
[irek@nms01m ~]$&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 14 Apr 2016 16:40:41 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/automation-api-discussions/http-1-1-406-not-acceptable-response-from-api-when-using-curl/m-p/76426#M1217</guid>
      <dc:creator>niuk</dc:creator>
      <dc:date>2016-04-14T16:40:41Z</dc:date>
    </item>
    <item>
      <title>Re: ‘HTTP/1.1 406 Not Acceptable’ response from API when using CURL</title>
      <link>https://live.paloaltonetworks.com/t5/automation-api-discussions/http-1-1-406-not-acceptable-response-from-api-when-using-curl/m-p/76430#M1218</link>
      <description>&lt;P&gt;I've added&amp;nbsp;-H "Accept: text/javascript, text/html, application/xml, */*" to curl but still the same error. At least I see Accept header set correctly in the request&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&amp;gt; User-Agent: curl/7.19.7 (x86_64-redhat-linux-gnu) libcurl/7.19.7 NSS/3.18 Basic ECC zlib/1.2.3 libidn/1.18 libssh2/1.4.2
&amp;gt; Host: 10.95.2.234
&amp;gt; Accept: text/javascript, text/html, application/xml, */*
&amp;gt; 
&amp;lt; HTTP/1.1 406 Not Acceptable
&amp;lt; Server: 
&amp;lt; Date: Thu, 14 Apr 2016 16:56:32 GMT
&amp;lt; Content-Type: text/html
&amp;lt; Transfer-Encoding: chunked
&amp;lt; Connection: keep-alive
&amp;lt; ETag: "2b27-5c-5596c066"
&amp;lt; X-FRAME-OPTIONS: SAMEORIGIN&lt;/PRE&gt;</description>
      <pubDate>Thu, 14 Apr 2016 16:57:28 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/automation-api-discussions/http-1-1-406-not-acceptable-response-from-api-when-using-curl/m-p/76430#M1218</guid>
      <dc:creator>niuk</dc:creator>
      <dc:date>2016-04-14T16:57:28Z</dc:date>
    </item>
  </channel>
</rss>

