Getting Data In

How to clone a saved search via REST API command? Is there documentation on this?

Path Finder

How would I clone a saved search via the REST API? I do not see any documentation in the REST API endpoints regarding copy/clone existing saved searches.

0 Karma

Splunk Employee
Splunk Employee

Cloning is basically making a copy of the object but changing the name/id. There is no "clone" action in Splunk's REST API, however the following steps outline how to clone any object from the REST endpoints:

  1. GET the object you want to clone
  2. change the name of the object
  3. POST the object back to the endpoint

Revered Legend

Not sure if cloning operation can be done from REST API. I would be interested if anyone knows a way to do it.

0 Karma
.conf21 Now Fully Virtual!
Register for FREE Today!

We've made .conf21 totally virtual and totally FREE! Our completely online experience will run from 10/19 through 10/20 with some additional events, too!