<?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 add parameters to a saved search in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/Rest-api-add-parameters-to-a-saved-search/m-p/98860#M20670</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;I’m using the rest api with curl now I got the following question:&lt;/P&gt;

&lt;P&gt;Is it possible to add parameters to a saved search so I can specify my search by the IP 192.168.178.1 and I get results only with this IP something like:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;curl --get -k -u admin:changeme -d "output_mode=csv" -d "count=5"  'search="search IP=192.168.178.1 &lt;A href="https://localhost:8089/servicesNS/admin/search/search/jobs/1350986028.108/results" target="test_blank"&gt;https://localhost:8089/servicesNS/admin/search/search/jobs/1350986028.108/results&lt;/A&gt;
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Thanks in Advance&lt;/P&gt;</description>
    <pubDate>Tue, 23 Oct 2012 12:11:37 GMT</pubDate>
    <dc:creator>Oti47</dc:creator>
    <dc:date>2012-10-23T12:11:37Z</dc:date>
    <item>
      <title>Rest api add parameters to a saved search</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Rest-api-add-parameters-to-a-saved-search/m-p/98860#M20670</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;I’m using the rest api with curl now I got the following question:&lt;/P&gt;

&lt;P&gt;Is it possible to add parameters to a saved search so I can specify my search by the IP 192.168.178.1 and I get results only with this IP something like:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;curl --get -k -u admin:changeme -d "output_mode=csv" -d "count=5"  'search="search IP=192.168.178.1 &lt;A href="https://localhost:8089/servicesNS/admin/search/search/jobs/1350986028.108/results" target="test_blank"&gt;https://localhost:8089/servicesNS/admin/search/search/jobs/1350986028.108/results&lt;/A&gt;
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Thanks in Advance&lt;/P&gt;</description>
      <pubDate>Tue, 23 Oct 2012 12:11:37 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Rest-api-add-parameters-to-a-saved-search/m-p/98860#M20670</guid>
      <dc:creator>Oti47</dc:creator>
      <dc:date>2012-10-23T12:11:37Z</dc:date>
    </item>
    <item>
      <title>Re: Rest api add parameters to a saved search</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Rest-api-add-parameters-to-a-saved-search/m-p/98861#M20671</link>
      <description>&lt;P&gt;Yes, you can. You can schedule the search job, and supply a post filter when retrieving results. See &lt;A href="http://docs.splunk.com/Documentation/Splunk/5.0.2/RESTAPI/RESTsearch#search.2Fjobs.2F.7Bsearch_id.7D.2Fresults"&gt;http://docs.splunk.com/Documentation/Splunk/5.0.2/RESTAPI/RESTsearch#search.2Fjobs.2F.7Bsearch_id.7D.2Fresults&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;You should be able to use the exact parameters you used in your example. However, your search string needs to be URL-encoded:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;... -d "count=5" -d "search=IP%3D192.168.178.1" &lt;A href="https://localhost:8089/../" target="test_blank"&gt;https://localhost:8089/../&lt;/A&gt;.
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 25 Apr 2013 14:50:43 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Rest-api-add-parameters-to-a-saved-search/m-p/98861#M20671</guid>
      <dc:creator>brettcave</dc:creator>
      <dc:date>2013-04-25T14:50:43Z</dc:date>
    </item>
  </channel>
</rss>

