{"action":"closed","issue":{"url":"https://api.github.com/repos/grafana/grafana/issues/2178","labels_url":"https://api.github.com/repos/grafana/grafana/issues/2178/labels{/name}","comments_url":"https://api.github.com/repos/grafana/grafana/issues/2178/comments","events_url":"https://api.github.com/repos/grafana/grafana/issues/2178/events","html_url":"https://github.com/grafana/grafana/issues/2178","id":88886467,"number":2178,"title":"Adding datasource via API doesn't work with non-default root_url","user":{"login":"zanoni23","id":12928665,"avatar_url":"https://avatars.githubusercontent.com/u/12928665?v=3","gravatar_id":"","url":"https://api.github.com/users/zanoni23","html_url":"https://github.com/zanoni23","followers_url":"https://api.github.com/users/zanoni23/followers","following_url":"https://api.github.com/users/zanoni23/following{/other_user}","gists_url":"https://api.github.com/users/zanoni23/gists{/gist_id}","starred_url":"https://api.github.com/users/zanoni23/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zanoni23/subscriptions","organizations_url":"https://api.github.com/users/zanoni23/orgs","repos_url":"https://api.github.com/users/zanoni23/repos","events_url":"https://api.github.com/users/zanoni23/events{/privacy}","received_events_url":"https://api.github.com/users/zanoni23/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-06-17T01:53:18Z","updated_at":"2015-06-17T17:44:50Z","closed_at":"2015-06-17T17:44:50Z","body":"When trying to automate the addition of a datasource as per https://github.com/grafana/grafana/issues/1789 I find that it doesn't work if I set the root_url to have grafana in a subpath (e.g. /test/grafana/ - used in ProxyPass in Apache).\r\nWhen I try to query the API locally (not through the Apache) \"http://localhost:8080/api/datasources\"  I get message \"access denied\".  (Grafana is configured to listen on 8080).  When I query \"/test/grafana/api/datasources\" through the Apache I get the same message.\r\nIf I revert the root_url to have the default setting, it does work.  Grafana 2.0.2.\r\n\r\nI tried the new Grafana 2.1pre and its new API version (different HTTP method used etc) and had the same issue but got message \"not found\" I think - again it worked with default setting but not a custom root_url."}}