{"action":"closed","issue":{"url":"https://api.github.com/repos/grafana/grafana/issues/2431","labels_url":"https://api.github.com/repos/grafana/grafana/issues/2431/labels{/name}","comments_url":"https://api.github.com/repos/grafana/grafana/issues/2431/comments","events_url":"https://api.github.com/repos/grafana/grafana/issues/2431/events","html_url":"https://github.com/grafana/grafana/issues/2431","id":98773862,"number":2431,"title":"Feature: a way to create an api key automatically","user":{"login":"htch","id":6015672,"avatar_url":"https://avatars.githubusercontent.com/u/6015672?v=3","gravatar_id":"","url":"https://api.github.com/users/htch","html_url":"https://github.com/htch","followers_url":"https://api.github.com/users/htch/followers","following_url":"https://api.github.com/users/htch/following{/other_user}","gists_url":"https://api.github.com/users/htch/gists{/gist_id}","starred_url":"https://api.github.com/users/htch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/htch/subscriptions","organizations_url":"https://api.github.com/users/htch/orgs","repos_url":"https://api.github.com/users/htch/repos","events_url":"https://api.github.com/users/htch/events{/privacy}","received_events_url":"https://api.github.com/users/htch/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-08-03T15:52:28Z","updated_at":"2015-08-03T15:59:46Z","closed_at":"2015-08-03T15:59:45Z","body":"As of now Grafana *almost* can be deployed fully automatically (with salt, chef, what have you), kudos to you guys for making the api.\r\n\r\nHowever there's one obstacle: to access the api you need the api key and that api key has to be issued by a human in the gui. You could work this around of course by writing the key in the db directly or by authenticating the api with \"normal\" admin:password credentials via the \"human\" login page. Both solutions are hacky, if you rely on them your deployment script (or, god forbid, salt formula used by tens of projects) is going to break as soon as the db schema/login page layout changes.\r\n\r\nThird option, it could be done more like this: http://sentry.readthedocs.org/en/stable/faq/index.html (ie the user makes his own ad hoc script to create his api key) but given go compiled nature it is going to be PITA for the user to create, maintain and deploy: you can't [very easily] cross-compile go code that depends on c extensions.\r\n\r\nI believe this problem should be approached differently: by providing the user with a cli script to manipulate api keys, shipped together with grafana.\r\n\r\nDo you guys think this is viable?"}}