<?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 How to add token input to setup.xml? in Dashboards &amp; Visualizations</title>
    <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-add-token-input-to-setup-xml/m-p/271180#M17178</link>
    <description>&lt;P&gt;Hi. &lt;/P&gt;

&lt;P&gt;I want to create small app for Splunk Enterprise which gets data from a third part API, using a token. That means the customer should be able to input the token for this app. I use setup.xml to have the ability to save customer data. Tried this solution from docs:&lt;BR /&gt;
&lt;A href="http://docs.splunk.com/Documentation/Splunk/4.3.1/Developer/SetupExampleCustom"&gt;http://docs.splunk.com/Documentation/Splunk/4.3.1/Developer/SetupExampleCustom&lt;/A&gt; , but it doesn't work. Also I've used this solution &lt;A href="https://answers.splunk.com/answers/105339/how-do-i-allow-users-to-edit-credentials-using-the-setup-screen.html"&gt;https://answers.splunk.com/answers/105339/how-do-i-allow-users-to-edit-credentials-using-the-setup-screen.html&lt;/A&gt; &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;setup&amp;gt;
   &amp;lt;block title="Thread Bare Credential" endpoint="storage/passwords" entity="tedward*" mode="iter" eai_strict="false"&amp;gt;
     &amp;lt;input field="password"&amp;gt;
       &amp;lt;label&amp;gt;Password for $username$&amp;lt;/label&amp;gt;
       &amp;lt;type&amp;gt;password&amp;lt;/type&amp;gt;
     &amp;lt;/input&amp;gt;
   &amp;lt;/block&amp;gt;
  &amp;lt;/setup&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;But I don't know how to create credentials for the first time because Wplunk requires existing creds for tedward. Any suggestion what can I do? Maybe some other way than setup.xml&lt;/P&gt;

&lt;P&gt;Thanks&lt;/P&gt;</description>
    <pubDate>Tue, 13 Oct 2015 15:14:55 GMT</pubDate>
    <dc:creator>sergiyyarinovsk</dc:creator>
    <dc:date>2015-10-13T15:14:55Z</dc:date>
    <item>
      <title>How to add token input to setup.xml?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-add-token-input-to-setup-xml/m-p/271180#M17178</link>
      <description>&lt;P&gt;Hi. &lt;/P&gt;

&lt;P&gt;I want to create small app for Splunk Enterprise which gets data from a third part API, using a token. That means the customer should be able to input the token for this app. I use setup.xml to have the ability to save customer data. Tried this solution from docs:&lt;BR /&gt;
&lt;A href="http://docs.splunk.com/Documentation/Splunk/4.3.1/Developer/SetupExampleCustom"&gt;http://docs.splunk.com/Documentation/Splunk/4.3.1/Developer/SetupExampleCustom&lt;/A&gt; , but it doesn't work. Also I've used this solution &lt;A href="https://answers.splunk.com/answers/105339/how-do-i-allow-users-to-edit-credentials-using-the-setup-screen.html"&gt;https://answers.splunk.com/answers/105339/how-do-i-allow-users-to-edit-credentials-using-the-setup-screen.html&lt;/A&gt; &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;setup&amp;gt;
   &amp;lt;block title="Thread Bare Credential" endpoint="storage/passwords" entity="tedward*" mode="iter" eai_strict="false"&amp;gt;
     &amp;lt;input field="password"&amp;gt;
       &amp;lt;label&amp;gt;Password for $username$&amp;lt;/label&amp;gt;
       &amp;lt;type&amp;gt;password&amp;lt;/type&amp;gt;
     &amp;lt;/input&amp;gt;
   &amp;lt;/block&amp;gt;
  &amp;lt;/setup&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;But I don't know how to create credentials for the first time because Wplunk requires existing creds for tedward. Any suggestion what can I do? Maybe some other way than setup.xml&lt;/P&gt;

&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Tue, 13 Oct 2015 15:14:55 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-add-token-input-to-setup-xml/m-p/271180#M17178</guid>
      <dc:creator>sergiyyarinovsk</dc:creator>
      <dc:date>2015-10-13T15:14:55Z</dc:date>
    </item>
    <item>
      <title>Re: How to add token input to setup.xml?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-add-token-input-to-setup-xml/m-p/271181#M17179</link>
      <description>&lt;P&gt;What version of Splunk Enterprise are you using? Your doc link is from 4.3, which has reached end of life.&lt;/P&gt;</description>
      <pubDate>Tue, 13 Oct 2015 17:31:19 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-add-token-input-to-setup-xml/m-p/271181#M17179</guid>
      <dc:creator>ChrisG</dc:creator>
      <dc:date>2015-10-13T17:31:19Z</dc:date>
    </item>
    <item>
      <title>Re: How to add token input to setup.xml?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-add-token-input-to-setup-xml/m-p/271182#M17180</link>
      <description>&lt;P&gt;I am using 6.3. But docs are identical for both versions: &lt;A href="http://docs.splunk.com/Documentation/Splunk/6.3.0/AdvancedDev/SetupExampleCustom"&gt;http://docs.splunk.com/Documentation/Splunk/6.3.0/AdvancedDev/SetupExampleCustom&lt;/A&gt;&lt;BR /&gt;
