ysde / grafana-backup-tool

A Python-based application to backup Grafana settings by using the Grafana API
MIT License
876 stars 276 forks source link

Permissions API #136

Open jartigag opened 3 years ago

jartigag commented 3 years ago

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?

ysde commented 3 years ago

Sorry that's not implemented in this tool.

Where can the permissions data be used ?

jartigag commented 3 years ago

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.

ysde commented 3 years ago

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

jartigag commented 3 years ago

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