We added a validation to check dashboard permissions when creating a snapshot.
Since that moment, the dashboard uid is required when creating a Snapshot.
The current error message is not good, and we should handle this error with a better / clearer message that dashboard uid is required and add this required field to the Snapshot API docs
We should also add a basic test confirming the correct error message appears when dashboard uid is missing
Related escalation
Additional details:
Summary of Issue:
POST calls to /api/snapshots endpoint now fail with {"message":"Failed to get dashboard","traceID":""}
The problem is that dashboard uid is required to create a Snapshot. We use it to validate whether a user has read permissions to the dashboard, which is creating the Snapshot.
This is a working payload in my local instance
{
"dashboard": {
"annotations": {
"list": [
{
"name": "Annotations & Alerts",
"enable": true,
"iconColor": "rgba(0, 211, 255, 1)",
"type": "dashboard",
"builtIn": 1,
"hide": true,
"snapshotData": []
}
]
},
"editable": true,
"fiscalYearStartMonth": 0,
"graphTooltip": 0,
"id": 1030,
"links": [],
"panels": [],
"preload": false,
"refresh": "",
"schemaVersion": 41,
"tags": [],
"templating": {
"list": []
},
"time": {
"from": "2025-03-21T12:28:01.056Z",
"to": "2025-03-21T18:28:01.056Z"
},
"timepicker": {},
"timezone": "",
"title": "Empty dashboard",
"uid": "d5f5654b-456c-42f6-84c7-bbfaefbef890",
"version": 3
},
"name": "Empty dashboard",
"expires": 604800,
"external": false
}
We added a validation to check dashboard permissions when creating a snapshot.
Since that moment, the dashboard
uidis required when creating a Snapshot.The current error message is not good, and we should handle this error with a better / clearer message that dashboard
uidis required and add this required field to the Snapshot API docsWe should also add a basic test confirming the correct error message appears when dashboard
uidis missingRelated escalation
Additional details:
Summary of Issue:
POST calls to /api/snapshots endpoint now fail with {"message":"Failed to get dashboard","traceID":""}
The problem is that dashboard uid is required to create a Snapshot. We use it to validate whether a user has read permissions to the dashboard, which is creating the Snapshot.
This is a working payload in my local instance
{
"dashboard": {
"annotations": {
"list": [
{
"name": "Annotations & Alerts",
"enable": true,
"iconColor": "rgba(0, 211, 255, 1)",
"type": "dashboard",
"builtIn": 1,
"hide": true,
"snapshotData": []
}
]
},
"editable": true,
"fiscalYearStartMonth": 0,
"graphTooltip": 0,
"id": 1030,
"links": [],
"panels": [],
"preload": false,
"refresh": "",
"schemaVersion": 41,
"tags": [],
"templating": {
"list": []
},
"time": {
"from": "2025-03-21T12:28:01.056Z",
"to": "2025-03-21T18:28:01.056Z"
},
"timepicker": {},
"timezone": "",
"title": "Empty dashboard",
"uid": "d5f5654b-456c-42f6-84c7-bbfaefbef890",
"version": 3
},
"name": "Empty dashboard",
"expires": 604800,
"external": false
}