All Apps and Add-ons

How to access splunk api in postman

raviguptasplunk
New Member

I am not able to authenticate or able to access splunk using its REST api in Postman.
I have done the trial Splunk Enterprise setup on my local system , I am able to access APIs using curl but through postman i am not.

alt text

Tags (1)
0 Karma
1 Solution

gjanders
SplunkTrust
SplunkTrust

I believe you have the answer but you need to disable SSL validation in postman to allow the self-signed Splunk SSL certificate to work.
If you can either accept my answer or close the question that would be appreciated!

View solution in original post

gjanders
SplunkTrust
SplunkTrust

I believe you have the answer but you need to disable SSL validation in postman to allow the self-signed Splunk SSL certificate to work.
If you can either accept my answer or close the question that would be appreciated!

harsmarvania57
SplunkTrust
SplunkTrust

Hi @raviguptasplunk,

How are you passing username and password? In my lab environment I am able to fire POST request in Firefox and I am passing username and password in Request body like username=myuser&password=mypassword and I am getting sessionKey in Response.

0 Karma

raviguptasplunk
New Member

Thanks @harsmarvania57 I am able to get the sessionKey now, i had to disable ssl in postman

0 Karma

lijuj
Explorer

POST RequestBody

username=admin&password=changeme&output_mode=json

Respons Body
{
"sessionKey": "9sIFIEq4tw6LNjhmlFBkOB6NMoCh^OWER^Y^bND6n69JbCI3ENMNR0wotaA09ZoT^gfmNEycqyZfoyhH1Yns_m3XysFJOwD9zRvtDlSW"
}

0 Karma

lijuj
Explorer

you may get error message if you don't disable SSL on postman or browser

"javax.net.ssl.SSLPeerUnverifiedException: peer not authenticated"

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 ...