Getting Data In

How to post data to Splunk from installed Python app using REST API without using auth credentials?

aniket_amrutkar
New Member

I am developing an app for Splunk in Python. I want to add some CSV data to Splunk through this app.
I don't have auth credentials for this user. How to achieve this?
A user is already logged in to the Splunk and using my app. I want to push some data to Splunk.

0 Karma

MuS
Legend

Hi aniket_amrutkar,

you can use results,dummyresults,settings = splunk.Intersplunk.getOrganizedResults() in your python script and use the sessionKey, owner and namespace like this:

sessionKey = settings.get("sessionKey", None)
owner = settings.get("owner", None)
namespace = settings.get("namespace", None)

As always, see the docs http://docs.splunk.com/Documentation/Splunk/6.3.0/Search/Aboutcustomsearchcommands for more details.

cheers, MuS

0 Karma

piebob
Splunk Employee
Splunk Employee

do you have a question here?

0 Karma
Get Updates on the Splunk Community!

More Ways To Control Your Costs With Archived Metrics | Register for Tech Talk

Tuesday, May 14, 2024  |  11AM PT / 2PM ET Register to Attend Join us for this Tech Talk and learn how to ...

.conf24 | Personalize your .conf experience with Learning Paths!

Personalize your .conf24 Experience Learning paths allow you to level up your skill sets and dive deeper ...

Threat Hunting Unlocked: How to Uplevel Your Threat Hunting With the PEAK Framework ...

WATCH NOWAs AI starts tackling low level alerts, it's more critical than ever to uplevel your threat hunting ...