<?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 upload updated lookup CSV to Splunk Cloud using REST API WITHOUT using the UI? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-upload-updated-lookup-CSV-to-Splunk-Cloud-using-REST-API/m-p/260384#M78064</link>
    <description>&lt;P&gt;I also would like a flexible API to upload data, I ll keep investigating but unfortunately for a project I am working on the uploader or doing it by end is not right&lt;BR /&gt;
I hope they answer with something workable&lt;/P&gt;</description>
    <pubDate>Wed, 02 Mar 2016 22:12:32 GMT</pubDate>
    <dc:creator>bizmate</dc:creator>
    <dc:date>2016-03-02T22:12:32Z</dc:date>
    <item>
      <title>How to upload updated lookup CSV to Splunk Cloud using REST API WITHOUT using the UI?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-upload-updated-lookup-CSV-to-Splunk-Cloud-using-REST-API/m-p/260382#M78062</link>
      <description>&lt;P&gt;We're heavy SplunkCloud users and have run into a roadblock.  We have a lookup CSV file that needs to be updated daily - slowly changing customer information - but try as I might, I cannot find an automated way to upload these CSVs without using the Web user interface.  &lt;/P&gt;

&lt;P&gt;The closest thing I can find is&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&lt;A href="https://&amp;lt;host&amp;gt;:&amp;lt;mPort&amp;gt;/services/data/lookup-table-files/{name}" target="test_blank"&gt;https://&amp;lt;host&amp;gt;:&amp;lt;mPort&amp;gt;/services/data/lookup-table-files/{name}&lt;/A&gt;
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;where the POST method will allow you to "Modify a lookup table file by replacing it with a file from&lt;BR /&gt;
the upload staging area."&lt;/P&gt;

&lt;P&gt;But in SplunkCloud, we don't have access to the upload staging area - we don't have file access at all, as far as I can tell.&lt;/P&gt;

&lt;P&gt;How can this be done?  I'd like to do this using something simple like curl:&lt;/P&gt;

&lt;P&gt;curl -k -u admin:password --form upload=@/home/me/lookup.csv &lt;A href="https://mycompany.splunkcloud.com:8089/rest-api-call-to-upload-and-update-existing-csv-lookup"&gt;https://mycompany.splunkcloud.com:8089/rest-api-call-to-upload-and-update-existing-csv-lookup&lt;/A&gt; &lt;/P&gt;</description>
      <pubDate>Wed, 02 Dec 2015 17:41:13 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-upload-updated-lookup-CSV-to-Splunk-Cloud-using-REST-API/m-p/260382#M78062</guid>
      <dc:creator>gkiffney</dc:creator>
      <dc:date>2015-12-02T17:41:13Z</dc:date>
    </item>
    <item>
      <title>Re: How to upload updated lookup CSV to Splunk Cloud using REST API WITHOUT using the UI?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-upload-updated-lookup-CSV-to-Splunk-Cloud-using-REST-API/m-p/260383#M78063</link>
      <description>&lt;P&gt;I also have this question. It doesn't seem to be possible via the API, which is silly considering you can use the GUI to upload lookup tables remotely without having to jump through the staging area hoops. Hopefully the API has or will implement similar capabilities.&lt;/P&gt;</description>
      <pubDate>Wed, 23 Dec 2015 23:33:03 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-upload-updated-lookup-CSV-to-Splunk-Cloud-using-REST-API/m-p/260383#M78063</guid>
      <dc:creator>clong_</dc:creator>
      <dc:date>2015-12-23T23:33:03Z</dc:date>
    </item>
    <item>
      <title>Re: How to upload updated lookup CSV to Splunk Cloud using REST API WITHOUT using the UI?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-upload-updated-lookup-CSV-to-Splunk-Cloud-using-REST-API/m-p/260384#M78064</link>
      <description>&lt;P&gt;I also would like a flexible API to upload data, I ll keep investigating but unfortunately for a project I am working on the uploader or doing it by end is not right&lt;BR /&gt;
I hope they answer with something workable&lt;/P&gt;</description>
      <pubDate>Wed, 02 Mar 2016 22:12:32 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-upload-updated-lookup-CSV-to-Splunk-Cloud-using-REST-API/m-p/260384#M78064</guid>
      <dc:creator>bizmate</dc:creator>
      <dc:date>2016-03-02T22:12:32Z</dc:date>
    </item>
    <item>
      <title>Re: How to upload updated lookup CSV to Splunk Cloud using REST API WITHOUT using the UI?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-upload-updated-lookup-CSV-to-Splunk-Cloud-using-REST-API/m-p/260385#M78065</link>
      <description>&lt;P&gt;I am using the Java SDK and would like to be able to add watch lists to Spunk i.e publish IOC's as a lookup that I can the use is queries.&lt;/P&gt;

&lt;P&gt;Note I have already implemented the API's to allow me to connect/auth and execute queries. I take these results  and analyze the results. This leaves me with a list of known threats. I then want to automatically publish these back to Splunk as a Black Watch List.&lt;/P&gt;

&lt;P&gt;Does anyone know how to do this ?&lt;/P&gt;</description>
      <pubDate>Tue, 08 Mar 2016 23:46:13 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-upload-updated-lookup-CSV-to-Splunk-Cloud-using-REST-API/m-p/260385#M78065</guid>
      <dc:creator>simonnallen</dc:creator>
      <dc:date>2016-03-08T23:46:13Z</dc:date>
    </item>
    <item>
      <title>Re: How to upload updated lookup CSV to Splunk Cloud using REST API WITHOUT using the UI?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-upload-updated-lookup-CSV-to-Splunk-Cloud-using-REST-API/m-p/260386#M78066</link>
      <description>&lt;P&gt;This isn't an answer, more of a workaround. I upload the CSV file, a list of practices, to splunk cloud using the forwarder. In props.conf I have this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[source::.../lookups/ss_practices.csv]
