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!

Splunk Custom Visualizations App End of Life

The Splunk Custom Visualizations apps End of Life for SimpleXML will reach end of support on Dec 21, 2024, ...

Introducing Splunk Enterprise 9.2

WATCH HERE! Watch this Tech Talk to learn about the latest features and enhancements shipped in the new Splunk ...

Adoption of RUM and APM at Splunk

    Unleash the power of Splunk Observability   Watch Now In this can't miss Tech Talk! The Splunk Growth ...