<?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 Is it possible to call Splunk RestAPI with request in JSON? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Is-it-possible-to-call-Splunk-RestAPI-with-request-in-JSON/m-p/531851#M150235</link>
    <description>&lt;P&gt;Hello all,&lt;/P&gt;
&lt;P&gt;is it possible to call Splunk RestAPI with request in JSON.&lt;/P&gt;
&lt;P&gt;I am trying in SOAP UI software, media Type = application/json&lt;/P&gt;
&lt;P&gt;And when request is inputed as string:&lt;BR /&gt;search=search index=myindex |head 5&lt;/P&gt;
&lt;P&gt;I get valid response&lt;/P&gt;
&lt;P&gt;But when I try request in json format&lt;BR /&gt;{"search": "search index=myindex |head 5"}&lt;/P&gt;
&lt;P&gt;I get response:&lt;BR /&gt;{"messages": [{&lt;BR /&gt;"type": "FATAL",&lt;BR /&gt;"text": "Empty search."&lt;BR /&gt;}]}&lt;/P&gt;
&lt;P&gt;Tried also following requests:&lt;BR /&gt;{"search": "index=myindex |head 5"}&lt;BR /&gt;{"search": search index=myindex |head 5}&lt;BR /&gt;{"body": {"search": "search index=myindex |head 5"}}&lt;BR /&gt;&lt;BR /&gt;Thanks&lt;/P&gt;</description>
    <pubDate>Wed, 09 Mar 2022 16:17:21 GMT</pubDate>
    <dc:creator>jakubvojacek</dc:creator>
    <dc:date>2022-03-09T16:17:21Z</dc:date>
    <item>
      <title>Is it possible to call Splunk RestAPI with request in JSON?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Is-it-possible-to-call-Splunk-RestAPI-with-request-in-JSON/m-p/531851#M150235</link>
      <description>&lt;P&gt;Hello all,&lt;/P&gt;
&lt;P&gt;is it possible to call Splunk RestAPI with request in JSON.&lt;/P&gt;
&lt;P&gt;I am trying in SOAP UI software, media Type = application/json&lt;/P&gt;
&lt;P&gt;And when request is inputed as string:&lt;BR /&gt;search=search index=myindex |head 5&lt;/P&gt;
&lt;P&gt;I get valid response&lt;/P&gt;
&lt;P&gt;But when I try request in json format&lt;BR /&gt;{"search": "search index=myindex |head 5"}&lt;/P&gt;
&lt;P&gt;I get response:&lt;BR /&gt;{"messages": [{&lt;BR /&gt;"type": "FATAL",&lt;BR /&gt;"text": "Empty search."&lt;BR /&gt;}]}&lt;/P&gt;
&lt;P&gt;Tried also following requests:&lt;BR /&gt;{"search": "index=myindex |head 5"}&lt;BR /&gt;{"search": search index=myindex |head 5}&lt;BR /&gt;{"body": {"search": "search index=myindex |head 5"}}&lt;BR /&gt;&lt;BR /&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Wed, 09 Mar 2022 16:17:21 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Is-it-possible-to-call-Splunk-RestAPI-with-request-in-JSON/m-p/531851#M150235</guid>
      <dc:creator>jakubvojacek</dc:creator>
      <dc:date>2022-03-09T16:17:21Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk REST API request in JSON format</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Is-it-possible-to-call-Splunk-RestAPI-with-request-in-JSON/m-p/588257#M204864</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Did you found solution to your problem?&amp;nbsp;&lt;/P&gt;&lt;P&gt;I need the same thing, I have a system that can send only post with json.&lt;/P&gt;&lt;P&gt;Thanks&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 09 Mar 2022 16:01:19 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Is-it-possible-to-call-Splunk-RestAPI-with-request-in-JSON/m-p/588257#M204864</guid>
      <dc:creator>Dov1</dc:creator>
      <dc:date>2022-03-09T16:01:19Z</dc:date>
    </item>
  </channel>
</rss>

