Open vinilima07 opened 4 years ago
Hi @viniciusfdev ! The docs say:
dashboard.id – id = null to create a new dashboard.
dashboard.uid – Optional unique identifier when creating a dashboard. uid = null will generate a new uid.
I guess it is not that straightforward. If those params are nullified and user tries to restores dashboards after some unexpected modification - he will get a bunch of new dashboards instead of restored old ones.
The uid
param is even more important because it allows to have consistent links to dashboard. It may be a surprise to get all links broken after dashboards restore.
I'd suggest to have a separate option/flag on import procedure to nullify this params if needed.
To create a new Dashboard with import script, the API needs to see id=null and uid=null and/or overwrite = true on Dashboard config. To do that, i try change the label values with JQ.