Getting Data In

Can I use a REST API command to reschedule the saved searches

sbbadri
Motivator

How to use POST REST Command in the search to reschedule the saved search scheduled time.

for e.g saved search xxx is scheduled to execute by 2015-07-01 15:30:00. I need to schedule it to 2015-07-01 15:35:00 using

saved/searches/{name}/reschedule POST rest API.

Query:

| rest /services/saved/searches/AlertFired/reschedule POST -d schedule_time=2015-07-1T15:21:00Z

I have tried the above query and got the below error,

Error in 'rest' command: Invalid argument: 'POST'
The search job has failed due to an error. You may be able view the job in the Job Inspector.

Regards,
Badri Srinivas B

0 Karma
1 Solution

martin_mueller
SplunkTrust
SplunkTrust
0 Karma

vcarbona
Path Finder

it is possible to reschedule using one of the SDKs. I'm doing this currently for any skipped searches using the Python SDK. The SDK uses REST to accomplish this. It is also possible to do POST requests via REST when using the "curl" command without necessarily using the SDK.

0 Karma

martin_mueller
SplunkTrust
SplunkTrust

The rest search command will only do GET requests.

http://docs.splunk.com/Documentation/Splunk/6.2.3/SearchReference/Rest

0 Karma

sbbadri
Motivator

Thanks Martin

0 Karma
Get Updates on the Splunk Community!

Index This | I am a number, but when you add ‘G’ to me, I go away. What number am I?

March 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with another ...

What’s New in Splunk App for PCI Compliance 5.3.1?

The Splunk App for PCI Compliance allows customers to extend the power of their existing Splunk solution with ...

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