Hey guys, I’m trying to automate our Grafana dashboard and alert creation in code and i try to connect with an api key to the grafana using curl but i only get a “302 found response”
my request is something like:
curl -X POST -H "Authorization: Bearer XXXXXXXXXXXXXXXXXX" -H "Content-Type: application/json" -d '{
"dashboard": {
"id": null,
"title": "Matan API Test",
"tags": [ "templated" ],
"timezone": "browser",
"rows": [
{
}
],
"schemaVersion": 6,
"version": 0
},
"overwrite": false
}' https://grafana.foo.bar/api/dashboards/db
and the response is:
<html>
<head><title>302 Found</title></head>
<body>
<center><h1>302 Found</h1></center>
</body>
</html>
even when i do something simple like:
curl -H "Authorization: Bearer XXXXX" https://grafana.foo.bar/api/dashboards/home
it’s the same result… do i need to do something with the google auth first?