get_datasource_by_name
Retrieve detailed information about a specific Grafana datasource by providing its name to access configuration and connection details.
Instructions
Retrieves detailed information about a specific datasource using its name.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | The name of the datasource |
Implementation Reference
- Supporting method in GrafanaClient class that makes the Grafana API request to fetch a datasource by its name and handles errors.
async getDatasourceByName(name: string): Promise<Datasource> { try { const response = await this.client.get(`/api/datasources/name/${name}`); return response.data; } catch (error) { this.handleError(error); } }