<?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: Issues with API using curl - &amp;quot;Method not allowed&amp;quot; in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/Issues-with-API-using-curl-quot-Method-not-allowed-quot/m-p/57956#M11341</link>
    <description>&lt;P&gt;So the actual documentation is incorrect then? If so I'll submit a support ticket. It seems like a pretty big flaw.&lt;/P&gt;</description>
    <pubDate>Mon, 14 Mar 2011 20:29:37 GMT</pubDate>
    <dc:creator>msarro</dc:creator>
    <dc:date>2011-03-14T20:29:37Z</dc:date>
    <item>
      <title>Issues with API using curl - "Method not allowed"</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Issues-with-API-using-curl-quot-Method-not-allowed-quot/m-p/57954#M11339</link>
      <description>&lt;P&gt;I am just starting to dabble with the splunk API. I am following the examples shown in the splunk documentation. The following command gives the following results:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[root@splunk-serv ~]# curl -u admin:changeme -k &lt;A href="https://localhost:8089/services/search/jobs/1299860329.83/results/" target="test_blank"&gt;https://localhost:8089/services/search/jobs/1299860329.83/results/&lt;/A&gt; -d"output_mode=csv"
&amp;lt;?xml version='1.0' encoding='UTF-8'?&amp;gt;
&amp;lt;response&amp;gt;&amp;lt;messages&amp;gt;&amp;lt;msg type='FATAL'&amp;gt;Method Not Allowed&amp;lt;/msg&amp;gt;&amp;lt;/messages&amp;gt;&amp;lt;/response&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Can anyone provide any pointers on why everything else in the documentation seems to work alright, but this doesn't? Am I querying incorrectly?&lt;/P&gt;</description>
      <pubDate>Sat, 12 Mar 2011 00:23:08 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Issues-with-API-using-curl-quot-Method-not-allowed-quot/m-p/57954#M11339</guid>
      <dc:creator>msarro</dc:creator>
      <dc:date>2011-03-12T00:23:08Z</dc:date>
    </item>
    <item>
      <title>Re: Issues with API using curl - "Method not allowed"</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Issues-with-API-using-curl-quot-Method-not-allowed-quot/m-p/57955#M11340</link>
      <description>&lt;P&gt;The problem is that using -d"..." causes curl to POST, rather than GET, the resource, which is disallowed from the REST perspective. It should work if you use GET arguments:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;curl -u admin:changeme 'https://localhost:8089/services/search/jobs/1299860329.83/results?output_mode=csv'
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sat, 12 Mar 2011 05:14:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Issues-with-API-using-curl-quot-Method-not-allowed-quot/m-p/57955#M11340</guid>
      <dc:creator>Stephen_Sorkin</dc:creator>
      <dc:date>2011-03-12T05:14:02Z</dc:date>
    </item>
    <item>
      <title>Re: Issues with API using curl - "Method not allowed"</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Issues-with-API-using-curl-quot-Method-not-allowed-quot/m-p/57956#M11341</link>
      <description>&lt;P&gt;So the actual documentation is incorrect then? If so I'll submit a support ticket. It seems like a pretty big flaw.&lt;/P&gt;</description>
      <pubDate>Mon, 14 Mar 2011 20:29:37 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Issues-with-API-using-curl-quot-Method-not-allowed-quot/m-p/57956#M11341</guid>
      <dc:creator>msarro</dc:creator>
      <dc:date>2011-03-14T20:29:37Z</dc:date>
    </item>
    <item>
      <title>Re: Issues with API using curl - "Method not allowed"</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Issues-with-API-using-curl-quot-Method-not-allowed-quot/m-p/57957#M11342</link>
      <description>&lt;P&gt;When I try this from the command line I get an error stating that the site certificate isn't correct. When I add the --insecure flag, it simply returns to the command prompt.&lt;/P&gt;

&lt;P&gt;[root@splunk-serv ~]# curl -u admin:changeme --insecure '&lt;A href="https://localhost:8089/services/search/jobs/1300110780.86/results?output_mode=csv"&gt;https://localhost:8089/services/search/jobs/1300110780.86/results?output_mode=csv&lt;/A&gt;'&lt;BR /&gt;
[root@splunk-serv ~]# &lt;/P&gt;

&lt;P&gt;Going to the same URL via a browser simply shows a blank screen.&lt;/P&gt;</description>
      <pubDate>Mon, 14 Mar 2011 20:57:33 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Issues-with-API-using-curl-quot-Method-not-allowed-quot/m-p/57957#M11342</guid>
      <dc:creator>msarro</dc:creator>
      <dc:date>2011-03-14T20:57:33Z</dc:date>
    </item>
    <item>
      <title>Re: Issues with API using curl - "Method not allowed"</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Issues-with-API-using-curl-quot-Method-not-allowed-quot/m-p/57958#M11343</link>
      <description>&lt;P&gt;If that response is empty, that means that the search job had no results. What if you ask for the XML version of the results?&lt;/P&gt;</description>
      <pubDate>Tue, 15 Mar 2011 00:55:01 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Issues-with-API-using-curl-quot-Method-not-allowed-quot/m-p/57958#M11343</guid>
      <dc:creator>Stephen_Sorkin</dc:creator>
      <dc:date>2011-03-15T00:55:01Z</dc:date>
    </item>
    <item>
      <title>Re: Issues with API using curl - "Method not allowed"</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Issues-with-API-using-curl-quot-Method-not-allowed-quot/m-p/57959#M11344</link>
      <description>&lt;P&gt;so I've been playing with this, and found that if you add -G to the command, it will work.&lt;/P&gt;

&lt;P&gt;man curl:&lt;BR /&gt;
       -G/--get&lt;BR /&gt;
              When used, this option will make all data specified with -d/--data or --data-binary to be used in a HTTP GET request instead of the POST request that otherwise would be used. The data will be appended to&lt;BR /&gt;
              the URL with a '?' separator.&lt;/P&gt;</description>
      <pubDate>Thu, 22 Mar 2012 22:58:54 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Issues-with-API-using-curl-quot-Method-not-allowed-quot/m-p/57959#M11344</guid>
      <dc:creator>jsperry</dc:creator>
      <dc:date>2012-03-22T22:58:54Z</dc:date>
    </item>
  </channel>
</rss>

