<?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: splunk API from browser in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/splunk-API-from-browser/m-p/470136#M192107</link>
    <description>&lt;P&gt;The issue is not replicable in Splunk 7.2. Which version of Splunk you are using?&lt;/P&gt;</description>
    <pubDate>Mon, 02 Sep 2019 06:16:56 GMT</pubDate>
    <dc:creator>jawaharas</dc:creator>
    <dc:date>2019-09-02T06:16:56Z</dc:date>
    <item>
      <title>splunk API from browser</title>
      <link>https://community.splunk.com/t5/Splunk-Search/splunk-API-from-browser/m-p/470135#M192106</link>
      <description>&lt;P&gt;Hi all ,&lt;/P&gt;

&lt;P&gt;I am using below url to get data from splunk &lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;&lt;A href="https://hostname:8089/v7/services/search/jobs/export?output_mode=json&amp;amp;search=search" target="test_blank"&gt;https://hostname:8089/v7/services/search/jobs/export?output_mode=json&amp;amp;search=search&lt;/A&gt; * | stats max(_time) AS _time BY "pctIdle" | sort 0 - _time | head 1|rename "pctIdle" AS Value |eval formatted=strftime(_time,"%25Y-%25m-%25d %25H:%25M:%25S%25z")&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;which is giving output continuously , even though i have mentioned head 1.&lt;/P&gt;

&lt;P&gt;below is the actual query  which gives one row.&lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;* | stats max(_time) AS _time BY "pctIdle" | sort 0 - _time | head 1|rename "pctIdle" AS Value |eval formatted=strftime(_time,"%Y-%m-%d %H:%M:%S%z"&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;How do i achieve same from browser.&lt;/P&gt;</description>
      <pubDate>Mon, 02 Sep 2019 00:19:56 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/splunk-API-from-browser/m-p/470135#M192106</guid>
      <dc:creator>vasanthi77</dc:creator>
      <dc:date>2019-09-02T00:19:56Z</dc:date>
    </item>
    <item>
      <title>Re: splunk API from browser</title>
      <link>https://community.splunk.com/t5/Splunk-Search/splunk-API-from-browser/m-p/470136#M192107</link>
      <description>&lt;P&gt;The issue is not replicable in Splunk 7.2. Which version of Splunk you are using?&lt;/P&gt;</description>
      <pubDate>Mon, 02 Sep 2019 06:16:56 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/splunk-API-from-browser/m-p/470136#M192107</guid>
      <dc:creator>jawaharas</dc:creator>
      <dc:date>2019-09-02T06:16:56Z</dc:date>
    </item>
    <item>
      <title>Re: splunk API from browser</title>
      <link>https://community.splunk.com/t5/Splunk-Search/splunk-API-from-browser/m-p/470137#M192108</link>
      <description>&lt;P&gt;@jawaharas  I m using 7.2.7.  I m getting continuous output like this , Is not the same case for you?&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; {"preview":true,"offset":0,"lastrow":true,"result":{"Value":"51.00","_time":"2019-09-02 14:08:56.000 AEST"}}
 {"preview":true,"offset":0,"lastrow":true,"result":{"Value":"51.00","_time":"2019-09-02 14:08:56.000 AEST"}}
 {"preview":true,"offset":0,"lastrow":true,"result":{"Value":"51.00","_time":"2019-09-02 14:08:56.000 AEST"}}
 {"preview":true,"offset":0,"lastrow":true,"result":{"Value":"51.00","_time":"2019-09-02 14:08:56.000 AEST"}}
 {"preview":true,"offset":0,"lastrow":true,"result":{"Value":"51.00","_time":"2019-09-02 14:08:56.000 AEST"}}
 {"preview":true,"offset":0,"lastrow":true,"result":{"Value":"51.00","_time":"2019-09-02 14:08:56.000 AEST"}}
 {"preview":true,"offset":0,"lastrow":true,"result":{"Value":"100.00","_time":"2019-09-02 14:08:56.000 AEST"}}
 {"preview":true,"offset":0,"lastrow":true,"result":{"Value":"100.00","_time":"2019-09-02 14:08:56.000 AEST"}}
 {"preview":true,"offset":0,"lastrow":true,"result":{"Value":"100.00","_time":"2019-09-02 14:08:56.000 AEST"}}
 {"preview":false,"offset":0,"lastrow":true,"result":{"Value":"100.00","_time":"2019-09-02 14:08:56.000 AEST"}}
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 02 Sep 2019 06:38:05 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/splunk-API-from-browser/m-p/470137#M192108</guid>
      <dc:creator>vasanthi77</dc:creator>
      <dc:date>2019-09-02T06:38:05Z</dc:date>
    </item>
    <item>
      <title>Re: splunk API from browser</title>
      <link>https://community.splunk.com/t5/Splunk-Search/splunk-API-from-browser/m-p/470138#M192109</link>
      <description>&lt;P&gt;This is expected behaviour as is documented here for the search/jobs/export endpoint: &lt;BR /&gt;
"Stream search results as they become available."&lt;BR /&gt;
&lt;A href="https://docs.splunk.com/Documentation/Splunk/7.3.1/RESTREF/RESTsearch#search.2Fjobs.2Fexport"&gt;https://docs.splunk.com/Documentation/Splunk/7.3.1/RESTREF/RESTsearch#search.2Fjobs.2Fexport&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;To get only a single result (i.e. not streaming), you could send a POST-request to the search/jobs endpoint. However, afaik this is not easily done in a browser.&lt;/P&gt;</description>
      <pubDate>Mon, 02 Sep 2019 12:17:16 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/splunk-API-from-browser/m-p/470138#M192109</guid>
      <dc:creator>drfk</dc:creator>
      <dc:date>2019-09-02T12:17:16Z</dc:date>
    </item>
    <item>
      <title>Re: splunk API from browser</title>
      <link>https://community.splunk.com/t5/Splunk-Search/splunk-API-from-browser/m-p/470139#M192110</link>
      <description>&lt;P&gt;@drfk Can i post using browser&lt;/P&gt;</description>
      <pubDate>Tue, 03 Sep 2019 00:53:43 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/splunk-API-from-browser/m-p/470139#M192110</guid>
      <dc:creator>vasanthi77</dc:creator>
      <dc:date>2019-09-03T00:53:43Z</dc:date>
    </item>
    <item>
      <title>Re: splunk API from browser</title>
      <link>https://community.splunk.com/t5/Splunk-Search/splunk-API-from-browser/m-p/470140#M192111</link>
      <description>&lt;P&gt;There seem to be plugins for browsers that can do that, especially for testing REST APIs. However, you can better search for what you need yourself, as I wouldn't know any more about that.&lt;/P&gt;</description>
      <pubDate>Tue, 03 Sep 2019 06:49:28 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/splunk-API-from-browser/m-p/470140#M192111</guid>
      <dc:creator>drfk</dc:creator>
      <dc:date>2019-09-03T06:49:28Z</dc:date>
    </item>
  </channel>
</rss>