Weird that it does not work from doc &lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt; And error is:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;2015-10-15 12:15:31,508 DEBUG   [561f6eb2f1107002f90] _cplogging:55 - [15/Oct/2015:12:15:31] HTTP Traceback (most recent call last):
  File "/Applications/Splunk/lib/python2.7/site-packages/cherrypy/_cprequest.py", line 606, in respond
    cherrypy.response.body = self.handler()
  File "/Applications/Splunk/lib/python2.7/site-packages/cherrypy/_cpdispatch.py", line 25, in __call__
    return self.callable(*self.args, **self.kwargs)
  File "/Applications/Splunk/lib/python2.7/site-packages/splunk/appserver/mrsparkle/lib/routes.py", line 366, in default
    return route.target(self, **kw)
  File "&amp;lt;string&amp;gt;", line 1, in &amp;lt;lambda&amp;gt;
  File "/Applications/Splunk/lib/python2.7/site-packages/splunk/appserver/mrsparkle/lib/decorators.py", line 38, in rundecs
    return fn(*a, **kw)
  File "&amp;lt;string&amp;gt;", line 1, in &amp;lt;lambda&amp;gt;
  File "/Applications/Splunk/lib/python2.7/site-packages/splunk/appserver/mrsparkle/lib/decorators.py", line 118, in check
    return fn(self, *a, **kw)
  File "&amp;lt;string&amp;gt;", line 1, in &amp;lt;lambda&amp;gt;
  File "/Applications/Splunk/lib/python2.7/site-packages/splunk/appserver/mrsparkle/lib/decorators.py", line 167, in validate_ip
    return fn(self, *a, **kw)
  File "&amp;lt;string&amp;gt;", line 1, in &amp;lt;lambda&amp;gt;
  File "/Applications/Splunk/lib/python2.7/site-packages/splunk/appserver/mrsparkle/lib/decorators.py", line 335, in preform_sso_check
    return fn(self, *a, **kw)
  File "&amp;lt;string&amp;gt;", line 1, in &amp;lt;lambda&amp;gt;
  File "/Applications/Splunk/lib/python2.7/site-packages/splunk/appserver/mrsparkle/lib/decorators.py", line 387, in check_login
    return fn(self, *a, **kw)
  File "&amp;lt;string&amp;gt;", line 1, in &amp;lt;lambda&amp;gt;
  File "/Applications/Splunk/lib/python2.7/site-packages/splunk/appserver/mrsparkle/lib/decorators.py", line 407, in handle_exceptions
    return fn(self, *a, **kw)
  File "&amp;lt;string&amp;gt;", line 1, in &amp;lt;lambda&amp;gt;
  File "/Applications/Splunk/lib/python2.7/site-packages/splunk/appserver/mrsparkle/lib/decorators.py", line 462, in apply_cache_headers
    response = fn(self, *a, **kw)
  File "/Applications/Splunk/lib/python2.7/site-packages/splunk/appserver/mrsparkle/controllers/admin.py", line 1567, in listEntities
    self.flattenElements(uiHelper['elements'], uiHelper_elements)
KeyError: 'elements'
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 15 Oct 2015 09:32:08 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-add-token-input-to-setup-xml/m-p/271182#M17180</guid>
      <dc:creator>sergiyyarinovsk</dc:creator>
      <dc:date>2015-10-15T09:32:08Z</dc:date>
    </item>
    <item>
      <title>Re: How to add token input to setup.xml?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-add-token-input-to-setup-xml/m-p/271183#M17181</link>
      <description>&lt;P&gt;Ok. So solution for now is:&lt;/P&gt;

&lt;P&gt;setup.xml:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;setup&amp;gt;
  &amp;lt;block title="" endpoint="admin/conf-inputs" entity="API token"&amp;gt;
    &amp;lt;input field="token"&amp;gt;
      &amp;lt;label&amp;gt;API token&amp;lt;/label&amp;gt;
      &amp;lt;type&amp;gt;text&amp;lt;/type&amp;gt;
    &amp;lt;/input&amp;gt;
  &amp;lt;/block&amp;gt;
&amp;lt;/setup&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;myapp/default/inputs.conf:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; ...
[API token]
token =
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;As result:&lt;BR /&gt;
myapp/local/inputs.conf:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[API token]
disabled = 0
token = 937-99-92
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Looks like it does what I need, so I stop on this one.&lt;/P&gt;</description>
      <pubDate>Thu, 15 Oct 2015 11:21:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-add-token-input-to-setup-xml/m-p/271183#M17181</guid>
      <dc:creator>sergiyyarinovsk</dc:creator>
      <dc:date>2015-10-15T11:21:31Z</dc:date>
    </item>
  </channel>
</rss>

