<?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 REST API output_mode='json' causes client search error responses to be suppressed in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/REST-API-output-mode-json-causes-client-search-error-responses/m-p/571141#M199028</link>
    <description>&lt;P&gt;I've been working with the /services/search/jobs/export API recently and I noticed that setting the output mode to 'json' can cause responses to be suppressed. Here's an example:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;curl -u $USER:$PASSWORD -k https://&amp;lt;splunk&amp;gt;/services/search/jobs/export -d search='search=savedsearch "my_search"'&lt;/LI-CODE&gt;&lt;LI-CODE lang="markup"&gt;&amp;lt;?xml version='1.0' encoding='UTF-8'?&amp;gt;
&amp;lt;response&amp;gt;&amp;lt;messages&amp;gt;&amp;lt;msg type="FATAL"&amp;gt;Error in 'search' command: Unable to parse the search: Comparator '=' is missing a term on the left hand side.&amp;lt;/msg&amp;gt;&amp;lt;/messages&amp;gt;&amp;lt;/response&amp;gt;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This same request in a different output mode has no response content.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;curl -u $USER:$PASSWORD -k https://splunk.drwholdings.com:8089/services/search/jobs/export -d search='search=savedsearch "my_search"' -d "output_mode=json"&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is there some other flag I need to set to have these errors come through in JSON mode? Requests that don't result in error responses return fine. Both requests come back with status code 200.&lt;/P&gt;</description>
    <pubDate>Fri, 15 Oct 2021 15:52:35 GMT</pubDate>
    <dc:creator>phoellig</dc:creator>
    <dc:date>2021-10-15T15:52:35Z</dc:date>
    <item>
      <title>REST API output_mode='json' causes client search error responses to be suppressed</title>
      <link>https://community.splunk.com/t5/Splunk-Search/REST-API-output-mode-json-causes-client-search-error-responses/m-p/571141#M199028</link>
      <description>&lt;P&gt;I've been working with the /services/search/jobs/export API recently and I noticed that setting the output mode to 'json' can cause responses to be suppressed. Here's an example:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;curl -u $USER:$PASSWORD -k https://&amp;lt;splunk&amp;gt;/services/search/jobs/export -d search='search=savedsearch "my_search"'&lt;/LI-CODE&gt;&lt;LI-CODE lang="markup"&gt;&amp;lt;?xml version='1.0' encoding='UTF-8'?&amp;gt;
&amp;lt;response&amp;gt;&amp;lt;messages&amp;gt;&amp;lt;msg type="FATAL"&amp;gt;Error in 'search' command: Unable to parse the search: Comparator '=' is missing a term on the left hand side.&amp;lt;/msg&amp;gt;&amp;lt;/messages&amp;gt;&amp;lt;/response&amp;gt;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This same request in a different output mode has no response content.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;curl -u $USER:$PASSWORD -k https://splunk.drwholdings.com:8089/services/search/jobs/export -d search='search=savedsearch "my_search"' -d "output_mode=json"&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is there some other flag I need to set to have these errors come through in JSON mode? Requests that don't result in error responses return fine. Both requests come back with status code 200.&lt;/P&gt;</description>
      <pubDate>Fri, 15 Oct 2021 15:52:35 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/REST-API-output-mode-json-causes-client-search-error-responses/m-p/571141#M199028</guid>
      <dc:creator>phoellig</dc:creator>
      <dc:date>2021-10-15T15:52:35Z</dc:date>
    </item>
  </channel>
</rss>

