Getting Data In

How to rename the savedsearches using REST API

ajayathmakuri
Engager

Hi Splunkers,

Any idea how can we rename the saved searches using REST API.

I have tried by referring https://wiki.splunk.com/Community:How_to_change_owner_of_savedsearches_using_REST_API but I'm getting errors while executing.Please assist me .Thanks!

0 Karma

koshyk
Super Champion

You need to do outside Splunk GUI as GUI supports REST GET only.

So your client (postman) or curl.
An example using CURL with MySavedSearch which has ownership of admin user

curl -k -u admin:pass https://localhost:8089/servicesNS/admin/search/saved/searches/MySavedSearch -d title="MyNewSearch"

Please refer https://docs.splunk.com/Documentation/Splunk/7.2.6/RESTREF/RESTsearch

0 Karma
Get Updates on the Splunk Community!

Get Your Exclusive Splunk Certified Cybersecurity Defense Engineer at Splunk .conf24 ...

We’re excited to announce a new Splunk certification exam being released at .conf24! If you’re headed to Vegas ...

Share Your Ideas & Meet the Lantern team at .Conf! Plus All of This Month’s New ...

Splunk Lantern is Splunk’s customer success center that provides advice from Splunk experts on valuable data ...

Combine Multiline Logs into a Single Event with SOCK: a Step-by-Step Guide for ...

Combine multiline logs into a single event with SOCK - a step-by-step guide for newbies Olga Malita The ...