title: Having trouble getting data from Splunk using rest api
body: <p>I am using rest api to get the data from Splunk through command-line -interface. Below is my curl command to get the data.</p>
  
  <pre><code>curl  -ku  admin:pwrd https://localhost:8080/servicesNS/admin/app/search/jobs -d search="search index=policy sourcetype=smaccess source="/app/CA/log/smaccess.log" earliest=-1d | bin _time span=1d | eval date = strftime(_time, "%m/%d/%Y") | stats dc(uid) as ActiveUsers by date"
  
  </code></pre>
  
  <p>I'm getting below exception while trying with the above curl command.</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;response&gt;
    &lt;messages&gt;
      &lt;msg type="ERROR"&gt;Unparsable URI-encoded request data&lt;/msg&gt;
    &lt;/messages&gt;
  &lt;/response&gt;
  
  </code></pre>
  
  <p>It was working without this <code>eval date = strftime(_time, "%m/%d/%Y")</code>  in the search query.
  Can someone please help me with this.</p>
  
  <p>Thanks in advance.</p>