Getting Data In

change the owner of a saved search via REST

bjoernjensen
Contributor

Hi there,

I just want to change the attribut "owner" (within eai:acl) of a saved search via REST. Is this feasible?

Thanks,
Björn

woodcock
Esteemed Legend

NEW FEATURE ALERT!

As of Splunk 6.6, you can now do this from the Search Head GUI with the new Reassign Knowledge Objects feature:
https://docs.splunk.com/Documentation/SplunkCloud/6.6.0/ReleaseNotes/NewSplunkCloudFeatures
https://www.splunk.com/blog/2017/05/02/what-s-new-in-splunk-enterprise-6-6-and-splunk-cloud.html

Here is the main place for the documentation on using the REST API:
https://wiki.splunk.com/Community:How_to_change_owner_of_savedsearches_using_REST_API

bjoernjensen
Contributor

I had to look around for a bit:

Being 'admin' within the search app, my saved search 'myTestSearch' has the following REST endpoint:

https://localhost:8089/servicesNS/admin/search/saved/searches/myTestSearch/acl

Therefor the following will work:

curl -k -u admin:changeme  -d 'owner=foo' -d 'sharing=app' https://localhost:8089/servicesNS/admin/search/saved/searches/myTestSearch/acl

This of course will reflect in a change of the corresponding entry within the local.meta

The next step would be giving away the owner rights of the saved search, beeing an ordinary user. Unfortunately this can not be done:

curl -k -u user:changeme  -d 'owner=foo' -d 'sharing=app' https://localhost:8089/servicesNS/user/search/saved/searches/myTestSearch/acl

ERROR: In handler 'savedsearch': You do not have permission to change the owner of this object.

Is there any other way to accomplish this? Maybe a dedicated capability (not admin_all_objects)?

Get Updates on the Splunk Community!

Automatic Discovery Part 1: What is Automatic Discovery in Splunk Observability Cloud ...

If you’ve ever deployed a new database cluster, spun up a caching layer, or added a load balancer, you know it ...

Real-Time Fraud Detection: How Splunk Dashboards Protect Financial Institutions

Financial fraud isn't slowing down. If anything, it's getting more sophisticated. Account takeovers, credit ...

Splunk + ThousandEyes: Correlate frontend, app, and network data to troubleshoot ...

 Are you tired of troubleshooting delays caused by siloed frontend, application, and network data? We've got a ...