<?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 Creating a search job. in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Creating-a-search-job/m-p/87557#M22396</link>
    <description>&lt;P&gt;To create a search job one has to &lt;/P&gt;

&lt;P&gt;1.use the REST endpoint '/services/search/jobs'. &lt;BR /&gt;
2.Use the POST method and include the session key as 'Authorization' in the header &lt;BR /&gt;
3.Provide the search string in the request body.&lt;BR /&gt;
4.A search ID will be returned as a Response.&lt;/P&gt;

&lt;P&gt;Am i right to say these steps are necessary to create a search job?&lt;/P&gt;

&lt;P&gt;And so does these steps apply to Java Splunk APIs?&lt;/P&gt;</description>
    <pubDate>Thu, 08 Mar 2012 07:36:31 GMT</pubDate>
    <dc:creator>misteryuku</dc:creator>
    <dc:date>2012-03-08T07:36:31Z</dc:date>
    <item>
      <title>Creating a search job.</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Creating-a-search-job/m-p/87557#M22396</link>
      <description>&lt;P&gt;To create a search job one has to &lt;/P&gt;

&lt;P&gt;1.use the REST endpoint '/services/search/jobs'. &lt;BR /&gt;
2.Use the POST method and include the session key as 'Authorization' in the header &lt;BR /&gt;
3.Provide the search string in the request body.&lt;BR /&gt;
4.A search ID will be returned as a Response.&lt;/P&gt;

&lt;P&gt;Am i right to say these steps are necessary to create a search job?&lt;/P&gt;

&lt;P&gt;And so does these steps apply to Java Splunk APIs?&lt;/P&gt;</description>
      <pubDate>Thu, 08 Mar 2012 07:36:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Creating-a-search-job/m-p/87557#M22396</guid>
      <dc:creator>misteryuku</dc:creator>
      <dc:date>2012-03-08T07:36:31Z</dc:date>
    </item>
    <item>
      <title>Re: Creating a search job.</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Creating-a-search-job/m-p/87558#M22397</link>
      <description>&lt;P&gt;The Java SDK is a programming interface that abstracts the underlying REST API.&lt;BR /&gt;
So, steps 1-4 are correct , and if you use the Java SDK these will be handled for you.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;Service service = new Service("myhost",8089);
service.login("user","pass"); //gets the session key, subsequent operations use this in the Authorization header
Job job = service.getJobs().create("search * |  head 10"); //POST search string to /search/jobs
String searchID = job.getSid();//get search ID
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 08 Mar 2012 08:25:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Creating-a-search-job/m-p/87558#M22397</guid>
      <dc:creator>Damien_Dallimor</dc:creator>
      <dc:date>2012-03-08T08:25:09Z</dc:date>
    </item>
  </channel>
</rss>

