I am currently building a small Python script to let me create/update Splunk dashboards from the command line. To do so, I referred to this part of the Splunk documentation: http://docs.splunk.com/Documentation/Splunk/6.2.0/RESTREF/RESTknowledge#data.2Fui.2Fviews
To create a new dashboard, I send a POST request to this resource /servicesNS/myusername/myapp/. To update an existing dashboard, I send a POST request to this resource /servicesNS/myusername/myapp/my_dashboard. So far so good, I can see the dashboards created/updated from the Splunk interface. By default (And there is no way to override that apparently), the created dashboards are private.
An issue arises if, from the UI interface, I change the permissions of my dashboard from 'Private' to 'App'. After doing that, if I attempt to send a POST request to /servicesNS/myusername/myapp/my_dashboard to update the app-shared dashboard, I get a 404 response, although sending a GET request to /servicesNS/myusername/myapp/my_dashboard works fine.
Can anyone explain what's going on here?
I can try to look into this issue. Did you restart your Splunk instance after changing your permissions? I wonder if splunkd needs to restart before being able to respond properly to the POST request. Let me know if you already tried this.
Unfortunately, I am working on a Splunk instance managed by a different group in my company. Doing any sort of administrative operations on Splunk is virtually impossible for me.
Sorry to hear that. I suspect that this is a permissions issue, where you might not be able to modify the app-level object. Your ability to access or "read" the object might be the same, hence the working GET operation. It might be worth investigating with the group who administers your instance, or asking them to look into your permissions and how they might impact this.
My colleague suggested that, if possible, you might want to look into your own app-level permissions. You can also try to see if other users of the same app can edit the dashboard and what their user role might be, if different from yours.
This docs topic might be helpful for more details:
In the meantime, you could try cloning the dashboard and keeping the new version "private" so that you continue to have read/write permissions and can modify it further.
Let us know if you make any discoveries!