Skip to content
Discussion options

You must be logged in to vote

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!
  }
}

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by radiohead
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants