<?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: export search results using curl in Reporting</title>
    <link>https://community.splunk.com/t5/Reporting/export-search-results-using-curl/m-p/72324#M1638</link>
    <description>&lt;P&gt;Saw this in another post that shows the correct format of the dataurl encode ( &lt;A href="http://answers.splunk.com/answers/64345/how-to-export-the-last-25-hours-of-data-using-curl"&gt;http://answers.splunk.com/answers/64345/how-to-export-the-last-25-hours-of-data-using-curl&lt;/A&gt; )&lt;/P&gt;

&lt;P&gt;So the command should be something like : &lt;/P&gt;

&lt;P&gt;curl -k -u admin:password -d "output_mode=csv" -o /home/sample1.csv&lt;BR /&gt;
     &lt;A href="https://splunk.server:8089/servicesNS/admin/search/search/jobs/export"&gt;https://splunk.server:8089/servicesNS/admin/search/search/jobs/export&lt;/A&gt;&lt;BR /&gt;
     --data-urlencode 'search=search earliest=-1d@d latest=@d index=blah&lt;BR /&gt;
     source=log.tar.*'&lt;/P&gt;</description>
    <pubDate>Thu, 26 Sep 2013 02:06:02 GMT</pubDate>
    <dc:creator>Lucas_K</dc:creator>
    <dc:date>2013-09-26T02:06:02Z</dc:date>
    <item>
      <title>export search results using curl</title>
      <link>https://community.splunk.com/t5/Reporting/export-search-results-using-curl/m-p/72323#M1637</link>
      <description>&lt;P&gt;Hi,&lt;BR /&gt;
I was advised that curl was a workaround used for exporting search results to csv. &lt;BR /&gt;
Problem is I do not know how to export specific jobs in the jobs manager and I need assistance with the correct syntax:&lt;/P&gt;

&lt;P&gt;curl -k -u admin:password! -o 120979_curl.csv --data-urlencode search="search source=log.tar.*" -d "output_mode=csv" exampleurl:8089/servicesNS/admin/search/search/jobs/export&lt;/P&gt;

&lt;P&gt;I suspect it is not working because of the search= source=log.tar.* being incorrect... What should I be adding in this field so I download the correct job?&lt;/P&gt;

&lt;P&gt;The search I ran was the following &lt;BR /&gt;
search * | regex _raw=".*/[a-f0-9]{32}/[a-z]{1,15}-[a-z]{1,15}.php" and this is how it appears in teh job manager.&lt;/P&gt;

&lt;P&gt;Lastly if I wanted to view the search jobs results on the cli - where would I find the results and couldn't I just scp this file off instead of using curl?&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 14:50:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Reporting/export-search-results-using-curl/m-p/72323#M1637</guid>
      <dc:creator>jonathanfalconi</dc:creator>
      <dc:date>2020-09-28T14:50:31Z</dc:date>
    </item>
    <item>
      <title>Re: export search results using curl</title>
      <link>https://community.splunk.com/t5/Reporting/export-search-results-using-curl/m-p/72324#M1638</link>
      <description>&lt;P&gt;Saw this in another post that shows the correct format of the dataurl encode ( &lt;A href="http://answers.splunk.com/answers/64345/how-to-export-the-last-25-hours-of-data-using-curl"&gt;http://answers.splunk.com/answers/64345/how-to-export-the-last-25-hours-of-data-using-curl&lt;/A&gt; )&lt;/P&gt;

&lt;P&gt;So the command should be something like : &lt;/P&gt;

&lt;P&gt;curl -k -u admin:password -d "output_mode=csv" -o /home/sample1.csv&lt;BR /&gt;
     &lt;A href="https://splunk.server:8089/servicesNS/admin/search/search/jobs/export"&gt;https://splunk.server:8089/servicesNS/admin/search/search/jobs/export&lt;/A&gt;&lt;BR /&gt;
     --data-urlencode 'search=search earliest=-1d@d latest=@d index=blah&lt;BR /&gt;
     source=log.tar.*'&lt;/P&gt;</description>
      <pubDate>Thu, 26 Sep 2013 02:06:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Reporting/export-search-results-using-curl/m-p/72324#M1638</guid>
      <dc:creator>Lucas_K</dc:creator>
      <dc:date>2013-09-26T02:06:02Z</dc:date>
    </item>
    <item>
      <title>Re: export search results using curl</title>
      <link>https://community.splunk.com/t5/Reporting/export-search-results-using-curl/m-p/72325#M1639</link>
      <description>&lt;P&gt;I ran a search using this syntax, and received the error "curl: option --data-urlencode: is unknown"&lt;/P&gt;

&lt;P&gt;Any ideas?&lt;/P&gt;</description>
      <pubDate>Fri, 17 Jun 2016 20:39:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Reporting/export-search-results-using-curl/m-p/72325#M1639</guid>
      <dc:creator>benjaminw</dc:creator>
      <dc:date>2016-06-17T20:39:38Z</dc:date>
    </item>
  </channel>
</rss>

