<?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: Pulling logged in users via REST API in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/Pulling-logged-in-users-via-REST-API/m-p/15897#M1848</link>
    <description>&lt;P&gt;lol thank you..&lt;/P&gt;</description>
    <pubDate>Wed, 23 Jun 2010 00:32:07 GMT</pubDate>
    <dc:creator>hiddenkirby</dc:creator>
    <dc:date>2010-06-23T00:32:07Z</dc:date>
    <item>
      <title>Pulling logged in users via REST API</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Pulling-logged-in-users-via-REST-API/m-p/15895#M1846</link>
      <description>&lt;P&gt;How would one get a list of all the users logged in via the API&lt;/P&gt;

&lt;P&gt;In a ruby script i tried this...  (POST seems odd for this type of thing) got the idea from &lt;A href="http://www.splunk.com/base/Documentation/4.1/Developer/RESTCreateSearch" rel="nofollow"&gt;http://www.splunk.com/base/Documentation/4.1/Developer/RESTCreateSearch&lt;/A&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;def list_users_logged_in
  xml = splunk_ssl_post_request("/services/authentication/httpauth-tokens", nil, {'authorization' =&amp;gt; "Splunk #{session_key}"})
  puts xml
end
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;which obvs doesn't operate the same as the list_jobs&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;gt;&amp;gt; require 'splunk'
=&amp;gt; ["SplunkClient"]
&amp;gt;&amp;gt; client = SplunkClient.new
=&amp;gt; #&amp;lt;SplunkClient:0x7ff442d44fc0&amp;gt;
&amp;gt;&amp;gt; client.list_users_logged_in
&amp;lt;response&amp;gt;
&amp;lt;messages&amp;gt;
&amp;lt;msg type="ERROR"&amp;gt;In handler &amp;amp;apos;&amp;amp;apos;: Cannot perform action &amp;amp;quot;POST&amp;amp;quot; without a target name to act on.&amp;lt;/msg&amp;gt;
&amp;lt;/messages&amp;gt;
&amp;lt;/response&amp;gt;
=&amp;gt; nil
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;So obviously i'm missing something fundamental.  Any help would be appreciated.&lt;/P&gt;</description>
      <pubDate>Tue, 22 Jun 2010 21:34:32 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Pulling-logged-in-users-via-REST-API/m-p/15895#M1846</guid>
      <dc:creator>hiddenkirby</dc:creator>
      <dc:date>2010-06-22T21:34:32Z</dc:date>
    </item>
    <item>
      <title>Re: Pulling logged in users via REST API</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Pulling-logged-in-users-via-REST-API/m-p/15896#M1847</link>
      <description>&lt;P&gt;You can just make a GET request to that URL to get a list of the tokens.&lt;/P&gt;</description>
      <pubDate>Tue, 22 Jun 2010 23:29:19 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Pulling-logged-in-users-via-REST-API/m-p/15896#M1847</guid>
      <dc:creator>gkanapathy</dc:creator>
      <dc:date>2010-06-22T23:29:19Z</dc:date>
    </item>
    <item>
      <title>Re: Pulling logged in users via REST API</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Pulling-logged-in-users-via-REST-API/m-p/15897#M1848</link>
      <description>&lt;P&gt;lol thank you..&lt;/P&gt;</description>
      <pubDate>Wed, 23 Jun 2010 00:32:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Pulling-logged-in-users-via-REST-API/m-p/15897#M1848</guid>
      <dc:creator>hiddenkirby</dc:creator>
      <dc:date>2010-06-23T00:32:07Z</dc:date>
    </item>
    <item>
      <title>Re: Pulling logged in users via REST API</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Pulling-logged-in-users-via-REST-API/m-p/15898#M1849</link>
      <description>&lt;P&gt;where can i post example ruby code for others to see?&lt;/P&gt;</description>
      <pubDate>Wed, 23 Jun 2010 00:32:57 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Pulling-logged-in-users-via-REST-API/m-p/15898#M1849</guid>
      <dc:creator>hiddenkirby</dc:creator>
      <dc:date>2010-06-23T00:32:57Z</dc:date>
    </item>
    <item>
      <title>Re: Pulling logged in users via REST API</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Pulling-logged-in-users-via-REST-API/m-p/15899#M1850</link>
      <description>&lt;P&gt;&lt;A href="http://pastebin.com/MpKSQnsF"&gt;http://pastebin.com/MpKSQnsF&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 23 Jun 2010 00:38:08 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Pulling-logged-in-users-via-REST-API/m-p/15899#M1850</guid>
      <dc:creator>hiddenkirby</dc:creator>
      <dc:date>2010-06-23T00:38:08Z</dc:date>
    </item>
  </channel>
</rss>

