Description
Hi there,
@jeremybz / @jeremybanzhaf asked at 1:
My goal is to use the API to get the JSON representation of a dashboard, including __inputs and named datasources.
@jangaraj answered:
HTTP API for dashboard export for external use doesn’t exist. This export feature is implemented in the UI (frontend). I would say the only option is to use standard dashboard API and make that output transformed into “dashboard format for external use”. Unfortunately, that format is not documented, so you have to use reverse engineering.
Torkel Ödegaard said at 2:
This is not possible, the data is captured by the frontend so you would have to replicate what all the panel & data sources do (issue metric queries etc).
In order to implement this transformation, I would be happy to provide a place within this package, if possible. Would that make any sense / be helpful in any way?
The implementation should adhere to the specifications defined by the corresponding TypeScript code.
- DashboardModel::getSaveModelClone()
- DashboardModel::getPanelSaveModels()
- DashboardExporter.ts
- DashboardExporter.test.ts
With kind regards,
Andreas.
/cc @jangaraj