Getting Data In

How to Edit saved search using Splunk REST ?

sagrl
Explorer

I want to edit the search of a Saved Search Report using REST in Python without any other change. But when i am using the below code,it is creating a new saved search with private permission. Please help me in changing the search of the saved report with the existing permission.

 myhttp.request(baseurl + '/servicesNS/sys-splunk/AS/saved/searches/15_report','POST', headers={'Authorization': 'Splunk %s' % sessionkey},body=urllib.urlencode({'search': "index=*"}))
Tags (2)
0 Karma

polymorphic
Communicator

This should work:
curl -k -u user:password https://qualifiedurl:8089/servicesNS/nobody/search/saved/searches/test/ -d "search=index=*"

0 Karma
Get Updates on the Splunk Community!

Announcing Scheduled Export GA for Dashboard Studio

We're excited to announce the general availability of Scheduled Export for Dashboard Studio. Starting in ...

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 GA in US-AWS!

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