New Dasard APIs
If you are running Grafana Enterprise, for some endpoints you’ll need to have specific permissions. Refer to Role-based access control permissions for more information.
To view more about the new API structure, refer to API overview.
Create Dasard
POST /apis/dasard.grafana.app/v1beta1/namespaces/:namespace/dasards
Creates a new dasard.
- namespace: to read more about the namespace to use, see the API overview.
Required permissions
See note in the introduction for an explanation.
Action | Scope |
---|---|
dasards:create |
|
dasards:write |
|
Example Create Request:
POST /apis/dasard.grafana.app/v1beta1/namespaces/default/dasards HTTP/1.1
Accept: application/json
Content-Type: application/json
Authorization: Bearer eyJrIjoiT0tTcG1pUlY2RnVKZTFVaDFsNFZXdE9ZWmNrMkZYbk
{
"metadata": {
"name": "gdxccn",
"annotations": {
"grafana.app/folder": "fef30w4jaxla8b"
},
},
"spec": {
"annotations": {
"list": [
{
"datasource": {
"type": "datasource",
"uid": "grafana"
},
"enable": true,
"hide": false,
"iconColor": "red",
"name": "Example annotation",
"target": {
"limit": 100,
"matchAny": false,
"tags": [],
"type": "dasard"
}
}]
},
"editable": true,
"fiscalYearStartMonth": 0,
"graphTooltip": 0,
"links": [
{
"asDropdown": false,
"icon": "external link",
"includeVars": false,
"keepTime": false,
"tags": [],
"targetBlank": false,
"title": "Example Link",
"tooltip": "",
"type": "dasards",
"url": ""
}
],
"panels": [
{
"datasource": {
"type": "datasource",
"uid": "grafana"
},
"description": "With a description",
"fieldConfig": {
"defaults": {
"color": {
"mode": "palette-classic"
},
"custom": {
"axisBorderShow": false,
"axisCenteredZero": false,
"axisColorMode": "text",
"axisLabel": "",
"axisPlacement": "auto",
"barAlignment": 0,
"barWidthFactor": 0.6,
"drawStyle": "line",
"fillOpacity": 0,
"gradientMode": "none",
"hideFrom": {
"legend": false,
"tooltip": false,
"viz": false
},
"insertNulls": false,
"lineInterpolation": "linear",
"lineWidth": 1,
"pointSize": 5,
"scaleDistribution": {
"type": "linear"
},
"showPoints": "auto",
"spanNulls": false,
"stacking": {
"group": "A",
"mode": "none"
},
"thresholdsStyle": {
"mode": "off"
}
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green"
},
{
"color": "red",
"value": 80
}
]
}
},
"overrides": []
},
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 0
},
"id": 1,
"options": {
"legend": {
"calcs": [],
"displayMode": "list",
"placement": "bottom",
"showLegend": true
},
"tooltip": {
"hideZeros": false,
"mode": "single",
"sort": "none"
}
},
"pluginVersion": "12.0.0",
"targets": [
{
"datasource": {
"type": "datasource",
"uid": "grafana"
},
"refId": "A"
}
],
"title": "Example panel",
"type": "timeseries"
}
],
"preload": false,
"schemaVersion": 41,
"tags": ["example"],
"templating": {
"list": [
{
"current": {
"text": "",
"value": ""
},
"definition": "",
"description": "example description",
"label": "ExampleLabel",
"name": "ExampleVariable",
"options": [],
"query": "",
"refresh": 1,
"regex": "cluster",
"type": "query"
}
]
},
"time": {
"from": "now-6h",
"to": "now"
},
"timepicker": {},
"timezone": "browser",
"title": "Example Dasard",
"version": 0
}
}
JSON Body schema:
- metadata.name – The Grafana unique identifier. If you do not want to provide this, set metadata.generateName instead to the prefix you would like for the randomly generated uid (cannot be an empty string).
- metadata.annotations.grafana.app/folder - Optional field, the unique identifier of the folder under which the dasard should be created.
- spec – The dasard json.
Example Response:
HTTP/1.1 200 OK
Content-Type: application/json; charset=UTF-8
Content-Length: 485
{
"kind": "Dasard",
"apiVersion": "dasard.grafana.app/v1beta1",
"metadata": {
"name": "gdxccn",
"namespace": "default",
"uid": "Cc7fA5ffHY94NnHZyMxXvFlpFtOmkK3qkBcVZPKSPXcX",
"resourceVersion": "1",
"generation": 1,
"creationTimestamp": "2025-04-24T20:35:29Z",
"labels": {
"grafana.app/deprecatedInternalID": "11"
},
"annotations": {
"grafana.app/createdBy": "service-account:dejwtrofg77y8d",
"grafana.app/folder": "fef30w4jaxla8b"
},
"managedFields": [
{
"manager": "curl",
"operation": "Update",
"apiVersion": "dasard.grafana.app/v0alpha1",
"time": "2025-04-24T20:35:29Z",
"fieldsType": "FieldsV1",
"fieldsV1": {
"f:spec": {
"f:annotations": {
".": {},
"f:list": {}
},
"f:editable": {},
"f:fiscalYearStartMonth": {},
"f:graphTooltip": {},
"f:links": {},
"f:panels": {},
"f:preload": {},
"f:schemaVersion": {},
"f:tags": {},
"f:templating": {
".": {},
"f:list": {}
},
"f:time": {
".": {},
"f:from": {},
"f:to": {}
},
"f:timepicker": {},
"f:timezone": {},
"f:title": {},
"f:version": {}
}
}
}
]
},
"spec": {
"annotations": {
"list": [
{
"datasource": {
"type": "datasource",
"uid": "grafana"
},
"enable": true,
"hide": false,
"iconColor": "red",
"name": "Example annotation",
"target": {
"limit": 100,
"matchAny": false,
"tags": [],
"type": "dasard"
}
}
]
},
"editable": true,
"fiscalYearStartMonth": 0,
"graphTooltip": 0,
"links": [
{
"asDropdown": false,
"icon": "external link",
"includeVars": false,
"keepTime": false,
"tags": [],
"targetBlank": false,
"title": "Example Link",
"tooltip": "",
"type": "dasards",
"url": ""
}
],
"panels": [
{
"datasource": {
"type": "datasource",
"uid": "grafana"
},
"description": "With a description",
"fieldConfig": {
"defaults": {
"color": {
"mode": "palette-classic"
},
"custom": {
"axisBorderShow": false,
"axisCenteredZero": false,
"axisColorMode": "text",
"axisLabel": "",
"axisPlacement": "auto",
"barAlignment": 0,
"barWidthFactor": 0.6,
"drawStyle": "line",
"fillOpacity": 0,
"gradientMode": "none",
"hideFrom": {
"legend": false,
"tooltip": false,
"viz": false
},
"insertNulls": false,
"lineInterpolation": "linear",
"lineWidth": 1,
"pointSize": 5,
"scaleDistribution": {
"type": "linear"
},
"showPoints": "auto",
"spanNulls": false,
"stacking": {
"group": "A",
"mode": "none"
},
"thresholdsStyle": {
"mode": "off"
}
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green"
},
{
"color": "red",
"value": 80
}
]
}
},
"overrides": []
},
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 0
},
"id": 1,
"options": {
"legend": {
"calcs": [],
"displayMode": "list",
"placement": "bottom",
"showLegend": true
},
"tooltip": {
"hideZeros": false,
"mode": "single",
"sort": "none"
}
},
"pluginVersion": "12.0.0",
"targets": [
{
"datasource": {
"type": "datasource",
"uid": "grafana"
},
"refId": "A"
}
],
"title": "Example panel",
"type": "timeseries"
}
],
"preload": false,
"schemaVersion": 41,
"tags": [
"example"
],
"templating": {
"list": [
{
"current": {
"text": "",
"value": ""
},
"definition": "",
"description": "example description",
"label": "ExampleLabel",
"name": "ExampleVariable",
"options": [],
"query": "",
"refresh": 1,
"regex": "cluster",
"type": "query"
}
]
},
"time": {
"from": "now-6h",
"to": "now"
},
"timepicker": {},
"timezone": "browser",
"title": "Example Dasard"
},
"status": {}
Status Codes:
- 201 – Created
- 400 – Errors (invalid json, missing or invalid fields, etc)
- 401 – Unauthorized
- 403 – Access denied
- 409 – Conflict (dasard with the same uid already exists)
Update Dasard
PUT /apis/dasard.grafana.app/v1beta1/namespaces/:namespace/dasards/:uid
Updates an existing dasard via the dasard uid.
- namespace: to read more about the namespace to use, see the API overview.
- uid: the unique identifier of the dasard to update. this will be the name in the dasard response
Required permissions
See note in the introduction for an explanation.
Action | Scope |
---|---|
dasards:write |
|
Example Update Request:
POST /apis/dasard.grafana.app/v1beta1/namespaces/default/dasards/gdxccn HTTP/1.1
Accept: application/json
Content-Type: application/json
Authorization: Bearer eyJrIjoiT0tTcG1pUlY2RnVKZTFVaDFsNFZXdE9ZWmNrMkZYbk
{
"metadata": {
"name": "gdxccn",
"annotations": {
"grafana.app/folder": "fef30w4jaxla8b",
"grafana.app/message": "commit message"
},
},
"spec": {
"title": "New dasard - updated",
"schemaVersion": 41,
...
}
}
JSON Body schema:
- metadata.name – The unique identifier.
- metadata.annotations.grafana.app/folder - Optional field, the unique identifier of the folder under which the dasard should be created.
- metadata.annotations.grafana.app/message - Optional field, to set a commit message for the version history.
- spec – The dasard json.
Example Response:
HTTP/1.1 200 OK
Content-Type: application/json; charset=UTF-8
Content-Length: 485
{
"kind": "Dasard",
"apiVersion": "dasard.grafana.app/v1beta1",
"metadata": {
"name": "gdxccn",
"namespace": "default",
"uid": "Cc7fA5ffHY94NnHZyMxXvFlpFtOmkK3qkBcVZPKSPXcX",
"resourceVersion": "2",
"generation": 2,
"creationTimestamp": "2025-03-06T19:57:18Z",
"annotations": {
"grafana.app/folder": "fef30w4jaxla8b",
"grafana.app/createdBy": "service-account:cef2t2rfm73lsb",
"grafana.app/updatedBy": "service-account:cef2t2rfm73lsb",
"grafana.app/updatedTimestamp": "2025-03-07T02:58:36Z"
}
},
"spec": {
"schemaVersion": 41,
"title": "New dasard - updated",
...
}
}
Status Codes:
- 200 – OK
- 400 – Errors (invalid json, missing or invalid fields, etc)
- 401 – Unauthorized
- 403 – Access denied
- 409 – Conflict (dasard with the same version already exists)
Get Dasard
GET /apis/dasard.grafana.app/v1beta1/namespaces/:namespace/dasards/:uid
Gets a dasard via the dasard uid.
- namespace: to read more about the namespace to use, see the API overview.
- uid: the unique identifier of the dasard to update. this will be the name in the dasard response
Note: For large dasards, add /dto
to the end of the URL to get the full dasard body.
Required permissions
See note in the introduction for an explanation.
Action | Scope |
---|---|
dasards:read |
|
Example Get Request:
GET /apis/dasard.grafana.app/v1beta1/namespaces/default/dasards/gdxccn HTTP/1.1
Accept: application/json
Content-Type: application/json
Authorization: Bearer eyJrIjoiT0tTcG1pUlY2RnVKZTFVaDFsNFZXdE9ZWmNrMkZYbk
Example Response:
HTTP/1.1 200 OK
Content-Type: application/json; charset=UTF-8
Content-Length: 485
{
"kind": "Dasard",
"apiVersion": "dasard.grafana.app/v1beta1",
"metadata": {
"name": "gdxccn",
"namespace": "default",
"uid": "Cc7fA5ffHY94NnHZyMxXvFlpFtOmkK3qkBcVZPKSPXcX",
"resourceVersion": "2",
"generation": 2,
"creationTimestamp": "2025-03-06T19:57:18Z",
"annotations": {
"grafana.app/createdBy": "service-account:cef2t2rfm73lsb",
"grafana.app/updatedBy": "service-account:cef2t2rfm73lsb",
"grafana.app/updatedTimestamp": "2025-03-07T02:58:36Z"
}
},
"spec": {
"schemaVersion": 41,
"title": "New dasard - updated",
...
}
}
Status Codes:
- 200 – OK
- 401 – Unauthorized
- 403 – Access denied
- 404 – Not Found
List Dasards
GET /apis/dasard.grafana.app/v1beta1/namespaces/:namespace/dasards
Lists all dasards in the given organization. You can control the maximum number of dasards returned through the limit
query parameter. You can then use the continue
token returned to fetch the next page of dasards.
- namespace: to read more about the namespace to use, see the API overview.
Required permissions
See note in the introduction for an explanation.
Action | Scope |
---|---|
dasards:read |
|
Example Get Request:
GET /apis/dasard.grafana.app/v1beta1/namespaces/default/dasards?limit=1 HTTP/1.1
Accept: application/json
Content-Type: application/json
Authorization: Bearer eyJrIjoiT0tTcG1pUlY2RnVKZTFVaDFsNFZXdE9ZWmNrMkZYbk
Example Response:
HTTP/1.1 200 OK
Content-Type: application/json; charset=UTF-8
Content-Length: 644
{
"kind": "DasardList",
"apiVersion": "dasard.grafana.app/v1alpha1",
"metadata": {
"resourceVersion": "1741315830000",
"continue": "org:1/start:1158/folder:"
},
"items": [
{
"kind": "Dasard",
"apiVersion": "dasard.grafana.app/v1alpha1",
"metadata": {
"name": "gpqcmf",
"namespace": "default",
"uid": "VQyL7pNTpfGPNlPM6HRJSePrBg5dXmxr4iPQL7txLtwX",
"resourceVersion": "1",
"generation": 1,
"creationTimestamp": "2025-03-06T19:50:30Z",
"annotations": {
"grafana.app/createdBy": "service-account:cef2t2rfm73lsb",
"grafana.app/updatedBy": "service-account:cef2t2rfm73lsb",
"grafana.app/updatedTimestamp": "2025-03-06T19:50:30Z"
}
},
"spec": {
"schemaVersion": 41,
"title": "New dasard",
"uid": "gpqcmf",
"version": 1,
...
}
}
]
}
Status Codes:
- 200 – OK
- 401 – Unauthorized
- 403 – Access denied
Delete Dasard
DELETE /apis/dasard.grafana.app/v1beta1/namespaces/:namespace/dasards/:uid
Deletes a dasard via the dasard uid.
- namespace: to read more about the namespace to use, see the API overview.
- uid: the unique identifier of the dasard to update. this will be the name in the dasard response
Required permissions
See note in the introduction for an explanation.
Action | Scope |
---|---|
dasards:delete |
|
Example Delete Request:
DELETE /apis/dasard.grafana.app/v1beta1/namespaces/default/dasards/gdxccn HTTP/1.1
Accept: application/json
Content-Type: application/json
Authorization: Bearer eyJrIjoiT0tTcG1pUlY2RnVKZTFVaDFsNFZXdE9ZWmNrMkZYbk
Example Response:
HTTP/1.1 200 OK
Content-Type: application/json; charset=UTF-8
Content-Length: 78
{
"kind": "Status",
"apiVersion": "v1",
"metadata": {},
"status": "Success",
"details": {
"name": "gdxccn",
"group": "dasard.grafana.app",
"kind": "dasards",
"uid": "Cc7fA5ffHY94NnHZyMxXvFlpFtOmkK3qkBcVZPKSPXcX"
}
}
Status Codes:
- 200 – OK
- 401 – Unauthorized
- 403 – Access denied
- 404 – Not found
Gets the home dasard
GET /api/dasards/home
Will return the home dasard.
Example Request:
GET /api/dasards/home HTTP/1.1
Accept: application/json
Content-Type: application/json
Authorization: Bearer eyJrIjoiT0tTcG1pUlY2RnVKZTFVaDFsNFZXdE9ZWmNrMkZYbk
Example Response:
HTTP/1.1 200
Content-Type: application/json
{
"dasard": {
"editable":false,
"nav":[
{
"enable":false,
"type":"timepicker"
}
],
"style":"dark",
"tags":[],
"templating":{
"list":[
]
},
"time":{
},
"timezone":"browser",
"title":"Home",
"version":5
},
"meta": {
"isHome":true,
"canSave":false,
"canEdit":false,
"canStar":false,
"url":"",
"expires":"0001-01-01T00:00:00Z",
"created":"0001-01-01T00:00:00Z"
}
}
Tags for Dasard
GET /api/dasards/tags
Get all tags of dasards
Example Request:
GET /api/dasards/tags HTTP/1.1
Accept: application/json
Content-Type: application/json
Authorization: Bearer eyJrIjoiT0tTcG1pUlY2RnVKZTFVaDFsNFZXdE9ZWmNrMkZYbk
Example Response:
HTTP/1.1 200
Content-Type: application/json
[
{
"term":"tag1",
"count":1
},
{
"term":"tag2",
"count":4
}
]
Dasard Search
APIs
Unique identifier (uid) vs identifier (id)
The unique identifier (uid) of a dasard can be used to uniquely identify a dasard within a given org. It’s automatically generated if not provided when creating a dasard. The uid allows having consistent URLs for accessing dasards and when syncing dasards between multiple Grafana installs, see dasard provisioning for more information. This means that changing the title of a dasard will not break any bookmarked links to that dasard.
The uid can have a maximum length of 40 characters.
The identifier (id) of a dasard is deprecated in favor of the unique identifier (uid).
Create / Update dasard
POST /api/dasards/db
Creates a new dasard or updates an existing dasard. When updating existing dasards, if you do not define the folderId
or the folderUid
property, then the dasard(s) are moved to the root level. (You need to define only one property, not both).
Note: This endpoint is not intended for creating folders, use
POST /api/folders
for that.
Required permissions
See note in the introduction for an explanation.
Action | Scope |
---|---|
dasards:create |
|
dasards:write |
|
Example Request for new dasard:
POST /api/dasards/db HTTP/1.1
Accept: application/json
Content-Type: application/json
Authorization: Bearer eyJrIjoiT0tTcG1pUlY2RnVKZTFVaDFsNFZXdE9ZWmNrMkZYbk
{
"dasard": {
"id": null,
"uid": null,
"title": "Production Overview",
"tags": [ "templated" ],
"timezone": "browser",
"schemaVersion": 16,
"refresh": "25s"
},
"folderUid": "l3KqBxCMz",
"message": "Made changes to xyz",
"overwrite": false
}
JSON Body schema:
- dasard – The complete dasard model.
- dasard.id – id = null to create a new dasard.
- dasard.uid – Optional unique identifier when creating a dasard. uid = null will generate a new uid.
- dasard.refresh - Set the dasard refresh interval. If this is lower than the minimum refresh interval, then Grafana will ignore it and will enforce the minimum refresh interval.
- folderId – The id of the folder to save the dasard in.
- folderUid – The UID of the folder to save the dasard in. Overrides the
folderId
. - overwrite – Set to true if you want to overwrite an existing dasard with a given dasard UID.
- message - Set a commit message for the version history.
Example Request for updating a dasard:
POST /api/dasards/db HTTP/1.1
Accept: application/json
Content-Type: application/json
Authorization: Bearer eyJrIjoiT0tTcG1pUlY2RnVKZTFVaDFsNFZXdE9ZWmNrMkZYbk
{
"dasard": {
"id": 1,
"title": "Production Overview Updated",
"tags": [ "templated" ],
"timezone": "browser",
"schemaVersion": 16,
"version": 1,
"refresh": "25s"
},
"folderUid": "l3KqBxCMz",
"message": "Made changes to xyz",
"overwrite": false
}
Example Response:
HTTP/1.1 200 OK
Content-Type: application/json; charset=UTF-8
Content-Length: 78
{
"id": 1,
"uid": "e883f11b-77c0-4ee3-9a70-3ba223d66e56",
"url": "/d/e883f11b-77c0-4ee3-9a70-3ba223d66e56/production-overview-updated",
"status": "success",
"version": 2
"slug": "production-overview-updated",
}
Status Codes:
- 200 – Created
- 400 – Errors (invalid json, missing or invalid fields, etc)
- 401 – Unauthorized
- 403 – Access denied
- 412 – Precondition failed
The 412 status code is used for explaining that you cannot create the dasard and why. There can be different reasons for this:
- The dasard has been changed by someone else,
status=version-mismatch
- A dasard with the same uid already exists,
status=name-exists
- The dasard belongs to plugin
<plugin title>
,status=plugin-dasard
The response body will have the following properties:
HTTP/1.1 412 Precondition Failed
Content-Type: application/json; charset=UTF-8
Content-Length: 97
{
"message": "The dasard has been changed by someone else",
"status": "version-mismatch"
}
Get dasard by uid
GET /api/dasards/uid/:uid
Will return the dasard given the dasard unique identifier (uid). Information about the unique identifier of a folder containing the requested dasard might be found in the metadata.
Required permissions
See note in the introduction for an explanation.
Action | Scope |
---|---|
dasards:read |
|
Example Request:
GET /api/dasards/uid/cIBgcSjkk HTTP/1.1
Accept: application/json
Content-Type: application/json
Authorization: Bearer eyJrIjoiT0tTcG1pUlY2RnVKZTFVaDFsNFZXdE9ZWmNrMkZYbk
Example Response:
HTTP/1.1 200
Content-Type: application/json
{
"dasard": {
"id": 1,
"uid": "cIBgcSjkk",
"title": "Production Overview",
"tags": [ "templated" ],
"timezone": "browser",
"schemaVersion": 16,
"version": 0
},
"meta": {
"isStarred": false,
"url": "/d/cIBgcSjkk/production-overview",
"folderId": 2,
"folderUid": "l3KqBxCMz",
"slug": "production-overview" //deprecated in Grafana v5.0
}
}
Status Codes:
- 200 – Found
- 401 – Unauthorized
- 403 – Access denied
- 404 – Not found
Delete dasard by uid
DELETE /api/dasards/uid/:uid
Will delete the dasard given the specified unique identifier (uid).
Required permissions
See note in the introduction for an explanation.
Action | Scope |
---|---|
dasards:delete |
|
Example Request:
DELETE /api/dasards/uid/cIBgcSjkk HTTP/1.1
Accept: application/json
Content-Type: application/json
Authorization: Bearer eyJrIjoiT0tTcG1pUlY2RnVKZTFVaDFsNFZXdE9ZWmNrMkZYbk
Example Response:
HTTP/1.1 200
Content-Type: application/json
{
"title": "Production Overview",
"message": "Dasard Production Overview deleted",
"id": 2
}
Status Codes:
- 200 – Deleted
- 401 – Unauthorized
- 403 – Access denied
- 404 – Not found