<?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: REST API returns empty results when I execute the command in Linux in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/REST-API-returns-empty-results-when-I-execute-the-command-in/m-p/83717#M21324</link>
    <description>&lt;P&gt;It worked. Thanks Stephen!&lt;/P&gt;</description>
    <pubDate>Tue, 19 Apr 2011 18:47:20 GMT</pubDate>
    <dc:creator>rajiv_kumar</dc:creator>
    <dc:date>2011-04-19T18:47:20Z</dc:date>
    <item>
      <title>REST API returns empty results when I execute the command in Linux</title>
      <link>https://community.splunk.com/t5/Splunk-Search/REST-API-returns-empty-results-when-I-execute-the-command-in/m-p/83715#M21322</link>
      <description>&lt;P&gt;I am trying to fetch results using REST API from Saved Search and getting empty response. My command is like this...&lt;BR /&gt;
curl -u admin:changeme -k &lt;A href="https://localhost:8089/services/search/jobs"&gt;https://localhost:8089/services/search/jobs&lt;/A&gt; -d"search=search sourcetype="estore-om_app" com.symantec.ecom.ep.service.misc.impl.SymEpDataCenterServiceImpl"&lt;/P&gt;

&lt;P&gt;Got response sid in below XML format:&lt;SID&gt;1303166708.128&lt;/SID&gt;&lt;/P&gt;

&lt;P&gt;I used this sid in the below command&lt;BR /&gt;
curl -u admin:changeme -k &lt;A href="https://tus1crsappdex215:8089/services/search/jobs/1303166708.128/results/"&gt;https://tus1crsappdex215:8089/services/search/jobs/1303166708.128/results/&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;Please advise me if I am doing something wrong.&lt;/P&gt;</description>
      <pubDate>Mon, 18 Apr 2011 22:55:13 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/REST-API-returns-empty-results-when-I-execute-the-command-in/m-p/83715#M21322</guid>
      <dc:creator>rajiv_kumar</dc:creator>
      <dc:date>2011-04-18T22:55:13Z</dc:date>
    </item>
    <item>
      <title>Re: REST API returns empty results when I execute the command in Linux</title>
      <link>https://community.splunk.com/t5/Splunk-Search/REST-API-returns-empty-results-when-I-execute-the-command-in/m-p/83716#M21323</link>
      <description>&lt;P&gt;You have at least one problem here with your POST. You have to escape the = with %3d in the sourcetype=...&lt;/P&gt;

&lt;P&gt;Could you try:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;curl -u admin:changeme -k &lt;A href="https://localhost:8089/services/search/jobs" target="test_blank"&gt;https://localhost:8089/services/search/jobs&lt;/A&gt; -d'search=search sourcetype%3d"estore-om_app" com.symantec.ecom.ep.service.misc.impl.SymEpDataCenterServiceImpl'
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;You can also try the "export" mode:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;curl -u admin:changeme -k &lt;A href="https://localhost:8089/services/search/jobs/export" target="test_blank"&gt;https://localhost:8089/services/search/jobs/export&lt;/A&gt; -d'search=search sourcetype%3d"estore-om_app" com.symantec.ecom.ep.service.misc.impl.SymEpDataCenterServiceImpl'
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;This gives you the results directly. If you want CSV out, you can run this as:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;curl -u admin:changeme -k &lt;A href="https://localhost:8089/services/search/jobs/export" target="test_blank"&gt;https://localhost:8089/services/search/jobs/export&lt;/A&gt; -d'search=search sourcetype%3d"estore-om_app" com.symantec.ecom.ep.service.misc.impl.SymEpDataCenterServiceImpl&amp;amp;output_mode=csv'
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 19 Apr 2011 02:29:58 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/REST-API-returns-empty-results-when-I-execute-the-command-in/m-p/83716#M21323</guid>
      <dc:creator>Stephen_Sorkin</dc:creator>
      <dc:date>2011-04-19T02:29:58Z</dc:date>
    </item>
    <item>
      <title>Re: REST API returns empty results when I execute the command in Linux</title>
      <link>https://community.splunk.com/t5/Splunk-Search/REST-API-returns-empty-results-when-I-execute-the-command-in/m-p/83717#M21324</link>
      <description>&lt;P&gt;It worked. Thanks Stephen!&lt;/P&gt;</description>
      <pubDate>Tue, 19 Apr 2011 18:47:20 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/REST-API-returns-empty-results-when-I-execute-the-command-in/m-p/83717#M21324</guid>
      <dc:creator>rajiv_kumar</dc:creator>
      <dc:date>2011-04-19T18:47:20Z</dc:date>
    </item>
    <item>
      <title>Re: REST API returns empty results when I execute the command in Linux</title>
      <link>https://community.splunk.com/t5/Splunk-Search/REST-API-returns-empty-results-when-I-execute-the-command-in/m-p/83718#M21325</link>
      <description>&lt;P&gt;It worked. But one issue is still there. I am trying to export csv format file and it seems always returning xml format.&lt;BR /&gt;
