<?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 create Search via REST api in verbose mode ? in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/How-to-create-Search-via-REST-api-in-verbose-mode/m-p/406412#M72128</link>
    <description>&lt;P&gt;Your  time parameter is in the wrong format.  &lt;/P&gt;

&lt;P&gt;You want latest to be 0 instead of now and try -1h instead of -hr for earliest.&lt;/P&gt;

&lt;P&gt;Also when you dispatch a rest search, pay attention to your app context.  In all your examples you're dispatching searches from the search and reporting app.  If you don't have your search time extractions in that app (props, transforms, etc) OR if the extractions aren't shared globally or with the same user you're doing your rest authentication with, then you will not get the desired results.&lt;/P&gt;</description>
    <pubDate>Thu, 06 Jun 2019 13:50:16 GMT</pubDate>
    <dc:creator>jkat54</dc:creator>
    <dc:date>2019-06-06T13:50:16Z</dc:date>
    <item>
      <title>How to create Search via REST api in verbose mode ?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-create-Search-via-REST-api-in-verbose-mode/m-p/406400#M72116</link>
      <description>&lt;P&gt;I'm firing search query via REST api to get notable events, but the search is not returning all fields available in the event , I see It is running in fast mode. &lt;/P&gt;

&lt;P&gt;How to change the search mode when invoking search via REST api&lt;/P&gt;</description>
      <pubDate>Thu, 06 Jun 2019 10:20:15 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-create-Search-via-REST-api-in-verbose-mode/m-p/406400#M72116</guid>
      <dc:creator>shravankumarkus</dc:creator>
      <dc:date>2019-06-06T10:20:15Z</dc:date>
    </item>
    <item>
      <title>Re: How to create Search via REST api in verbose mode ?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-create-Search-via-REST-api-in-verbose-mode/m-p/406401#M72117</link>
      <description>&lt;P&gt;not sure how to change search mode, however, you can add &lt;CODE&gt;| fields *&lt;/CODE&gt; after your filtering (&lt;CODE&gt;index=a sourcetype=b&lt;/CODE&gt;) that will return all fields in fast mode&lt;/P&gt;</description>
      <pubDate>Thu, 06 Jun 2019 11:58:18 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-create-Search-via-REST-api-in-verbose-mode/m-p/406401#M72117</guid>
      <dc:creator>adonio</dc:creator>
      <dc:date>2019-06-06T11:58:18Z</dc:date>
    </item>
    <item>
      <title>Re: How to create Search via REST api in verbose mode ?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-create-Search-via-REST-api-in-verbose-mode/m-p/406402#M72118</link>
      <description>&lt;P&gt;Which rest api are you using to fire search query , if you are using &lt;CODE&gt;search/jobs/&lt;/CODE&gt; then you can use &lt;CODE&gt;adhoc_search_level = verbose&lt;/CODE&gt; Ref. doc &lt;A href="https://docs.splunk.com/Documentation/Splunk/7.3.0/RESTREF/RESTsearch#search.2Fjobs"&gt;https://docs.splunk.com/Documentation/Splunk/7.3.0/RESTREF/RESTsearch#search.2Fjobs&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 06 Jun 2019 12:10:36 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-create-Search-via-REST-api-in-verbose-mode/m-p/406402#M72118</guid>
      <dc:creator>harsmarvania57</dc:creator>
      <dc:date>2019-06-06T12:10:36Z</dc:date>
    </item>
    <item>
      <title>Re: How to create Search via REST api in verbose mode ?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-create-Search-via-REST-api-in-verbose-mode/m-p/406403#M72119</link>
      <description>&lt;P&gt;Hi @shravankumarkusuma,&lt;/P&gt;

&lt;P&gt;Use something like this :&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;curl -k -u admin:pass &lt;A href="https://localhost:8089/servicesNS/admin/search/search/jobs" target="test_blank"&gt;https://localhost:8089/servicesNS/admin/search/search/jobs&lt;/A&gt; --data-urlencode search="search index=_internal source=*/metrics.log" -d id=mysearch_02151949 -d max_count=50000 -d status_buckets=300 -d adhoc_search_level=verbose 
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;You can find everything here :&lt;A href="https://docs.splunk.com/Documentation/Splunk/latest/RESTTUT/RESTsearches"&gt;https://docs.splunk.com/Documentation/Splunk/latest/RESTTUT/RESTsearches&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;Cheers,&lt;BR /&gt;
David&lt;/P&gt;</description>
      <pubDate>Thu, 06 Jun 2019 12:18:01 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-create-Search-via-REST-api-in-verbose-mode/m-p/406403#M72119</guid>
      <dc:creator>DavidHourani</dc:creator>
      <dc:date>2019-06-06T12:18:01Z</dc:date>
    </item>
    <item>
      <title>Re: How to create Search via REST api in verbose mode ?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-create-Search-via-REST-api-in-verbose-mode/m-p/406404#M72120</link>
      <description>&lt;P&gt;Hi guys,&lt;/P&gt;

