Splunk Dev

Set namespace for a search with PythonSDK

aarcro
Explorer

It is possible to set the namespace for a search job with the pythonSDK? Something like:

service = client.connect()
job = service.jobs.create('search * | head 5', namespace='SplunkForNagios')

I know I can set the app in the connect() call, but I was hoping to keep a global connection open, and just set the app when I execute a search.

Tags (1)
0 Karma
1 Solution

aarcro
Explorer

this works:

job = service.jobs.create('search * | head 5', app='SplunkForNagios')

So the PythonSDK must map the keyword app to the REST API parameter namespace.

View solution in original post

0 Karma

aarcro
Explorer

this works:

job = service.jobs.create('search * | head 5', app='SplunkForNagios')

So the PythonSDK must map the keyword app to the REST API parameter namespace.

0 Karma
Get Updates on the Splunk Community!

Webinar Recap | Revolutionizing IT Operations: The Transformative Power of AI and ML ...

The Transformative Power of AI and ML in Enhancing Observability   In the realm of IT operations, the ...

.conf24 | Registration Open!

Hello, hello! I come bearing good news: Registration for .conf24 is now open!   conf is Splunk’s rad annual ...

ICYMI - Check out the latest releases of Splunk Edge Processor

Splunk is pleased to announce the latest enhancements to Splunk Edge Processor.  HEC Receiver authorization ...