Creating a dashboard within a folder using a API Call (i.e)

Hello Grafana community,

What I am trying:

  • there is a folder named “my_folder”, I want to create a dashboard named “my_dashboard” inside "my_folder"
  • from the grafana docs the only way to create is by using the folderId corresponding to “my_folder” in the Create/Update Dashboard API call below
{
  "dashboard": {
    "id": null,
    "uid": null,
    "title": "Production Overview",
    "tags": [ "templated" ],
    "timezone": "browser",
    "schemaVersion": 16,
    "version": 0
  },
  "folderId": 0,
  "overwrite": false
}

Question:

  • Is this the recommended way to create a dashboard within an already existing folder ?
  • Is there another way to do it ? am I missing something really obvious here ?

Thank you :slight_smile: