Security

Changing saved search permissions via CLI

crt89
Communicator

Hi Splunkers,

I would like to ask is it possible to change saved search permissions (private -> app) using a command via CLI ?

I know its much more convenient to use the web ui but in my case I can't access the gui. I also checked this post click here. I encountered an error

FAILED: 'HTTP/1.1 404 Not Found'
Content:
<?xml version="1.0" encoding="UTF-8"?>
<response>
  <messages>
    <msg type="ERROR">Not Found</msg>
  </messages>
</response>

It's a bit outdated as it was asked 2012. I don't know if there have been changes on the command that they're using. Hope to hear from you guys.

Thanks,

crt

1 Solution

MuS
SplunkTrust
SplunkTrust

Hi crt89,

this still works like written by @Hexx.

Here is a little test I did:

First I created a small search and saved it as myFoo in the search app, it got permission private

alt text

Next I ran the following command from cli:

$SPLUNK_HOME/bin/splunk _internal call '/servicesNS/admin/search/saved/searches/myFoo/acl' -post:owner admin -post:sharing app

and changed permission to app by doing so

alt text

watch out for any possible typos in your command.

hope this helps ...

cheers, MuS

View solution in original post

MuS
SplunkTrust
SplunkTrust

Hi crt89,

this still works like written by @Hexx.

Here is a little test I did:

First I created a small search and saved it as myFoo in the search app, it got permission private

alt text

Next I ran the following command from cli:

$SPLUNK_HOME/bin/splunk _internal call '/servicesNS/admin/search/saved/searches/myFoo/acl' -post:owner admin -post:sharing app

and changed permission to app by doing so

alt text

watch out for any possible typos in your command.

hope this helps ...

cheers, MuS

Get Updates on the Splunk Community!

Index This | I am a number, but when you add ‘G’ to me, I go away. What number am I?

March 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with another ...

What’s New in Splunk App for PCI Compliance 5.3.1?

The Splunk App for PCI Compliance allows customers to extend the power of their existing Splunk solution with ...

Extending Observability Content to Splunk Cloud

Register to join us !   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to ...