&lt;P&gt;thanks for the response&lt;/P&gt;

&lt;P&gt;adhoc_search_level is not working if i use exec_mode=oneshot or if i use search/jobs/export endpoint with POST to directly get the results instead of getting  and then firing one more request to /search/job/sid/events&lt;/P&gt;

&lt;P&gt;i want to directly get results with via exec_mode=oneshot or /export endpoint &lt;/P&gt;

&lt;P&gt;will adhoc_search_level work with above two cases&lt;/P&gt;</description>
      <pubDate>Wed, 30 Sep 2020 00:48:18 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-create-Search-via-REST-api-in-verbose-mode/m-p/406404#M72120</guid>
      <dc:creator>shravankumarkus</dc:creator>
      <dc:date>2020-09-30T00:48:18Z</dc:date>
    </item>
    <item>
      <title>Re: How to create Search via REST api in verbose mode ?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-create-Search-via-REST-api-in-verbose-mode/m-p/406405#M72121</link>
      <description>&lt;P&gt;thanks for the response&lt;/P&gt;

&lt;P&gt;adhoc_search_level is not working if i use exec_mode=oneshot or if i use search/jobs/export endpoint to directly get the results instead of getting  and then firing one more request to /search/job/sid/events&lt;/P&gt;

&lt;P&gt;i want to directly get results with exec_mode=oneshot or /export endpoint&lt;/P&gt;

&lt;P&gt;will adhoc_search_level work with above two cases&lt;/P&gt;</description>
      <pubDate>Wed, 30 Sep 2020 00:48:21 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-create-Search-via-REST-api-in-verbose-mode/m-p/406405#M72121</guid>
      <dc:creator>shravankumarkus</dc:creator>
      <dc:date>2020-09-30T00:48:21Z</dc:date>
    </item>
    <item>
      <title>Re: How to create Search via REST api in verbose mode ?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-create-Search-via-REST-api-in-verbose-mode/m-p/406406#M72122</link>
      <description>&lt;P&gt;thanks for the response&lt;/P&gt;

&lt;P&gt;adhoc_search_level is not working if i use exec_mode=oneshot or if i use search/jobs/export endpoint to directly get the results instead of getting  and then firing one more request to /search/job/sid/events&lt;/P&gt;

&lt;P&gt;i want to directly get results with exec_mode=oneshot or /export endpoint&lt;/P&gt;

&lt;P&gt;will adhoc_search_level work with above two cases&lt;/P&gt;</description>
      <pubDate>Wed, 30 Sep 2020 00:48:23 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-create-Search-via-REST-api-in-verbose-mode/m-p/406406#M72122</guid>
      <dc:creator>shravankumarkus</dc:creator>
      <dc:date>2020-09-30T00:48:23Z</dc:date>
    </item>
    <item>
      <title>Re: How to create Search via REST api in verbose mode ?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-create-Search-via-REST-api-in-verbose-mode/m-p/406407#M72123</link>
      <description>&lt;P&gt;Is it possible to share your query and fields you are trying to fetch ?&lt;/P&gt;</description>
      <pubDate>Thu, 06 Jun 2019 12:27:29 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-create-Search-via-REST-api-in-verbose-mode/m-p/406407#M72123</guid>
      <dc:creator>harsmarvania57</dc:creator>
      <dc:date>2019-06-06T12:27:29Z</dc:date>
    </item>
    <item>
      <title>Re: How to create Search via REST api in verbose mode ?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-create-Search-via-REST-api-in-verbose-mode/m-p/406408#M72124</link>
      <description>&lt;P&gt;two ways i'm firing query&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;method 1:&lt;/STRONG&gt;&lt;BR /&gt;
/services/search/jobs/?output_mode=json&lt;/P&gt;

&lt;P&gt;request params:&lt;BR /&gt;
search= search &lt;CODE&gt;notable&lt;/CODE&gt;&lt;BR /&gt;
earliest_time=-hr&lt;BR /&gt;
latest_time=now&lt;BR /&gt;
adhoc_search_level=verbose&lt;BR /&gt;
exec_mode=oneshot&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;method 2:&lt;/STRONG&gt;&lt;BR /&gt;
/services/search/jobs/&lt;STRONG&gt;export&lt;/STRONG&gt;?output_mode=json&lt;/P&gt;

&lt;P&gt;request params:&lt;BR /&gt;
search= search &lt;CODE&gt;notable&lt;/CODE&gt;&lt;BR /&gt;
earliest_time=-hr&lt;BR /&gt;
latest_time=now&lt;BR /&gt;
adhoc_search_level=verbose&lt;/P&gt;

