-
|
I tried to just serve a local dashboard.json file: Is this not supported? |
Beta Was this translation helpful? Give feedback.
Answered by
radiohead
Oct 17, 2025
Replies: 1 comment
-
|
Hi @xoxys, apologies for the late reply! To serve dashboards, one has to use the new dashboards API format (you can take a look at the as-code hands-on labs tutorial – https://github.com/grafana/dashboards-as-code-workshop/blob/main/part-two-golang-starter/api.go#L16-L26 for reference). If you have an existing JSON from the old dashboards API, you can transform it into the new format by doing something like this: {
"apiVersion": "dashboard.grafana.app/v1beta1",
"kind": "Dashboard",
"metadata": {
"name": "my-dashboard" # the UID of your dashboard
},
"spec": {
# add the contents of your existing dashboard.json here!
}
} |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
radiohead
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi @xoxys, apologies for the late reply!
To serve dashboards, one has to use the new dashboards API format (you can take a look at the as-code hands-on labs tutorial – https://github.com/grafana/dashboards-as-code-workshop/blob/main/part-two-golang-starter/api.go#L16-L26 for reference).
If you have an existing JSON from the old dashboards API, you can transform it into the new format by doing something like this: