<?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: How to start a saved search using REST API in Reporting</title>
    <link>https://community.splunk.com/t5/Reporting/How-to-start-a-saved-search-using-REST-API/m-p/88027#M2000</link>
    <description>&lt;PRE&gt;&lt;CODE&gt;curl -k -u admin:changeme -d "search=savedsearch %22Errors%20in%20the%20last%2024%20hours%22" &lt;A href="https://localhost:8089/services/search/jobs/" target="test_blank"&gt;https://localhost:8089/services/search/jobs/&lt;/A&gt;
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;This will call a savedsearch named "Errors in the last 24 hours" - one of the default splunk saved searches..&lt;/P&gt;

&lt;P&gt;Check this thread for some more info on how to run rest api searches, how to check if the search has finished, and how to get the results 
&lt;A href="http://answers.splunk.com/questions/8940/" rel="nofollow"&gt;http://answers.splunk.com/questions/8940/&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Sat, 13 Nov 2010 09:02:39 GMT</pubDate>
    <dc:creator>Genti</dc:creator>
    <dc:date>2010-11-13T09:02:39Z</dc:date>
    <item>
      <title>How to start a saved search using REST API</title>
      <link>https://community.splunk.com/t5/Reporting/How-to-start-a-saved-search-using-REST-API/m-p/88026#M1999</link>
      <description>&lt;P&gt;How to start a saved search using REST API URL?&lt;/P&gt;

&lt;P&gt;I can make a GET the saves searchs, extract the 'search' expression and run it using a POST.&lt;/P&gt;

&lt;P&gt;But I could not find any reference on how to start a job passing as an argument a saves search ID instead of the search expression.&lt;/P&gt;

&lt;P&gt;Is there a another URL or parameter for that?&lt;/P&gt;</description>
      <pubDate>Fri, 12 Nov 2010 09:23:16 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Reporting/How-to-start-a-saved-search-using-REST-API/m-p/88026#M1999</guid>
      <dc:creator>mauhumor</dc:creator>
      <dc:date>2010-11-12T09:23:16Z</dc:date>
    </item>
    <item>
      <title>Re: How to start a saved search using REST API</title>
      <link>https://community.splunk.com/t5/Reporting/How-to-start-a-saved-search-using-REST-API/m-p/88027#M2000</link>
      <description>&lt;PRE&gt;&lt;CODE&gt;curl -k -u admin:changeme -d "search=savedsearch %22Errors%20in%20the%20last%2024%20hours%22" &lt;A href="https://localhost:8089/services/search/jobs/" target="test_blank"&gt;https://localhost:8089/services/search/jobs/&lt;/A&gt;
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;This will call a savedsearch named "Errors in the last 24 hours" - one of the default splunk saved searches..&lt;/P&gt;

&lt;P&gt;Check this thread for some more info on how to run rest api searches, how to check if the search has finished, and how to get the results 
&lt;A href="http://answers.splunk.com/questions/8940/" rel="nofollow"&gt;http://answers.splunk.com/questions/8940/&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 13 Nov 2010 09:02:39 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Reporting/How-to-start-a-saved-search-using-REST-API/m-p/88027#M2000</guid>
      <dc:creator>Genti</dc:creator>
      <dc:date>2010-11-13T09:02:39Z</dc:date>
    </item>
    <item>
      <title>Re: How to start a saved search using REST API</title>
      <link>https://community.splunk.com/t5/Reporting/How-to-start-a-saved-search-using-REST-API/m-p/88028#M2001</link>
      <description>&lt;P&gt;You can get the search ID for the saved search by running below command:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;curl -k -u user:password &lt;A href="https://localhost:8089/servicesNS/admin/search/saved/searches/My_Saved_Search/dispatch" target="test_blank"&gt;https://localhost:8089/servicesNS/admin/search/saved/searches/My_Saved_Search/dispatch&lt;/A&gt; -d "trigger_actions=1"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;You will get a response like below:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;admin__admin__search__RMD53566916a3c467274_at_1376044050_4161
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Now you can get the output by running below command:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;curl -k -u user:password &lt;A href="https://localhost:8089/servicesNS/admin/search/search/jobs/admin__admin__search__RMD53566916a3c467274_at_1376044050_4161/results" target="test_blank"&gt;https://localhost:8089/servicesNS/admin/search/search/jobs/admin__admin__search__RMD53566916a3c467274_at_1376044050_4161/results&lt;/A&gt; --get  -d output_mode=csv -d count=10
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Note: &lt;CODE&gt;admin__admin__search__RMD53566916a3c467274_at_1376044050_4161&lt;/CODE&gt; is the serach ID you received from output of above command.&lt;/P&gt;</description>
      <pubDate>Fri, 09 Aug 2013 12:10:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Reporting/How-to-start-a-saved-search-using-REST-API/m-p/88028#M2001</guid>
      <dc:creator>dishasaxena</dc:creator>
      <dc:date>2013-08-09T12:10:00Z</dc:date>
    </item>
    <item>
      <title>Re: How to start a saved search using REST API</title>
      <link>https://community.splunk.com/t5/Reporting/How-to-start-a-saved-search-using-REST-API/m-p/88029#M2002</link>
      <description>&lt;P&gt;I use the example to search ID for my saved search however get the following error, any assistance please thanks.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;curl -k -u user:password &lt;A href="https://localhost:8089/servicesNS/admin/search/saved/searches/My_Saved_Search/dispatch" target="test_blank"&gt;https://localhost:8089/servicesNS/admin/search/saved/searches/My_Saved_Search/dispatch&lt;/A&gt; -d "trigger_action=1"


&amp;lt;msg type="ERROR"&amp;gt;
 In handler 'savedsearch': Argument "trigger_action" is not supported by this handler.
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 17 Jun 2016 07:53:27 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Reporting/How-to-start-a-saved-search-using-REST-API/m-p/88029#M2002</guid>
      <dc:creator>jgigliotti</dc:creator>
      <dc:date>2016-06-17T07:53:27Z</dc:date>
    </item>
    <item>
      <title>Re: How to start a saved search using REST API</title>
      <link>https://community.splunk.com/t5/Reporting/How-to-start-a-saved-search-using-REST-API/m-p/88030#M2003</link>
      <description>&lt;P&gt;Just FYI for anybody reading this thread its "trigger_actions" not "trigger_action"&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 18:03:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Reporting/How-to-start-a-saved-search-using-REST-API/m-p/88030#M2003</guid>
      <dc:creator>raugugliaro</dc:creator>
      <dc:date>2020-09-29T18:03:46Z</dc:date>
    </item>
  </channel>
</rss>

