Hi,
I am trying to create a dashboard in a folder in grafana with api.
There is a folder already yet there is no dashboard inside it.
I am sending a request to the this url → /api/dashboards/db with the proper api key and other headers but getting an error like this and this doesn’t make sense for me and I couldn’t find a way to solve it.
{
"message": "Not found"
}
This is my request body:
{
"dashboard": {
"id": null,
"uid": null,
"title": "Service Level Objectives - XX",
"tags": [
"test",
"test2"
],
"timezone": "browser",
"panels": [
{
"title": "Test (Error Rate)",
"description": null,
"datasource": "Prometheus",
"cacheTimeout": null,
"colorBackground": false,
"colorValue": true,
"colors": [
"#299c46",
"#e0752d",
"#bf1b00"
],
"decimals": 3,
"format": "percentunit",
"gauge": {
"maxValue": 100,
"minValue": 0,
"show": false,
"thresholdLabels": false,
"thresholdMarkers": false
},
"gridPos": {
"h": 4,
"w": 6,
"x": 0,
"y": 0
},
"interval": null,
"links": [],
"mappingType": 1,
"mappingTypes": [
{
"name": "value to text",
"value": 1
},
{
"name": "range to text",
"value": 2
}
],
"maxDataPoints": 100,
"nullPointMode": "connected",
"nullText": null,
"postfix": "",
"postfixFontSize": "50%",
"prefix": "",
"prefixFontSize": "70%",
"rangeMaps": [
{
"from": "null",
"text": "N/A",
"to": "null"
}
],
"sparkline": {
"fillColor": "#447ebc",
"full": false,
"lineColor": "#e0f9d7",
"show": true
},
"tableColumn": "",
"targets": [
{
"expr": "sum(slo_Test_FailureCount) / sum(slo_Test_SuccessCount + slo_Test_FailureCount)",
"datasource": "Prometheus",
"intervalFactor": 1,
"legendFormat": "Test",
"format": "time_series",
"hide": false,
"refId": "A"
}
],
"thresholds": "0.01, 0.1",
"timeFrom": null,
"timeShift": null,
"transparent": true,
"type": "singlestat",
"valueFontSize": "100%",
"valueMaps": [
{
"op": "=",
"text": "N/A",
"value": "null"
}
],
"valueName": "avg"
}
],
"templating": {
"list": []
}
},
"folderId": 83,
"overwrite": true
}
Do you have any suggestions?