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!

Extending Observability Content to Splunk Cloud

Watch Now!   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to leverage ...

More Control Over Your Monitoring Costs with Archived Metrics!

What if there was a way you could keep all the metrics data you need while saving on storage costs?This is now ...

New in Observability Cloud - Explicit Bucket Histograms

Splunk introduces native support for histograms as a metric data type within Observability Cloud with Explicit ...