grafana-dash-gen
grafana-dash-gen copied to clipboard
Unable to publish dashboard TEST API dashboard { message: 'Unauthorized' } Got statusCode401
Hi, I try to connect to grafana running in docker and I don't know how to set up grafana.configure({ url: 'http://localhost:3000/api/dashboards/db/', cookie: 'auth-openid=REPLACETOKENIFAPPLICABLE' });
I usually use API TOKEN in form: Authorization: Bearer "My-token", but how to configure "cookie"? For any reaction I will be grateful.
cookie could be find in chrome debugger,which name is grafana_session
I'm curious about the choice to use cookie as an authentication method when Grafana has API key support.
To set it in the header, rathan cookie.
grafana.configure({ url: 'XXXapi/dashboards/db', headers: {'Authorization': 'Bearer XXX9'} });