Implemented GetDataSourceIdByName API

This commit is contained in:
utkarshcmu
2016-03-10 01:31:10 -08:00
parent 8afd56575c
commit 4fbff99186
4 changed files with 47 additions and 2 deletions
+21 -1
View File
@@ -74,7 +74,7 @@ page_keywords: grafana, admin, http, api, documentation, datasource
"jsonData":null
}
## Get a single data sources by Name
## Get a single data source by Name
`GET /api/datasources/name/:name`
@@ -107,6 +107,26 @@ page_keywords: grafana, admin, http, api, documentation, datasource
"jsonData":null
}
## Get data source Id by Name
`GET /api/datasources/id/:name`
**Example Request**:
GET /api/datasources/id/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
}
## Create data source
`POST /api/datasources`