<?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 Why I can't access data from Splunk using REST API? in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/Why-I-can-t-access-data-from-Splunk-using-REST-API/m-p/167567#M33909</link>
    <description>&lt;P&gt;Hello every body!&lt;BR /&gt;
I'm new and i 'd like to communicate with Splunk by REST API using "curl" comand. I tried some examples &lt;A href="http://docs.splunk.com/Documentation/Splunk/latest/RESTAPI/RESTaccess"&gt;here&lt;/A&gt; but nothing doesn't work.&lt;/P&gt;

&lt;P&gt;Example:&lt;/P&gt;

&lt;P&gt;Return a session key for the admin user that can be used in future request operations.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;curl -k -u admin:pass  &lt;A href="http://localhost:8000/services/auth/login" target="test_blank"&gt;http://localhost:8000/services/auth/login&lt;/A&gt; \
    -d username=admin \
    -d password=pass
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Normally, it's return something like this: &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;    &amp;lt;response&amp;gt;
      &amp;lt;sessionKey&amp;gt;[value of session key]&amp;lt;/sessionKey&amp;gt;
    &amp;lt;/response&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;But in my case, i obtain:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;This ressource can be found at &amp;lt;a href='http://localhost:8000/en-US/services/auth/login'&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I changed the link by: &lt;A href="http://localhost:8000/en-US/services/auth/login"&gt;http://localhost:8000/en-US/services/auth/login&lt;/A&gt; but i have the same result. So I decided to test the link directly in the browser. I get:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;404 Not Found
Return to Splunk home page
The path '/en-US/services/auth/login' was not found.
View more information about your request (request ID = 5446305e3f3252810) in Search 

You are using localhost:8000, which is connected to splunkd @233537 at &lt;A href="https://127.0.0.1:8089" target="test_blank"&gt;https://127.0.0.1:8089&lt;/A&gt; on Tue Oct 21 13:07:26 2014.
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Someone can help me? Thanks&lt;/P&gt;

&lt;HR /&gt;

&lt;P&gt;&lt;STRONG&gt;Remark&lt;/STRONG&gt;: I already changed admin and pass by the right login and I use &lt;STRONG&gt;Splunk 6.1.4&lt;/STRONG&gt;&lt;/P&gt;</description>
    <pubDate>Tue, 21 Oct 2014 10:15:32 GMT</pubDate>
    <dc:creator>soldatpetit</dc:creator>
    <dc:date>2014-10-21T10:15:32Z</dc:date>
    <item>
      <title>Why I can't access data from Splunk using REST API?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Why-I-can-t-access-data-from-Splunk-using-REST-API/m-p/167567#M33909</link>
      <description>&lt;P&gt;Hello every body!&lt;BR /&gt;
I'm new and i 'd like to communicate with Splunk by REST API using "curl" comand. I tried some examples &lt;A href="http://docs.splunk.com/Documentation/Splunk/latest/RESTAPI/RESTaccess"&gt;here&lt;/A&gt; but nothing doesn't work.&lt;/P&gt;

&lt;P&gt;Example:&lt;/P&gt;

&lt;P&gt;Return a session key for the admin user that can be used in future request operations.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;curl -k -u admin:pass  &lt;A href="http://localhost:8000/services/auth/login" target="test_blank"&gt;http://localhost:8000/services/auth/login&lt;/A&gt; \
    -d username=admin \
    -d password=pass
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Normally, it's return something like this: &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;    &amp;lt;response&amp;gt;
      &amp;lt;sessionKey&amp;gt;[value of session key]&amp;lt;/sessionKey&amp;gt;
    &amp;lt;/response&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;But in my case, i obtain:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;This ressource can be found at &amp;lt;a href='http://localhost:8000/en-US/services/auth/login'&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I changed the link by: &lt;A href="http://localhost:8000/en-US/services/auth/login"&gt;http://localhost:8000/en-US/services/auth/login&lt;/A&gt; but i have the same result. So I decided to test the link directly in the browser. I get:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;404 Not Found
Return to Splunk home page
The path '/en-US/services/auth/login' was not found.
View more information about your request (request ID = 5446305e3f3252810) in Search 

You are using localhost:8000, which is connected to splunkd @233537 at &lt;A href="https://127.0.0.1:8089" target="test_blank"&gt;https://127.0.0.1:8089&lt;/A&gt; on Tue Oct 21 13:07:26 2014.
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Someone can help me? Thanks&lt;/P&gt;

&lt;HR /&gt;

&lt;P&gt;&lt;STRONG&gt;Remark&lt;/STRONG&gt;: I already changed admin and pass by the right login and I use &lt;STRONG&gt;Splunk 6.1.4&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 21 Oct 2014 10:15:32 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Why-I-can-t-access-data-from-Splunk-using-REST-API/m-p/167567#M33909</guid>
      <dc:creator>soldatpetit</dc:creator>
      <dc:date>2014-10-21T10:15:32Z</dc:date>
    </item>
    <item>
      <title>Re: Why I can't access data from Splunk using REST API?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Why-I-can-t-access-data-from-Splunk-using-REST-API/m-p/167568#M33910</link>
      <description>&lt;P&gt;The web services are running on a different port than the browser interface. Try:&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;https&lt;/STRONG&gt;://localhost:&lt;STRONG&gt;8089&lt;/STRONG&gt;/services/auth/login&lt;/P&gt;

&lt;P&gt;in your "curl" command.&lt;/P&gt;</description>
      <pubDate>Wed, 22 Oct 2014 12:45:20 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Why-I-can-t-access-data-from-Splunk-using-REST-API/m-p/167568#M33910</guid>
      <dc:creator>aweitzman</dc:creator>
      <dc:date>2014-10-22T12:45:20Z</dc:date>
    </item>
    <item>
      <title>Re: Why I can't access data from Splunk using REST API?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Why-I-can-t-access-data-from-Splunk-using-REST-API/m-p/167569#M33911</link>
      <description>&lt;P&gt;Thank you very much, you saved me. It works very well. &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 27 Oct 2014 05:12:23 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Why-I-can-t-access-data-from-Splunk-using-REST-API/m-p/167569#M33911</guid>
      <dc:creator>soldatpetit</dc:creator>
      <dc:date>2014-10-27T05:12:23Z</dc:date>
    </item>
    <item>
      <title>Re: Why I can't access data from Splunk using REST API?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Why-I-can-t-access-data-from-Splunk-using-REST-API/m-p/167570#M33912</link>
      <description>&lt;P&gt;Do you need to create the services directory?&lt;/P&gt;</description>
      <pubDate>Tue, 16 Jun 2015 14:39:28 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Why-I-can-t-access-data-from-Splunk-using-REST-API/m-p/167570#M33912</guid>
      <dc:creator>_gkollias</dc:creator>
      <dc:date>2015-06-16T14:39:28Z</dc:date>
    </item>
  </channel>
</rss>

