<?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 oneshot blocking saved search in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/REST-API-oneshot-blocking-saved-search/m-p/18400#M2501</link>
    <description>&lt;P&gt;I've tried OData many thanks to Neeraj Luthra. but I'm what I'm trying to do probably doesn't require OData. The problem I'm facing is while OData works nicely out of the box, excel parses the XML it generates in a very verbose manner giving me much more data than I need. I'd rather not have to debug that side of things if Splunk REST API will do the trick for me.&lt;/P&gt;</description>
    <pubDate>Wed, 22 May 2013 09:09:09 GMT</pubDate>
    <dc:creator>leecaf</dc:creator>
    <dc:date>2013-05-22T09:09:09Z</dc:date>
    <item>
      <title>REST API oneshot blocking saved search</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/REST-API-oneshot-blocking-saved-search/m-p/18397#M2498</link>
      <description>&lt;P&gt;EDIT:&lt;BR /&gt;
I've gotten some help from Splunk support team and now can get oneshot blocking calls working using the url below:&lt;/P&gt;

&lt;P&gt;&lt;A href="https://localhost:8089/services/search/jobs?exec_mode=oneshot&amp;amp;output_mode=json&amp;amp;search=%22search"&gt;https://localhost:8089/services/search/jobs?exec_mode=oneshot&amp;amp;output_mode=json&amp;amp;search="search&lt;/A&gt; index=_internal | head 10"&lt;/P&gt;

&lt;P&gt;however it is unclear to me how I would invoke a oneshot REST call to a saved service. I'm guessing it would look something like the url below but haven't had any success after playign with a few combinations usually a '404 not found':&lt;/P&gt;

&lt;P&gt;&lt;A href="https://localhost:8089/saved/searches/%7Bname%7D?exec_mode=oneshot&amp;amp;output_mode=json"&gt;https://localhost:8089/saved/searches/{name}?exec_mode=oneshot&amp;amp;output_mode=json&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;can someone help please?&lt;/P&gt;

&lt;P&gt;The eventual goal is to be able to import data from splunk into Excel much like how a CSV would be imported.&lt;/P&gt;</description>
      <pubDate>Mon, 29 Apr 2013 10:31:41 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/REST-API-oneshot-blocking-saved-search/m-p/18397#M2498</guid>
      <dc:creator>leecaf</dc:creator>
      <dc:date>2013-04-29T10:31:41Z</dc:date>
    </item>
    <item>
      <title>Re: REST API oneshot blocking saved search</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/REST-API-oneshot-blocking-saved-search/m-p/18398#M2499</link>
      <description>&lt;P&gt;You might find the &lt;A href="http://splunk-base.splunk.com/apps/58162/odata-for-splunk" target="_blank"&gt;OData for Splunk&lt;/A&gt; app to be a better option.&lt;/P&gt;

&lt;P&gt;However, to answer your question, it's hard to see from the data you have supplied. It looks like you have "search=index=_internal |head 5", where you would want search index=_internal | head 5 as the specific error message is saying it's missing a search command (i.e. search) before a quote mark.&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 13:47:58 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/REST-API-oneshot-blocking-saved-search/m-p/18398#M2499</guid>
      <dc:creator>dart</dc:creator>
      <dc:date>2020-09-28T13:47:58Z</dc:date>
    </item>
    <item>
      <title>Re: REST API oneshot blocking saved search</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/REST-API-oneshot-blocking-saved-search/m-p/18399#M2500</link>
      <description>&lt;P&gt;Thanks, emailed dev for OData.&lt;BR /&gt;
corrected typo in my original post but still getting same error&lt;/P&gt;</description>
      <pubDate>Mon, 29 Apr 2013 12:28:21 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/REST-API-oneshot-blocking-saved-search/m-p/18399#M2500</guid>
      <dc:creator>leecaf</dc:creator>
      <dc:date>2013-04-29T12:28:21Z</dc:date>
    </item>
    <item>
      <title>Re: REST API oneshot blocking saved search</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/REST-API-oneshot-blocking-saved-search/m-p/18400#M2501</link>
      <description>&lt;P&gt;I've tried OData many thanks to Neeraj Luthra. but I'm what I'm trying to do probably doesn't require OData. The problem I'm facing is while OData works nicely out of the box, excel parses the XML it generates in a very verbose manner giving me much more data than I need. I'd rather not have to debug that side of things if Splunk REST API will do the trick for me.&lt;/P&gt;</description>
      <pubDate>Wed, 22 May 2013 09:09:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/REST-API-oneshot-blocking-saved-search/m-p/18400#M2501</guid>
      <dc:creator>leecaf</dc:creator>
      <dc:date>2013-05-22T09:09:09Z</dc:date>
    </item>
    <item>
      <title>Re: REST API oneshot blocking saved search</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/REST-API-oneshot-blocking-saved-search/m-p/18401#M2502</link>
      <description>&lt;P&gt;What about calling the saved search via the search command itself from the CLI? IE&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;curl -k -u admin:changeme -d 'search="savedsearch \"Errors in the last 24 hours\""' -d "output_mode=json" -d "exec_mode=oneshot" &lt;A href="https://localhost:8089/servicesNS/admin/search/search/jobs/export" target="test_blank"&gt;https://localhost:8089/servicesNS/admin/search/search/jobs/export&lt;/A&gt;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 11 Jun 2013 16:59:23 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/REST-API-oneshot-blocking-saved-search/m-p/18401#M2502</guid>
      <dc:creator>Flynt</dc:creator>
      <dc:date>2013-06-11T16:59:23Z</dc:date>
    </item>
  </channel>
</rss>