&lt;P&gt;both endpoints are not returning all fields of notable event but its working if i get  first and then get the events with  ?&lt;/P&gt;

&lt;P&gt;i don't want to fire another query with sid if i can get in one API request&lt;/P&gt;</description>
      <pubDate>Wed, 30 Sep 2020 00:48:26 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-create-Search-via-REST-api-in-verbose-mode/m-p/406408#M72124</guid>
      <dc:creator>shravankumarkus</dc:creator>
      <dc:date>2020-09-30T00:48:26Z</dc:date>
    </item>
    <item>
      <title>Re: How to create Search via REST api in verbose mode ?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-create-Search-via-REST-api-in-verbose-mode/m-p/406409#M72125</link>
      <description>&lt;P&gt;two ways i'm firing query&lt;/P&gt;

&lt;P&gt;method 1:&lt;BR /&gt;
/services/search/jobs/?output_mode=json&lt;/P&gt;

&lt;P&gt;request params:&lt;BR /&gt;
search= search notable&lt;BR /&gt;
earliest_time=-hr&lt;BR /&gt;
latest_time=now&lt;BR /&gt;
adhoc_search_level=verbose&lt;BR /&gt;
exec_mode=oneshot&lt;/P&gt;

&lt;P&gt;method 2:&lt;BR /&gt;
/services/search/jobs/export?output_mode=json&lt;/P&gt;

&lt;P&gt;request params:&lt;BR /&gt;
search= search notable&lt;BR /&gt;
earliest_time=-hr&lt;BR /&gt;
latest_time=now&lt;BR /&gt;
adhoc_search_level=verbose&lt;/P&gt;

&lt;P&gt;both endpoints are not returning all fields of notable event but its working if i get first and then get the events with ?&lt;/P&gt;

&lt;P&gt;i don't want to fire another query with sid if i can get in one API request&lt;/P&gt;</description>
      <pubDate>Wed, 30 Sep 2020 00:48:29 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-create-Search-via-REST-api-in-verbose-mode/m-p/406409#M72125</guid>
      <dc:creator>shravankumarkus</dc:creator>
      <dc:date>2020-09-30T00:48:29Z</dc:date>
    </item>
    <item>
      <title>Re: How to create Search via REST api in verbose mode ?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-create-Search-via-REST-api-in-verbose-mode/m-p/406410#M72126</link>
      <description>&lt;P&gt;ummm what about adding &lt;CODE&gt;| fields *&lt;/CODE&gt; or &lt;CODE&gt;| table *&lt;/CODE&gt; ? As you saw in the doc &lt;CODE&gt;adhoc_search_level&lt;/CODE&gt;is for &lt;CODE&gt;POST&lt;/CODE&gt; not &lt;CODE&gt;GET&lt;/CODE&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 06 Jun 2019 12:41:20 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-create-Search-via-REST-api-in-verbose-mode/m-p/406410#M72126</guid>
      <dc:creator>DavidHourani</dc:creator>
      <dc:date>2019-06-06T12:41:20Z</dc:date>
    </item>
    <item>
      <title>Re: How to create Search via REST api in verbose mode ?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-create-Search-via-REST-api-in-verbose-mode/m-p/406411#M72127</link>
      <description>&lt;P&gt;In your method 1 remove &lt;CODE&gt;adhoc_search_level=verbose&lt;/CODE&gt; and as mentioned by @adonio add &lt;CODE&gt;| fields *&lt;/CODE&gt; at end of your search. I have tested with small set of fields and it is working fine.&lt;/P&gt;</description>
      <pubDate>Thu, 06 Jun 2019 13:05:19 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-create-Search-via-REST-api-in-verbose-mode/m-p/406411#M72127</guid>
      <dc:creator>harsmarvania57</dc:creator>
      <dc:date>2019-06-06T13:05:19Z</dc:date>
    </item>
    <item>
      <title>Re: How to create Search via REST api in verbose mode ?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-create-Search-via-REST-api-in-verbose-mode/m-p/406412#M72128</link>
      <description>&lt;P&gt;Your  time parameter is in the wrong format.  &lt;/P&gt;

&lt;P&gt;You want latest to be 0 instead of now and try -1h instead of -hr for earliest.&lt;/P&gt;

