Grafana
Read a Grafana dashboard’s JSON configuration
Use Grafana’s Dashboard API to retrieve a versioned dashboard resource. Use the dashboard export menu to download a file for inspection or import.
Documentation reviewed · 2 methods with sources
Ways to do it
- API: GET /apis/dashboard.grafana.app/v1/namespaces/{namespace}/dashboards/{uid}
- Interface: Dashboard → Export → Export as code
API
GET /apis/dashboard.grafana.app/v1/namespaces/{namespace}/dashboards/{uid}
Read the dashboard resource, including its metadata and dashboard specification.
Read source: Grafana Dashboard HTTP API- Requirements
- A Grafana instance that exposes the v1 dashboard resource API, a namespace, and dashboard read permissions. Use a service account token for the documented API example.
- Limitations
- The path’s uid is the dashboard’s metadata.name. The resource has a separate metadata.uid field.
Interface
Dashboard → Export → Export as code
Open the dashboard and export its JSON for reuse in another Grafana environment.
Read source: Grafana dashboard export guide- Requirements
- Access to the dashboard in Grafana.
- Limitations
- The portable export can change how data sources are referenced, so verify the data source mappings when importing it on another instance.