datasources

Get data source Id by Name. This function will be removed in the future.

If you are running Grafana Enterprise and have Fine-grained access control enabled you need to have a permission with action: datasources:read and scopes: datasources:*, datasources:name:* and datasources:name:test_datasource (single data source).

get/datasources/id/{name}

Request

  • Base URL
    /api (relative, and the document’s source URL is not known)
  • URL
    /api/datasources/id/{name}
  • Auth
    • HTTP basic
    • or API key in header Authorization

Path parameters

namestring required

Response

(empty)

idinteger required

ID Identifier of the data source.

Example response

{
  "id": 65
}

Changes

No recorded changes to this operation across all 1 revision of this API.