{"action":"created","issue":{"url":"https://api.github.com/repos/grafana/grafana/issues/3826","labels_url":"https://api.github.com/repos/grafana/grafana/issues/3826/labels{/name}","comments_url":"https://api.github.com/repos/grafana/grafana/issues/3826/comments","events_url":"https://api.github.com/repos/grafana/grafana/issues/3826/events","html_url":"https://github.com/grafana/grafana/issues/3826","id":128157040,"number":3826,"title":"/api/datasources does not return jsonData field","user":{"login":"IzakMarais","id":8266640,"avatar_url":"https://avatars.githubusercontent.com/u/8266640?v=3","gravatar_id":"","url":"https://api.github.com/users/IzakMarais","html_url":"https://github.com/IzakMarais","followers_url":"https://api.github.com/users/IzakMarais/followers","following_url":"https://api.github.com/users/IzakMarais/following{/other_user}","gists_url":"https://api.github.com/users/IzakMarais/gists{/gist_id}","starred_url":"https://api.github.com/users/IzakMarais/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/IzakMarais/subscriptions","organizations_url":"https://api.github.com/users/IzakMarais/orgs","repos_url":"https://api.github.com/users/IzakMarais/repos","events_url":"https://api.github.com/users/IzakMarais/events{/privacy}","received_events_url":"https://api.github.com/users/IzakMarais/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-01-22T13:28:20Z","updated_at":"2016-01-22T13:29:05Z","closed_at":"2016-01-22T13:29:05Z","body":"When using the /api/datasources endpoint, the jsonData field is not populated:\r\n\r\n```\r\n$ curl localhost:3000/api/datasources | python -m json.tool\r\n  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current\r\n                                 Dload  Upload   Total   Spent    Left  Speed\r\n100   531  100   531    0     0  53041      0 --:--:-- --:--:-- --:--:-- 59000\r\n[\r\n    {\r\n        \"access\": \"proxy\",\r\n        \"basicAuth\": false,\r\n        \"basicAuthPassword\": \"\",\r\n        \"basicAuthUser\": \"\",\r\n        \"database\": \"\",\r\n        \"id\": 5,\r\n        \"isDefault\": true,\r\n        \"jsonData\": null,\r\n        \"name\": \"opentsdb\",\r\n        \"orgId\": 1,\r\n        \"password\": \"\",\r\n        \"type\": \"opentsdb\",\r\n        \"url\": \"http://localhost:4242\",\r\n        \"user\": \"\",\r\n        \"withCredentials\": false\r\n    },\r\n    {\r\n        \"access\": \"proxy\",\r\n        \"basicAuth\": false,\r\n        \"basicAuthPassword\": \"\",\r\n        \"basicAuthUser\": \"\",\r\n        \"database\": \"test\",\r\n        \"id\": 6,\r\n        \"isDefault\": false,\r\n        \"jsonData\": null,\r\n        \"name\": \"reference data\",\r\n        \"orgId\": 1,\r\n        \"password\": \"\",\r\n        \"type\": \"elasticsearch\",\r\n        \"url\": \"http://localhost:9200\",\r\n        \"user\": \"\",\r\n        \"withCredentials\": false\r\n    }\r\n]\r\n```\r\n\r\nWhen requesting a specific ID, however, it works as expected:\r\n```\r\n$ curl localhost:3000/api/datasources/6 | python -m json.tool\r\n  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current\r\n                                 Dload  Upload   Total   Spent    Left  Speed\r\n100   283  100   283    0     0  18836      0 --:--:-- --:--:-- --:--:-- 20214\r\n{\r\n    \"access\": \"proxy\",\r\n    \"basicAuth\": false,\r\n    \"basicAuthPassword\": \"\",\r\n    \"basicAuthUser\": \"\",\r\n    \"database\": \"test\",\r\n    \"id\": 6,\r\n    \"isDefault\": false,\r\n    \"jsonData\": {\r\n        \"esVersion\": 1\r\n    },\r\n    \"name\": \"reference data\",\r\n    \"orgId\": 1,\r\n    \"password\": \"\",\r\n    \"type\": \"elasticsearch\",\r\n    \"url\": \"http://localhost:9200\",\r\n    \"user\": \"\",\r\n    \"withCredentials\": false\r\n}\r\n```\r\n\r\nSince the esVersion field is not documented and not returned by the datsources endpoint, I was lucky to find #3566 which documents the required json. "},"comment":{"url":"https://api.github.com/repos/grafana/grafana/issues/comments/173922014","html_url":"https://github.com/grafana/grafana/issues/3826#issuecomment-173922014","issue_url":"https://api.github.com/repos/grafana/grafana/issues/3826","id":173922014,"user":{"login":"torkelo","id":10999,"avatar_url":"https://avatars.githubusercontent.com/u/10999?v=3","gravatar_id":"","url":"https://api.github.com/users/torkelo","html_url":"https://github.com/torkelo","followers_url":"https://api.github.com/users/torkelo/followers","following_url":"https://api.github.com/users/torkelo/following{/other_user}","gists_url":"https://api.github.com/users/torkelo/gists{/gist_id}","starred_url":"https://api.github.com/users/torkelo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/torkelo/subscriptions","organizations_url":"https://api.github.com/users/torkelo/orgs","repos_url":"https://api.github.com/users/torkelo/repos","events_url":"https://api.github.com/users/torkelo/events{/privacy}","received_events_url":"https://api.github.com/users/torkelo/received_events","type":"User","site_admin":false},"created_at":"2016-01-22T13:29:05Z","updated_at":"2016-01-22T13:29:05Z","body":"yes, this is by design. You have to request a specific resource to get the full details"}}