<?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 REST api no results from sid in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/REST-api-no-results-from-sid/m-p/159778#M32397</link>
    <description>&lt;P&gt;Splunk 6.1.0 (build 206881)&lt;BR /&gt;
Mac OSX&lt;/P&gt;

&lt;P&gt;input:&lt;BR /&gt;
curl -u admin:splunker -k &lt;A href="https://localhost:8089/services/search/jobs"&gt;https://localhost:8089/services/search/jobs&lt;/A&gt; -d'search=search index%3d"*" | stats values(sourcetype) by index'&lt;/P&gt;

&lt;P&gt;results:&lt;BR /&gt;
&amp;lt;?xml version="1.0" encoding="UTF-8"?&amp;gt;&lt;BR /&gt;
&lt;RESPONSE&gt;&lt;BR /&gt;
  &lt;SID&gt;1399707661.62&lt;/SID&gt;&lt;BR /&gt;
&lt;/RESPONSE&gt;&lt;/P&gt;

&lt;P&gt;input:&lt;BR /&gt;
curl -k -u admin:splunker &lt;A href="https://localhost:8089/services/search/jobs/1399707661.62/results/"&gt;https://localhost:8089/services/search/jobs/1399707661.62/results/&lt;/A&gt; --get -d output_mode=csv&lt;/P&gt;

&lt;P&gt;How do i get the results in the most user friendly way possible? I am currently getting back no results.&lt;/P&gt;</description>
    <pubDate>Sat, 10 May 2014 07:42:25 GMT</pubDate>
    <dc:creator>bleung93</dc:creator>
    <dc:date>2014-05-10T07:42:25Z</dc:date>
    <item>
      <title>REST api no results from sid</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/REST-api-no-results-from-sid/m-p/159778#M32397</link>
      <description>&lt;P&gt;Splunk 6.1.0 (build 206881)&lt;BR /&gt;
Mac OSX&lt;/P&gt;

&lt;P&gt;input:&lt;BR /&gt;
curl -u admin:splunker -k &lt;A href="https://localhost:8089/services/search/jobs"&gt;https://localhost:8089/services/search/jobs&lt;/A&gt; -d'search=search index%3d"*" | stats values(sourcetype) by index'&lt;/P&gt;

&lt;P&gt;results:&lt;BR /&gt;
&amp;lt;?xml version="1.0" encoding="UTF-8"?&amp;gt;&lt;BR /&gt;
&lt;RESPONSE&gt;&lt;BR /&gt;
  &lt;SID&gt;1399707661.62&lt;/SID&gt;&lt;BR /&gt;
&lt;/RESPONSE&gt;&lt;/P&gt;

&lt;P&gt;input:&lt;BR /&gt;
curl -k -u admin:splunker &lt;A href="https://localhost:8089/services/search/jobs/1399707661.62/results/"&gt;https://localhost:8089/services/search/jobs/1399707661.62/results/&lt;/A&gt; --get -d output_mode=csv&lt;/P&gt;

&lt;P&gt;How do i get the results in the most user friendly way possible? I am currently getting back no results.&lt;/P&gt;</description>
      <pubDate>Sat, 10 May 2014 07:42:25 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/REST-api-no-results-from-sid/m-p/159778#M32397</guid>
      <dc:creator>bleung93</dc:creator>
      <dc:date>2014-05-10T07:42:25Z</dc:date>
    </item>
    <item>
      <title>Re: REST api no results from sid</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/REST-api-no-results-from-sid/m-p/159779#M32398</link>
      <description>&lt;P&gt;You're on the right track... just perhaps, impatient! &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;curl  -k -u admin:splunker  -d 'search=search index%3d"*" | stats values(sourcetype) by index'  &lt;A href="https://localhost:8089/servicesNS/admin/search/search/jobs"&gt;https://localhost:8089/servicesNS/admin/search/search/jobs&lt;/A&gt;&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;produces in my case:&lt;BR /&gt;&lt;BR /&gt;
&amp;lt;response&amp;gt;&lt;BR /&gt;
  &amp;lt;sid&amp;gt;1399746073.348&amp;lt;/sid&amp;gt;&lt;BR /&gt;
&amp;lt;/response&amp;gt;&lt;/P&gt;

&lt;P&gt;So I issue:&lt;/P&gt;

&lt;P&gt;curl --get -k -u admin:changed -d "output_mode=csv" -d "count=5" &lt;A href="https://localhost:8089/servicesNS/admin/search/search/jobs/1399746073.348/results"&gt;https://localhost:8089/servicesNS/admin/search/search/jobs/1399746073.348/results&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;And... low and behold I get absolutely nothing.  Why?  The job isn't finished running... &lt;BR /&gt;
you need to check on that... eventually, you'll get a response back in csv format to the stdout&lt;/P&gt;

&lt;P&gt;Take a look here... everything you want is explained:&lt;BR /&gt;&lt;BR /&gt;
&lt;A href="http://dev.splunk.com/view/basic-tutorial/SP-CAAADQT"&gt; REST tutorial&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 10 May 2014 18:27:49 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/REST-api-no-results-from-sid/m-p/159779#M32398</guid>
      <dc:creator>rsennett_splunk</dc:creator>
      <dc:date>2014-05-10T18:27:49Z</dc:date>
    </item>
    <item>
      <title>Re: REST api no results from sid</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/REST-api-no-results-from-sid/m-p/159780#M32399</link>
      <description>&lt;P&gt;Thanks you for the response, I will be doing my research into this. Will test out tonight.&lt;/P&gt;</description>
      <pubDate>Sun, 11 May 2014 18:34:10 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/REST-api-no-results-from-sid/m-p/159780#M32399</guid>
      <dc:creator>bleung93</dc:creator>
      <dc:date>2014-05-11T18:34:10Z</dc:date>
    </item>
    <item>
      <title>Re: REST api no results from sid</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/REST-api-no-results-from-sid/m-p/159781#M32400</link>
      <description>&lt;P&gt;I'm not getting sid when I curl splunk API. Please assist&lt;/P&gt;

&lt;P&gt;Expected output &lt;/P&gt;

&lt;P&gt;1258421375.19&lt;/P&gt;

&lt;P&gt;Actual output&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;curl -s -k -u 'hdcauser:hdcauser123' -o - &lt;A href="https://splunkapi.homedepot.com:8089/services/search/jobs" target="test_blank"&gt;https://splunkapi.homedepot.com:8089/services/search/jobs&lt;/A&gt; -d "search+${ENCODED_QRY}"|head

&lt;A href="https://xxxxxxxxx.xxxxxxxxx.com:8089/services/search/jobs" target="test_blank"&gt;https://xxxxxxxxx.xxxxxxxxx.com:8089/services/search/jobs&lt;/A&gt;
2016-04-20T11:07:18-04:00

&amp;lt;name&amp;gt;Splunk&amp;lt;/name&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 20 Apr 2016 15:12:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/REST-api-no-results-from-sid/m-p/159781#M32400</guid>
      <dc:creator>Ravimrawi</dc:creator>
      <dc:date>2016-04-20T15:12:02Z</dc:date>
    </item>
  </channel>
</rss>

