Getting Data In

Does the REST API based search support only username/password based authentication?

alpsholic
Explorer

Does the REST API based search support only username/password based authentication?? If I am developing an app which does REST API searches, the customer may not be willing to give username/password. Is there any other way of authorization possible?

0 Karma

mstjohn_splunk
Splunk Employee
Splunk Employee

@alpsholic

Did the answer below help you solve your problem? If so, please resolve this post by approving it!
If your problem is still not solved, keep us updated so that someone else can help ya. Thanks for posting!

0 Karma

VatsalJagani
SplunkTrust
SplunkTrust

Hi @alpsholic,
No you cannot get access to Splunk with REST call without having username and password. But you can ask them for the Session key. Ask them to generate a session key and they can give it to you.

curl -u admin:changeme -k https://localhost:8089/services/auth/login/ -d"username=admin&password=changeme"
 <response>
 <sessionKey>30774f9d502004b5c655c08b5362bdca</sessionKey>

Hope this helps!

There are some other authentication methods available in Splunk, but I don't think that will work with REST api calls - http://docs.splunk.com/Documentation/Splunk/7.1.3/Security/Setupbuilt-inauthentication

0 Karma

deepashri_123
Motivator

Hey@alpsholic,

I am not sure if this will work. But you can ask the customer to create a splunk role which can access rest api and you can use that credentials to do api searches.
The role will need following capabilities:
rest_apps_view
rest_properties_get
rest_properties_set
rest_apps_management

Let me know if this helps!!

0 Karma
Get Updates on the Splunk Community!

See your relevant APM services, dashboards, and alerts in one place with the updated ...

As a Splunk Observability user, you have a lot of data you have to manage, prioritize, and troubleshoot on a ...

Index This | What goes away as soon as you talk about it?

May 2025 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with this month’s ...

What's New in Splunk Observability Cloud and Splunk AppDynamics - May 2025

This month, we’re delivering several new innovations in Splunk Observability Cloud and Splunk AppDynamics ...