I presume Im doing something wrong because every time I run my api script from the backend, it says "success" but when i go to the grafana UI, the dashboard I just created is no where to be found.
here's the full script:
#!/usr/bin/env python
import requests,sys,json
url = "http://admin:admin@10.10.10.10:3000/api/dashboards/home"
headers = {
'Authorization': 'Bearer eyJrIjoiazJblahblahMiLCJuIjoiYXBpa2V5Y3VybCIsImlkIjoyf',
'Content-Type': 'application/json',
}
creategrdb = '''{
"dashboard": {
"id": null,
"title": "API Test Dashboard 3",
"originalTitle": "API Test Dashboard 3",
"timezone": "browser",
"rows": [
{
"collapse": false,
"editable": true,
"height": "250px",
"panels": [],
"title": "Row"
}
],
"schemaVersion": 6,
"version": 0
}
}'''
response = requests.post('http://10.10.10.10:3000/api/dashboards/db', headers=headers, data=creategrdb, verify=True)
print (response.text)
When I run this script, I get this:
{"id":17,"slug":"api-test-dashboard-3","status":"success","uid":"wtKFBr6ik","url":"/d/wtKFBr6ik/api-test-dashboard-3","version":1}
Which indicates success.
But when I go to the grafana UI to make sure the dashboard was created, I see nothing.
When I run the script again, it aborts with this:
{"message":"A dashboard with the same name in the folder already exists","status":"name-exists"}
Indicating the dashboard IS created somewhere, but where that "somewhere" is, seems to be a mystery.
And the user im logging into the UI as, is "admin" who has all the superuser privileges. So i doubt its a problem of permissions.
any ideas?