<?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 Does Splunk Free License allow usage of REST API? in Security</title>
    <link>https://community.splunk.com/t5/Security/Does-Splunk-Free-License-allow-usage-of-REST-API/m-p/101697#M14261</link>
    <description>&lt;P&gt;How do I use Splunk REST API with Free License (since user login credentials are not required  with Free License)?&lt;/P&gt;</description>
    <pubDate>Tue, 27 Mar 2012 05:52:00 GMT</pubDate>
    <dc:creator>Nicholas_Key</dc:creator>
    <dc:date>2012-03-27T05:52:00Z</dc:date>
    <item>
      <title>Does Splunk Free License allow usage of REST API?</title>
      <link>https://community.splunk.com/t5/Security/Does-Splunk-Free-License-allow-usage-of-REST-API/m-p/101697#M14261</link>
      <description>&lt;P&gt;How do I use Splunk REST API with Free License (since user login credentials are not required  with Free License)?&lt;/P&gt;</description>
      <pubDate>Tue, 27 Mar 2012 05:52:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Security/Does-Splunk-Free-License-allow-usage-of-REST-API/m-p/101697#M14261</guid>
      <dc:creator>Nicholas_Key</dc:creator>
      <dc:date>2012-03-27T05:52:00Z</dc:date>
    </item>
    <item>
      <title>Re: Does Splunk Free License allow usage of REST API?</title>
      <link>https://community.splunk.com/t5/Security/Does-Splunk-Free-License-allow-usage-of-REST-API/m-p/101698#M14262</link>
      <description>&lt;P&gt;Yes you can.&lt;/P&gt;

&lt;P&gt;So using this simple test code from the &lt;A href="http://dev.splunk.com/view/sdks/SP-CAAADP7"&gt;JAVA SDK&lt;/A&gt; :&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;Service service = new Service("myfreesplunkhost", 8089);
service.login("admin", "scoobydoo"); 

ServiceInfo info = service.getInfo();
System.out.println("Info:");
for (String key : info.keySet())
  System.out.println("    " + key + ": " + info.get(key));
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;By default you'll probably get an error message such as :&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;HTTP 401 -- Remote login disabled because you are using a free license which does not provide authentication. To resolve either switch to the forwarder-only license or the enterprise trial license included with the product. To override this and enable unauthenticated remote management, edit the 'allowRemoteLogin' setting in your server.conf file.
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Fortunately, it is simply a matter of adding a setting to &lt;STRONG&gt;$SPLUNK_HOME/etc/system/local/server.conf&lt;/STRONG&gt; and restarting.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[general]
allowRemoteLogin = always
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Then you don't need to login explicitly :&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;Service service = new Service("myfreesplunkhost", 8089);
//removed the login step !!!

ServiceInfo info = service.getInfo();
System.out.println("Info:");
for (String key : info.keySet())
  System.out.println("    " + key + ": " + info.get(key));
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 28 Mar 2012 02:23:16 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Security/Does-Splunk-Free-License-allow-usage-of-REST-API/m-p/101698#M14262</guid>
      <dc:creator>Damien_Dallimor</dc:creator>
      <dc:date>2012-03-28T02:23:16Z</dc:date>
    </item>
  </channel>
</rss>

