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!

Why You Can't Miss .conf25: Unleashing the Power of Agentic AI with Splunk & Cisco

The Defining Technology Movement of Our Lifetime The advent of agentic AI is arguably the defining technology ...

Deep Dive into Federated Analytics: Unlocking the Full Power of Your Security Data

In today’s complex digital landscape, security teams face increasing pressure to protect sprawling data across ...

Your summer travels continue with new course releases

Summer in the Northern hemisphere is in full swing, and is often a time to travel and explore. If your summer ...