From the issues listed below, I can understand I can not simply use api key to call /api/org endpoints but the examples given in this link http://docs.grafana.org/http_api/org/ are using “Bearer” token as example and confuses me.
Is the doc needed for update? If api key is not supported for server admin, why the doc uses Bearer token?
Are there any specific routes that are not working? Some routes are restricted to not work with api keys - for example changing the Grafana Admin password. Most of the org routes require that the user is an organization admin.
These worked for me when using a key for a user that is an org admin:
Path such as api/orgs using Bearer token doesn’t seem to work. When the documentation (copied below) suggests it should (http://docs.grafana.org/http_api/org/). Or I am missing something?
Organisations
Search all Organisations
GET /api/orgs
Example Request:
GET /api/orgs HTTP/1.1
Accept: application/json
Content-Type: application/json
Authorization: Bearer eyJrIjoiT0tTcG1pUlY2RnVKZTFVaDFsNFZXdE9ZWmNrMkZYbk
I am trying to search all the organisation using curl http://admin:admin@community.grafana.com/api/orgs but I am getting {“message”:“Permission denied”} response though username and password is correct. I am using grafana 3.0