<?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: Private Lookup table creation by REST API in Dashboards &amp; Visualizations</title>
    <link>https://community.splunk.com/t5/Dashboards-Visualizations/Private-Lookup-table-creation-by-REST-API/m-p/336020#M43032</link>
    <description>&lt;P&gt;Hi,&lt;BR /&gt;
 I have to create private lookup table for individual users, such that none other users can view each other lookup table. This private lookup table I could able to create by this REST API.&lt;/P&gt;

&lt;P&gt;curl -k -u username:pwd &lt;A href="https://localhost:8089/servicesNS/username/app_name/data/lookup-table-files" target="_blank"&gt;https://localhost:8089/servicesNS/username/app_name/data/lookup-table-files&lt;/A&gt; -d 'eai:data=/opt/splunk/var/run/splunk/lookup_tmp/user_tmp_lookup.csv' -d 'name=user_april.csv'&lt;BR /&gt;
With this I could able to create lookup table for individual user. This will create 'user_tmp_lookup.csv' inside '/opt/splunk/etc/users/username/app_name/lookup/'.&lt;/P&gt;

&lt;P&gt;But, before this 'user_tmp_lookup.csv' should be present in lookup staging area. i.e. at this location '/opt/splunk/var/run/splunk/lookup_tmp/user_tmp_lookup.csv'. This I am doing manually, How can I create lookup at staging area?&lt;/P&gt;</description>
    <pubDate>Tue, 29 Sep 2020 13:41:24 GMT</pubDate>
    <dc:creator>sumangala</dc:creator>
    <dc:date>2020-09-29T13:41:24Z</dc:date>
    <item>
      <title>Private Lookup table creation by REST API</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Private-Lookup-table-creation-by-REST-API/m-p/336014#M43026</link>
      <description>&lt;P&gt;As I am working on network security project. I need to create private lookup table for individual users, such that any other user shouldn't see the content of other users Lookup table.&lt;BR /&gt;
I have created Lookup table by:&lt;BR /&gt;
curl -k -u username:pwd &lt;A href="https://localhost:8089/servicesNS/nobody/*appname*/data/lookup-table-files" target="_blank"&gt;https://localhost:8089/servicesNS/nobody/*appname*/data/lookup-table-files&lt;/A&gt; -d 'eai:data=/opt/splunk/var/run/splunk/lookup_tmp/april.csv' -d 'name=12_april_lookup.csv'&lt;BR /&gt;
This created '12_april_lookup.csv' file inside .../my_app/lookup/ folder. This Lookup table permission is private at this point.&lt;/P&gt;

&lt;P&gt;But,&lt;BR /&gt;
When I add some data to Lookup table by below search command:&lt;BR /&gt;
| makeresults | eval name="xyz" | eval token="12345"| outputlookup 12_april_lookup.csv append=True createinapp=True&lt;BR /&gt;
then file will get created in other app folder with become global permission. Now all user can view file content by&lt;BR /&gt;
|inputlookup 12_april_lookup.csv&lt;/P&gt;

&lt;P&gt;Can anyone help me to resolve this?&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 13:43:52 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Private-Lookup-table-creation-by-REST-API/m-p/336014#M43026</guid>
      <dc:creator>sumangala</dc:creator>
      <dc:date>2020-09-29T13:43:52Z</dc:date>
    </item>
    <item>
      <title>Re: Private Lookup table creation by REST API</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Private-Lookup-table-creation-by-REST-API/m-p/336015#M43027</link>
      <description>&lt;P&gt;Are you specifying an app context when you append data?  Have you tried lowercase 'true' instead of True on createinapp?  The documentation says lowercase but doesn't say it must be lowercase but in code we have to interpret your input somehow... Sometimes we expect you may use , 1, T, true, TRUE, True, tRuE... Sometimes we don't &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 17 Apr 2017 11:31:28 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Private-Lookup-table-creation-by-REST-API/m-p/336015#M43027</guid>
      <dc:creator>jkat54</dc:creator>
      <dc:date>2017-04-17T11:31:28Z</dc:date>
    </item>
    <item>
      <title>Re: Private Lookup table creation by REST API</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Private-Lookup-table-creation-by-REST-API/m-p/336016#M43028</link>
      <description>&lt;P&gt;Hi Sumangala,&lt;/P&gt;

&lt;P&gt;What app are you in when you run "| makeresults | eval name="xyz" | eval token="12345"| outputlookup 12_april_lookup.csv append=True createinapp=True"? If it isn't the same app where you created the initial lookup, Splunk will create a new lookup in the app in which you ran that "| makeresults..." query. &lt;/P&gt;