Here is my command&lt;/P&gt;

&lt;P&gt;curl -u admin:changeme -k &lt;A href="https://localhost:8089/services/search/jobs/export" target="_blank"&gt;https://localhost:8089/services/search/jobs/export&lt;/A&gt; -d'search=search sourcetype%3d"ebe_abs" PSN earliest%3d-4d&amp;amp;output_mode=csv' &amp;gt;&amp;gt; exporteddata.csv&lt;/P&gt;

&lt;P&gt;Can you please advise on this.&lt;/P&gt;

&lt;P&gt;Thanks,&lt;BR /&gt;
Rajiv&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 09:28:25 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/REST-API-returns-empty-results-when-I-execute-the-command-in/m-p/83718#M21325</guid>
      <dc:creator>rajiv_kumar</dc:creator>
      <dc:date>2020-09-28T09:28:25Z</dc:date>
    </item>
    <item>
      <title>Re: REST API returns empty results when I execute the command in Linux</title>
      <link>https://community.splunk.com/t5/Splunk-Search/REST-API-returns-empty-results-when-I-execute-the-command-in/m-p/83719#M21326</link>
      <description>&lt;P&gt;For export, output_mode=csv is a new addition to 4.2. You will have to upgrade to get this. You can replace export with "oneshot" to get csv out in 4.1.x.&lt;/P&gt;</description>
      <pubDate>Tue, 19 Apr 2011 19:14:15 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/REST-API-returns-empty-results-when-I-execute-the-command-in/m-p/83719#M21326</guid>
      <dc:creator>Stephen_Sorkin</dc:creator>
      <dc:date>2011-04-19T19:14:15Z</dc:date>
    </item>
    <item>
      <title>Re: REST API returns empty results when I execute the command in Linux</title>
      <link>https://community.splunk.com/t5/Splunk-Search/REST-API-returns-empty-results-when-I-execute-the-command-in/m-p/83720#M21327</link>
      <description>&lt;P&gt;Great. It worked.&lt;BR /&gt;
Thanks Stephen!&lt;/P&gt;</description>
      <pubDate>Tue, 19 Apr 2011 20:54:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/REST-API-returns-empty-results-when-I-execute-the-command-in/m-p/83720#M21327</guid>
      <dc:creator>rajiv_kumar</dc:creator>
      <dc:date>2011-04-19T20:54:09Z</dc:date>
    </item>
    <item>
      <title>Re: REST API returns empty results when I execute the command in Linux</title>
      <link>https://community.splunk.com/t5/Splunk-Search/REST-API-returns-empty-results-when-I-execute-the-command-in/m-p/549213#M155816</link>
      <description>&lt;P&gt;&lt;BR /&gt;HI&lt;BR /&gt;I have this issue too, I check by search with your point but it not work&lt;BR /&gt;&lt;A href="https://community.splunk.com/t5/forums/editpage/board-id/splunk-search/message-id/155815" target="_blank"&gt;https://community.splunk.com/t5/forums/editpage/board-id/splunk-search/message-id/155815&lt;/A&gt;&lt;BR /&gt;can you help me?&lt;/P&gt;</description>
      <pubDate>Sat, 24 Apr 2021 15:35:36 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/REST-API-returns-empty-results-when-I-execute-the-command-in/m-p/549213#M155816</guid>
      <dc:creator>Hamidreza74</dc:creator>
      <dc:date>2021-04-24T15:35:36Z</dc:date>
    </item>
  </channel>
</rss>

