grafana-backup-tool icon indicating copy to clipboard operation
grafana-backup-tool copied to clipboard

Permissions API

Open jartigag opened this issue 3 years ago • 4 comments

Are this kind of Grafana API supported by the tool? I'm specially interested in the folder permissions API,

https://grafana.com/docs/grafana/latest/http_api/folder_permissions/

but as long as i've seen it seems easy to integrate with the backups. Just GET the permissions by folder/dashboard/datasource when backupping and POST them when restoring.

Could I get that with this grafana-backup-tool?

jartigag avatar Jun 02 '21 10:06 jartigag

Sorry that's not implemented in this tool.

Where can the permissions data be used ?

ysde avatar Jun 05 '21 08:06 ysde

When a Grafana instance has users divided in different teams, and each user/team should have access to some dashboards and be restricted from accesing to some others. At now, when restoring that instance with grafana-backup-tool, these adjustments must be written down somewhere else and applied manually in each dashboard/folder.

jartigag avatar Jun 06 '21 09:06 jartigag

Cool, I see the document show that it will use id when setting permissions, but after backup and restore, not sure how to relate the ids , need to test it or re-design it.

Any PR are welcomed :D

Thanks

ysde avatar Jun 07 '21 06:06 ysde

Here it is :) #140 Tested in a real environment

jartigag avatar Jun 29 '21 17:06 jartigag