Splunk Dev

Python SDK saved_search.py action options are unclear

vwilson
Engager

I'm trying to get familiar with Splunk's Python SDK via the provided examples. However, I'm struggling to understand the format expected for actions when creating saved searches.

$ ./saved_search.py --operation=create --name=api_test_email --search="unique" --actions=email --action.email.to="user@example.org" --action.email.sender="splunkbot"

Usage: saved_search.py --help for options

saved_search.py: error: no such option: --action.email.to

The help states:

"action...": {
'flags': ["--action.."],
'help': " A key/value pair that is specific to the action_type. For example, if actions contains email, then the following keys would be necessary: action.email.to=foo@splunk.com and action.email.sender=splunkbot. For scripts: action.script.filename=doodle.py (note: script is run from $SPLUNK_HOME/bin/scripts/)"

jkat54
SplunkTrust
SplunkTrust

Did you copy and paste the command from a word document into linux command line or something?

The command looks good. I suggest you type the command manually and see if it resolves the issue.

Get Updates on the Splunk Community!

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

What's new in Splunk Cloud Platform 9.1.2312?

Hi Splunky people! We are excited to share the newest updates in Splunk Cloud Platform 9.1.2312! Analysts can ...

What’s New in Splunk Security Essentials 3.8.0?

Splunk Security Essentials (SSE) is an app that can amplify the power of your existing Splunk Cloud Platform, ...