Splunk Dev

404 Accessing REST authetication page.

graeme_fore
New Member

Attempting to perform a basic log in using the services authentication page but I keep receiving a 404 response. I've used custom code and a slightly modified version of the basic python code provided on Splunk's page both to no avail. Here's the basic code.

import urllib
import httplib2
from xml.dom import minidom

baseurl = 'http://127.0.0.1:8000'
username = 'admin'
password = 'password'

serverContent = httplib2.Http().request(baseurl + '/services/auth/login',
'POST', headers={}, body=urllib.urlencode({'username':username, 'password':password}))[1]

print serverContent
0 Karma
1 Solution

ziegfried
Influencer

The base url for the REST endpoint should probably be https://localhost:8089.

View solution in original post

0 Karma

ziegfried
Influencer

The base url for the REST endpoint should probably be https://localhost:8089.

0 Karma

graeme_fore
New Member

You're right but I don't have ssl enabled on my test machine. Now I can connect but I am left with a completely separate SSL error. Meh.

0 Karma
Get Updates on the Splunk Community!

Index This | I am a number, but when you add ‘G’ to me, I go away. What number am I?

March 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with another ...

What’s New in Splunk App for PCI Compliance 5.3.1?

The Splunk App for PCI Compliance allows customers to extend the power of their existing Splunk solution with ...

Extending Observability Content to Splunk Cloud

Register to join us !   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to ...