&lt;P&gt;Also when you dispatch a rest search, pay attention to your app context.  In all your examples you're dispatching searches from the search and reporting app.  If you don't have your search time extractions in that app (props, transforms, etc) OR if the extractions aren't shared globally or with the same user you're doing your rest authentication with, then you will not get the desired results.&lt;/P&gt;</description>
      <pubDate>Thu, 06 Jun 2019 13:50:16 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-create-Search-via-REST-api-in-verbose-mode/m-p/406412#M72128</guid>
      <dc:creator>jkat54</dc:creator>
      <dc:date>2019-06-06T13:50:16Z</dc:date>
    </item>
    <item>
      <title>Re: How to create Search via REST api in verbose mode ?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-create-Search-via-REST-api-in-verbose-mode/m-p/406413#M72129</link>
      <description>&lt;P&gt;You have to dispatch the search first (one POST) and then retrieve the results with a GET.  It's two calls plus the auth token call for every search you want to run via rest.&lt;/P&gt;</description>
      <pubDate>Thu, 06 Jun 2019 13:53:41 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-create-Search-via-REST-api-in-verbose-mode/m-p/406413#M72129</guid>
      <dc:creator>jkat54</dc:creator>
      <dc:date>2019-06-06T13:53:41Z</dc:date>
    </item>
    <item>
      <title>Re: How to create Search via REST api in verbose mode ?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-create-Search-via-REST-api-in-verbose-mode/m-p/406414#M72130</link>
      <description>&lt;P&gt;thanks that works&lt;/P&gt;</description>
      <pubDate>Fri, 07 Jun 2019 05:06:55 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-create-Search-via-REST-api-in-verbose-mode/m-p/406414#M72130</guid>
      <dc:creator>shravankumarkus</dc:creator>
      <dc:date>2019-06-07T05:06:55Z</dc:date>
    </item>
    <item>
      <title>Re: How to create Search via REST api in verbose mode ?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-create-Search-via-REST-api-in-verbose-mode/m-p/406415#M72131</link>
      <description>&lt;P&gt;thanks @jkat54 &lt;BR /&gt;
I'm using this for splunk enterprise security, can you please point out the cases where search can fail, &lt;BR /&gt;
how can we change the app context to get the results everytime&lt;/P&gt;

&lt;P&gt;any suggestions on which endpoint for search to use with proper app context so that search won't fail ?&lt;/P&gt;</description>
      <pubDate>Fri, 07 Jun 2019 05:12:03 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-create-Search-via-REST-api-in-verbose-mode/m-p/406415#M72131</guid>
      <dc:creator>shravankumarkus</dc:creator>
      <dc:date>2019-06-07T05:12:03Z</dc:date>
    </item>
    <item>
      <title>Re: How to create Search via REST api in verbose mode ?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-create-Search-via-REST-api-in-verbose-mode/m-p/406416#M72132</link>
      <description>&lt;P&gt;thanks, that solves my problem &lt;/P&gt;</description>
      <pubDate>Fri, 07 Jun 2019 05:13:05 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-create-Search-via-REST-api-in-verbose-mode/m-p/406416#M72132</guid>
      <dc:creator>shravankumarkus</dc:creator>
      <dc:date>2019-06-07T05:13:05Z</dc:date>
    </item>
    <item>
      <title>Re: How to create Search via REST api in verbose mode ?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-create-Search-via-REST-api-in-verbose-mode/m-p/406417#M72133</link>
      <description>&lt;P&gt;It's all documented here:&lt;BR /&gt;
&lt;A href="https://docs.splunk.com/Documentation/Splunk/7.2.6/RESTREF/RESTprolog"&gt;https://docs.splunk.com/Documentation/Splunk/7.2.6/RESTREF/RESTprolog&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 07 Jun 2019 05:14:48 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-create-Search-via-REST-api-in-verbose-mode/m-p/406417#M72133</guid>
      <dc:creator>jkat54</dc:creator>
      <dc:date>2019-06-07T05:14:48Z</dc:date>
    </item>
    <item>
      <title>Re: How to create Search via REST api in verbose mode ?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-create-Search-via-REST-api-in-verbose-mode/m-p/406418#M72134</link>
      <description>&lt;P&gt;thanks a lot &lt;/P&gt;</description>
      <pubDate>Fri, 07 Jun 2019 05:26:43 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-create-Search-via-REST-api-in-verbose-mode/m-p/406418#M72134</guid>
      <dc:creator>shravankumarkus</dc:creator>
      <dc:date>2019-06-07T05:26:43Z</dc:date>
    </item>
    <item>
      <title>Re: How to create Search via REST api in verbose mode ?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-create-Search-via-REST-api-in-verbose-mode/m-p/406419#M72135</link>
      <description>&lt;P&gt;Most welcome ! Please upvote and accept the answer &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 07 Jun 2019 05:31:40 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-create-Search-via-REST-api-in-verbose-mode/m-p/406419#M72135</guid>
      <dc:creator>DavidHourani</dc:creator>
      <dc:date>2019-06-07T05:31:40Z</dc:date>
    </item>
  </channel>
</rss>

