<?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 search for results using Java splunk api in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-search-for-results-using-Java-splunk-api/m-p/87183#M22297</link>
    <description>&lt;P&gt;Have a look at &lt;A href="https://github.com/splunk/splunk-sdk-java/blob/master/examples/search/com/splunk/sdk/search/Program.java"&gt;this example&lt;/A&gt; included in the SDK.&lt;/P&gt;

&lt;P&gt;There is more info at &lt;A href="http://dev.splunk.com/view/java-sdk/SP-CAAAECN"&gt;dev.splunk.com&lt;/A&gt; also.&lt;/P&gt;

&lt;P&gt;Here is a pseudocode excerpt copied from the above link showing usage of the Java SDK to execute a Splunk search and obtain the results:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;Service service = Service.connect(...);
Job job = service.getJobs().create("search * | head 10")
while (!job.isDone()) {
    Thread.sleep(2000);
    job.refresh();
}
InputStream stream = job.getResults();
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Thu, 08 Mar 2012 04:33:07 GMT</pubDate>
    <dc:creator>Damien_Dallimor</dc:creator>
    <dc:date>2012-03-08T04:33:07Z</dc:date>
    <item>
      <title>How to search for results using Java splunk api</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-search-for-results-using-Java-splunk-api/m-p/87182#M22296</link>
      <description>&lt;P&gt;How do i call the Java splunk api to search using the splunk search language from the Splunk search endpoint?&lt;/P&gt;</description>
      <pubDate>Thu, 08 Mar 2012 02:13:11 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-search-for-results-using-Java-splunk-api/m-p/87182#M22296</guid>
      <dc:creator>misteryuku</dc:creator>
      <dc:date>2012-03-08T02:13:11Z</dc:date>
    </item>
    <item>
      <title>Re: How to search for results using Java splunk api</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-search-for-results-using-Java-splunk-api/m-p/87183#M22297</link>
      <description>&lt;P&gt;Have a look at &lt;A href="https://github.com/splunk/splunk-sdk-java/blob/master/examples/search/com/splunk/sdk/search/Program.java"&gt;this example&lt;/A&gt; included in the SDK.&lt;/P&gt;

&lt;P&gt;There is more info at &lt;A href="http://dev.splunk.com/view/java-sdk/SP-CAAAECN"&gt;dev.splunk.com&lt;/A&gt; also.&lt;/P&gt;

&lt;P&gt;Here is a pseudocode excerpt copied from the above link showing usage of the Java SDK to execute a Splunk search and obtain the results:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;Service service = Service.connect(...);
Job job = service.getJobs().create("search * | head 10")
while (!job.isDone()) {
    Thread.sleep(2000);
    job.refresh();
}
InputStream stream = job.getResults();
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 08 Mar 2012 04:33:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-search-for-results-using-Java-splunk-api/m-p/87183#M22297</guid>
      <dc:creator>Damien_Dallimor</dc:creator>
      <dc:date>2012-03-08T04:33:07Z</dc:date>
    </item>
  </channel>
</rss>

