Merge pull request #4290 from utkarshcmu/utkarshcmu-api-docs

Update data_source.md
This commit is contained in:
Carl Bergquist 2016-03-08 11:27:21 +01:00
commit 17006b4539

View File

@ -74,6 +74,39 @@ page_keywords: grafana, admin, http, api, documentation, datasource
"jsonData":null
}
## Get a single data sources by Name
`GET /api/datasources/name/:name`
**Example Request**:
GET /api/datasources/name/test_datasource HTTP/1.1
Accept: application/json
Content-Type: application/json
Authorization: Bearer eyJrIjoiT0tTcG1pUlY2RnVKZTFVaDFsNFZXdE9ZWmNrMkZYbk
**Example Response**:
HTTP/1.1 200
Content-Type: application/json
{
"id":1,
"orgId":1,
"name":"test_datasource",
"type":"graphite",
"access":"proxy",
"url":"http://mydatasource.com",
"password":"",
"user":"",
"database":"",
"basicAuth":false,
"basicAuthUser":"",
"basicAuthPassword":"",
"isDefault":false,
"jsonData":null
}
## Create data source
`POST /api/datasources`