Hi All,
How to update default.meta stanzas using REST API. Thanks in Advance.
Hi,
To change views
permissions using REST API, you can use below REST API (In below example please change values for <>
based on your environment.
To change permissions of particular dashboard
curl -vk -u user:password https://<your_splunk_server>:8089/servicesNS/<username>/<app_name>/data/ui/views/<dashboard_name>/ac... -d "perms.read"="user" -d "perms.write"="user" -d sharing=<app/user/global> -d owner=<owner_name>
To change permissions of dashboards page, try below REST API.
curl -vk -u user:password https://<your_splunk_server>:8089/servicesNS/nobody/<app_name>/data/ui/views/_acl -d "perms.read"="user" -d "perms.write"="user" -d sharing=<app/user/global>
import requests
data = {
'owner' : '<owner>',
'sharing' : '<app/global/system>',
'perms.read' : '*',
'perms.write' : '*'
}
url = 'https://<hostname>:8089/services/apps/local/test_app/acl'
response = requests.post(url, data=data, verify=False, auth=('admin', '<password>'))
Hi,
To change views
permissions using REST API, you can use below REST API (In below example please change values for <>
based on your environment.
To change permissions of particular dashboard
curl -vk -u user:password https://<your_splunk_server>:8089/servicesNS/<username>/<app_name>/data/ui/views/<dashboard_name>/ac... -d "perms.read"="user" -d "perms.write"="user" -d sharing=<app/user/global> -d owner=<owner_name>
To change permissions of dashboards page, try below REST API.
curl -vk -u user:password https://<your_splunk_server>:8089/servicesNS/nobody/<app_name>/data/ui/views/_acl -d "perms.read"="user" -d "perms.write"="user" -d sharing=<app/user/global>
Hi,
Can you please provide more information about what you would like to change in .meta files ? Additionally it is not good idea to change anything in default.meta
because it will overwrite when you upgrade the app/add-on, so best practice is to change permissions in local.meta
file.
Hi Harsmarvania,
Thanks for your answer.
whats the use of this parameter "-d sharing=
What value i should pass?
sharing means would you like to share this dashboard at user level (Private), app level or global level ?
Hi,
I wants to modify the "access" field (under stanzas) to restrict role base access for a view in app
Under which stanza ?
---Current---
[views/]
access = read : [ admin ], write : [ admin ]
----Expected---
[views/]
access = read : [ user], write : [user ]