DATETIME_CONFIG=CURRENT
NO_BINARY_CHECK=true
INDEXED_EXTRACTIONS=CSV
HEADER_FIELD_LINE_NUMBER=1
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;And I run a scheduled report that looks like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=smrts_maint source="*ss_practices.csv" sourcetype=CSV | table NATIVE_PRACTICE_ID CUSTOMER_NAME STREET CITY STATE_REGION POSTAL_CODE COUNTRY_CODE_A2 COUNTRY_NAME TELEPHONE LAT LON | outputlookup ss_practices.csv
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;and that updates the lookup table ss_practices.csv. DATETIME_CONFIG = CURRENT is necessary to keep Splunk from trying to guess timestamps for the rows in your csv file if it has no timestamps.&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 09:01:34 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-upload-updated-lookup-CSV-to-Splunk-Cloud-using-REST-API/m-p/260386#M78066</guid>
      <dc:creator>gkiffney</dc:creator>
      <dc:date>2020-09-29T09:01:34Z</dc:date>
    </item>
    <item>
      <title>Re: How to upload updated lookup CSV to Splunk Cloud using REST API WITHOUT using the UI?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-upload-updated-lookup-CSV-to-Splunk-Cloud-using-REST-API/m-p/260387#M78067</link>
      <description>&lt;P&gt;+1 To this question.  I have a lookup table that I'd like to update on a daily basis from a cron job.  It would be great if there was a RESTful way to do this.&lt;/P&gt;</description>
      <pubDate>Wed, 09 Mar 2016 15:07:55 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-upload-updated-lookup-CSV-to-Splunk-Cloud-using-REST-API/m-p/260387#M78067</guid>
      <dc:creator>mbintz</dc:creator>
      <dc:date>2016-03-09T15:07:55Z</dc:date>
    </item>
    <item>
      <title>Re: How to upload updated lookup CSV to Splunk Cloud using REST API WITHOUT using the UI?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-upload-updated-lookup-CSV-to-Splunk-Cloud-using-REST-API/m-p/260388#M78068</link>
      <description>&lt;P&gt;I looked into this and found no way to do this via REST, even via undocumented endpoints.  I looked at the &lt;CODE&gt;splunkd_access&lt;/CODE&gt; logs from a timeperiod during which I uploaded a CSV and saw no reference to the upload going through the API.  It seems that splunkweb handles the upload and storing the CSV on disk, and then calls a REST endpoint to create the lookup itself using the uploaded file.&lt;/P&gt;

&lt;P&gt;Unfortunately I think the answer to this question is simply that it's not possible.&lt;/P&gt;</description>
      <pubDate>Thu, 21 Dec 2017 00:51:05 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-upload-updated-lookup-CSV-to-Splunk-Cloud-using-REST-API/m-p/260388#M78068</guid>
      <dc:creator>micahkemp</dc:creator>
      <dc:date>2017-12-21T00:51:05Z</dc:date>
    </item>
    <item>
      <title>Re: How to upload updated lookup CSV to Splunk Cloud using REST API WITHOUT using the UI?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-upload-updated-lookup-CSV-to-Splunk-Cloud-using-REST-API/m-p/260389#M78069</link>
      <description>&lt;P&gt;I documented an answer for this that I believe can be used for cloud customer here: &lt;A href="https://answers.splunk.com/answers/694345/how-to-upload-csv-data-file-into-splunk-by-using-r.html?childToView=816912#answer-816912"&gt;https://answers.splunk.com/answers/694345/how-to-upload-csv-data-file-into-splunk-by-using-r.html?childToView=816912#answer-816912&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;It requires powershell, but if some enterprising soul wants to port the concepts to another language, it should be possible.&lt;/P&gt;</description>
      <pubDate>Tue, 14 Apr 2020 15:57:17 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-upload-updated-lookup-CSV-to-Splunk-Cloud-using-REST-API/m-p/260389#M78069</guid>
      <dc:creator>dmarling</dc:creator>
      <dc:date>2020-04-14T15:57:17Z</dc:date>
    </item>
    <item>
      <title>Re: How to upload updated lookup CSV to Splunk Cloud using REST API WITHOUT using the UI?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-upload-updated-lookup-CSV-to-Splunk-Cloud-using-REST-API/m-p/643811#M223029</link>
      <description>&lt;P&gt;I also took a similar approach based on your answer. I used a scripted input to download the csv I needed and pull it into an index and then your sourcetype for formatting.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;../app/bin/download_csv.sh&lt;BR /&gt;Ensure that this file has the right permissions for the splunkd user, I also ensured that it was executable.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;#!/bin/bash

URL="https://www.somesite.com/myfile.csv"

curl -k -s $URL&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;../app/local/inputs.conf&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;[script://./bin/download_csv.sh]
disabled = false
interval = * * * * *
index = myindex
sourcetype = mytype_csv&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;../app/local/props.conf&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;[mytype_csv]
DATETIME_CONFIG=CURRENT
NO_BINARY_CHECK=true
INDEXED_EXTRACTIONS=CSV
HEADER_FIELD_LINE_NUMBER=1&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Then I'll update the csv in a similar fashion to your own with the search.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 18 May 2023 17:19:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-upload-updated-lookup-CSV-to-Splunk-Cloud-using-REST-API/m-p/643811#M223029</guid>
      <dc:creator>Micheal_S</dc:creator>
      <dc:date>2023-05-18T17:19:02Z</dc:date>
    </item>
  </channel>
</rss>

