<?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: Splunk search Using CURL is not working in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Splunk-search-Using-CURL-is-not-working/m-p/533328#M150689</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;You need to escape double quote, please use below curl command and it will work fine.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;curl -k -u user:pass https://server:port/services/search/jobs/export --data-urlencode search="search cs_uri_stem=\"*/reporting/wkReport.xls\" AND (cs_uri_query=\"reportName=Pay+Certification\" OR cs_uri_query=\"reportName=CS+Monthly+Payroll+Cost*\")|stats count by AssociateOID, OrgOID, date, o, reportName" -d output_mode=csv&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 16 Dec 2020 13:26:14 GMT</pubDate>
    <dc:creator>harsmarvania57</dc:creator>
    <dc:date>2020-12-16T13:26:14Z</dc:date>
    <item>
      <title>Splunk search Using CURL is not working</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Splunk-search-Using-CURL-is-not-working/m-p/533309#M150683</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Below used query is working perfectly fine when i searched directly in SPLUNK WEB. but when i use the same query in CURL it's not working. I can able to run basic search using CURL but not this query. Kindly help me on this.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Here is the query i used:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;curl -k -u UserName:Passwd https://splunkurl:port/services/search/jobs/export --data-urlencode search="search cs_uri_stem="*/reporting/wkReport.xls" AND (cs_uri_query="reportName=Pay+Certification" OR cs_uri_query="reportName=CS+Monthly+Payroll+Cost*")|stats count by AssociateOID, OrgOID, date, o, reportName" -d output_mode=csv&lt;/P&gt;&lt;P&gt;Output shows FATEL error.&lt;/P&gt;&lt;P&gt;I removed double qoutes with single quotes in search string and it gives me different error.&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;query:&amp;nbsp;curl -k -u UserName:Passwd https://splunkurl:port/services/search/jobs/export --data-urlencode search="search cs_uri_stem="*/reporting/wkReport.xls" AND (cs_uri_query="reportName=Pay+Certification" OR cs_uri_query="reportName=CS+Monthly+Payroll+Cost*")|stats count by AssociateOID, OrgOID, date, o, reportName" -d output_mode=csv&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Output shows stats is not recognized as internal/external command.&lt;/P&gt;&lt;P&gt;Kindly help me out on this.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 16 Dec 2020 10:14:08 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Splunk-search-Using-CURL-is-not-working/m-p/533309#M150683</guid>
      <dc:creator>manoharkalva</dc:creator>
      <dc:date>2020-12-16T10:14:08Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk search Using CURL is not working</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Splunk-search-Using-CURL-is-not-working/m-p/533328#M150689</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;You need to escape double quote, please use below curl command and it will work fine.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;curl -k -u user:pass https://server:port/services/search/jobs/export --data-urlencode search="search cs_uri_stem=\"*/reporting/wkReport.xls\" AND (cs_uri_query=\"reportName=Pay+Certification\" OR cs_uri_query=\"reportName=CS+Monthly+Payroll+Cost*\")|stats count by AssociateOID, OrgOID, date, o, reportName" -d output_mode=csv&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 16 Dec 2020 13:26:14 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Splunk-search-Using-CURL-is-not-working/m-p/533328#M150689</guid>
      <dc:creator>harsmarvania57</dc:creator>
      <dc:date>2020-12-16T13:26:14Z</dc:date>
    </item>
  </channel>
</rss>

