<?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: How to get kvstore data using Splunk's REST API in CSV format? in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/How-to-get-kvstore-data-using-Splunk-s-REST-API-in-CSV-format/m-p/467212#M80529</link>
    <description>&lt;P&gt;Use the search endpoints and inputlookup instead:&lt;/P&gt;

&lt;P&gt;&lt;A href="https://docs.splunk.com/Documentation/Splunk/7.3.2/RESTREF/RESTsearch"&gt;https://docs.splunk.com/Documentation/Splunk/7.3.2/RESTREF/RESTsearch&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;The search job endpoint allows you to pull the data in csv format and the inputlookup search command allows you to pull the kvstore data.&lt;/P&gt;</description>
    <pubDate>Tue, 29 Oct 2019 12:53:41 GMT</pubDate>
    <dc:creator>jkat54</dc:creator>
    <dc:date>2019-10-29T12:53:41Z</dc:date>
    <item>
      <title>How to get kvstore data using Splunk's REST API in CSV format?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-get-kvstore-data-using-Splunk-s-REST-API-in-CSV-format/m-p/467211#M80528</link>
      <description>&lt;P&gt;Hi,&lt;BR /&gt;
Is there any way I can get the kvstore data in csv format by using the REST API command via curl?&lt;/P&gt;

&lt;P&gt;Following is the curl command I am using but the output is coming in json format. I tried output_mode=csv, but it's giving an error.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;curl -k -u &amp;lt;uname&amp;gt;:&amp;lt;pwd&amp;gt; &lt;A href="https://&amp;lt;hostname&amp;gt;:8089/servicesNS/nobody/&amp;lt;appName&amp;gt;/storage/collections/data/&amp;lt;collectionName&amp;gt;" target="test_blank"&gt;https://&amp;lt;hostname&amp;gt;:8089/servicesNS/nobody/&amp;lt;appName&amp;gt;/storage/collections/data/&amp;lt;collectionName&amp;gt;&lt;/A&gt;;
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Thanks in advance.&lt;/P&gt;</description>
      <pubDate>Tue, 29 Oct 2019 10:56:55 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-get-kvstore-data-using-Splunk-s-REST-API-in-CSV-format/m-p/467211#M80528</guid>
      <dc:creator>harshal_chakran</dc:creator>
      <dc:date>2019-10-29T10:56:55Z</dc:date>
    </item>
    <item>
      <title>Re: How to get kvstore data using Splunk's REST API in CSV format?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-get-kvstore-data-using-Splunk-s-REST-API-in-CSV-format/m-p/467212#M80529</link>
      <description>&lt;P&gt;Use the search endpoints and inputlookup instead:&lt;/P&gt;

&lt;P&gt;&lt;A href="https://docs.splunk.com/Documentation/Splunk/7.3.2/RESTREF/RESTsearch"&gt;https://docs.splunk.com/Documentation/Splunk/7.3.2/RESTREF/RESTsearch&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;The search job endpoint allows you to pull the data in csv format and the inputlookup search command allows you to pull the kvstore data.&lt;/P&gt;</description>
      <pubDate>Tue, 29 Oct 2019 12:53:41 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-get-kvstore-data-using-Splunk-s-REST-API-in-CSV-format/m-p/467212#M80529</guid>
      <dc:creator>jkat54</dc:creator>
      <dc:date>2019-10-29T12:53:41Z</dc:date>
    </item>
    <item>
      <title>Re: How to get kvstore data using Splunk's REST API in CSV format?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-get-kvstore-data-using-Splunk-s-REST-API-in-CSV-format/m-p/467213#M80530</link>
      <description>&lt;P&gt;Thanks, this helped me to resolve this.&lt;BR /&gt;
So my final curl command came in as :&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;curl -k -u &amp;lt;uname&amp;gt;:&amp;lt;pwd&amp;gt;  &lt;A href="https://&amp;lt;hotsname&amp;gt;:8089/servicesNS/admin/&amp;lt;appName&amp;gt;/search/jobs/export" target="test_blank"&gt;https://&amp;lt;hotsname&amp;gt;:8089/servicesNS/admin/&amp;lt;appName&amp;gt;/search/jobs/export&lt;/A&gt; -d search="|inputlookup &amp;lt;kvstoreName&amp;gt;| table field1, field2, field3" -d output_mode=csv
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 20 Dec 2019 12:50:29 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-get-kvstore-data-using-Splunk-s-REST-API-in-CSV-format/m-p/467213#M80530</guid>
      <dc:creator>harshal_chakran</dc:creator>
      <dc:date>2019-12-20T12:50:29Z</dc:date>
    </item>
  </channel>
</rss>