&lt;P&gt;All you should have to do to fix this is switch over to &lt;EM&gt;appname&lt;/EM&gt; in SplunkWeb and run the query again.&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 13:40:56 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Private-Lookup-table-creation-by-REST-API/m-p/336016#M43028</guid>
      <dc:creator>jonmargulies</dc:creator>
      <dc:date>2020-09-29T13:40:56Z</dc:date>
    </item>
    <item>
      <title>Re: Private Lookup table creation by REST API</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Private-Lookup-table-creation-by-REST-API/m-p/336017#M43029</link>
      <description>&lt;P&gt;Hi,&lt;BR /&gt;
Thank u for your response. &lt;BR /&gt;
Ya. Today morning I got to know mistake I was doing. Actually I have created custom splunk app, which doesn't have search window. By default other app was set for search. So all my lookup tables were created in other app folder.&lt;BR /&gt;
Currently, &lt;BR /&gt;
I have facing problem in creating lookup table at lookup stage area ('/opt/splunk/var/run/splunk/lookup_tmp/') as its owner and group owner is splunk. Other users are not allowed to create lookup table at this folder.&lt;BR /&gt;
I have searched many answer for this. As there is no REST API to create lookup table at stage area.&lt;BR /&gt;
How can user create csv file at lookup stage?&lt;BR /&gt;
Currently I am creating with changing folder owner from splunk to username. But this is not a correct way.&lt;BR /&gt;
Can u guide me through ?&lt;/P&gt;</description>
      <pubDate>Mon, 17 Apr 2017 13:03:57 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Private-Lookup-table-creation-by-REST-API/m-p/336017#M43029</guid>
      <dc:creator>sumangala</dc:creator>
      <dc:date>2017-04-17T13:03:57Z</dc:date>
    </item>
    <item>
      <title>Re: Private Lookup table creation by REST API</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Private-Lookup-table-creation-by-REST-API/m-p/336018#M43030</link>
      <description>&lt;P&gt;What are you ultimately trying to accomplish? I only ask because I can't think of any reason you would need to create a lookup table manually in &lt;CODE&gt;/opt/splunk/var/run/splunk&lt;/CODE&gt;.&lt;/P&gt;</description>
      <pubDate>Mon, 17 Apr 2017 14:06:42 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Private-Lookup-table-creation-by-REST-API/m-p/336018#M43030</guid>
      <dc:creator>jonmargulies</dc:creator>
      <dc:date>2017-04-17T14:06:42Z</dc:date>
    </item>
    <item>
      <title>Re: Private Lookup table creation by REST API</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Private-Lookup-table-creation-by-REST-API/m-p/336019#M43031</link>
      <description>&lt;P&gt;so then my answer regarding if you were specifying the app context was correct for your original question.  Please mark an answer as the answer and open a new question concerning the "lookup stage area".&lt;/P&gt;

&lt;P&gt;Thanks,&lt;BR /&gt;
jkat54&lt;/P&gt;</description>
      <pubDate>Mon, 17 Apr 2017 17:40:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Private-Lookup-table-creation-by-REST-API/m-p/336019#M43031</guid>
      <dc:creator>jkat54</dc:creator>
      <dc:date>2017-04-17T17:40:09Z</dc:date>
    </item>
    <item>
      <title>Re: Private Lookup table creation by REST API</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Private-Lookup-table-creation-by-REST-API/m-p/336020#M43032</link>
      <description>&lt;P&gt;Hi,&lt;BR /&gt;
 I have to create private lookup table for individual users, such that none other users can view each other lookup table. This private lookup table I could able to create by this REST API.&lt;/P&gt;

&lt;P&gt;curl -k -u username:pwd &lt;A href="https://localhost:8089/servicesNS/username/app_name/data/lookup-table-files" target="_blank"&gt;https://localhost:8089/servicesNS/username/app_name/data/lookup-table-files&lt;/A&gt; -d 'eai:data=/opt/splunk/var/run/splunk/lookup_tmp/user_tmp_lookup.csv' -d 'name=user_april.csv'&lt;BR /&gt;
With this I could able to create lookup table for individual user. This will create 'user_tmp_lookup.csv' inside '/opt/splunk/etc/users/username/app_name/lookup/'.&lt;/P&gt;

&lt;P&gt;But, before this 'user_tmp_lookup.csv' should be present in lookup staging area. i.e. at this location '/opt/splunk/var/run/splunk/lookup_tmp/user_tmp_lookup.csv'. This I am doing manually, How can I create lookup at staging area?&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 13:41:24 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Private-Lookup-table-creation-by-REST-API/m-p/336020#M43032</guid>
      <dc:creator>sumangala</dc:creator>
      <dc:date>2020-09-29T13:41:24Z</dc:date>
    </item>
  </channel>
</rss>

