<?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 How to pass parameters that have spaces in the name to the Splunk REST API? in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/How-to-pass-parameters-that-have-spaces-in-the-name-to-the/m-p/213499#M41944</link>
    <description>&lt;P&gt;Hi All,&lt;/P&gt;

&lt;P&gt;I am using the Splunk REST API to get the results in JSON from Splunk reports. I am able to get the results when the report name does not have any spaces in its name. However, when we have a space in the name, the REST API is unable to find the report and giving "unable to find saved search" error.&lt;/P&gt;

&lt;P&gt;This is the endpoint I'm using:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;curl -k -u userName:password &lt;A href="https://localhost:8089/servicesNS/admin/search/search/jobs/export" target="test_blank"&gt;https://localhost:8089/servicesNS/admin/search/search/jobs/export&lt;/A&gt; -d search="savedsearch "reportName"" -d output_mode=json
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Mon, 20 Jun 2016 06:30:39 GMT</pubDate>
    <dc:creator>vamsy7</dc:creator>
    <dc:date>2016-06-20T06:30:39Z</dc:date>
    <item>
      <title>How to pass parameters that have spaces in the name to the Splunk REST API?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-pass-parameters-that-have-spaces-in-the-name-to-the/m-p/213499#M41944</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;

&lt;P&gt;I am using the Splunk REST API to get the results in JSON from Splunk reports. I am able to get the results when the report name does not have any spaces in its name. However, when we have a space in the name, the REST API is unable to find the report and giving "unable to find saved search" error.&lt;/P&gt;

&lt;P&gt;This is the endpoint I'm using:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;curl -k -u userName:password &lt;A href="https://localhost:8089/servicesNS/admin/search/search/jobs/export" target="test_blank"&gt;https://localhost:8089/servicesNS/admin/search/search/jobs/export&lt;/A&gt; -d search="savedsearch "reportName"" -d output_mode=json
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 20 Jun 2016 06:30:39 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-pass-parameters-that-have-spaces-in-the-name-to-the/m-p/213499#M41944</guid>
      <dc:creator>vamsy7</dc:creator>
      <dc:date>2016-06-20T06:30:39Z</dc:date>
    </item>
    <item>
      <title>Re: How to pass parameters that have spaces in the name to the Splunk REST API?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-pass-parameters-that-have-spaces-in-the-name-to-the/m-p/213500#M41945</link>
      <description>&lt;P&gt;HI vamsy7, you'll have to uri encode the string, basically replacing the space and any other special characters with a encode symbol&lt;/P&gt;

&lt;P&gt;There are many ways to do this, here's a good utility that does it : &lt;A href="http://meyerweb.com/eric/tools/dencoder/"&gt;http://meyerweb.com/eric/tools/dencoder/&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;For instance, %20 is the encoded symbol for a whitespace character.&lt;/P&gt;

&lt;P&gt;Please let me know if this answers your question!&lt;/P&gt;</description>
      <pubDate>Mon, 20 Jun 2016 20:12:32 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-pass-parameters-that-have-spaces-in-the-name-to-the/m-p/213500#M41945</guid>
      <dc:creator>muebel</dc:creator>
      <dc:date>2016-06-20T20:12:32Z</dc:date>
    </item>
  </channel>
</rss>

