Grafana Data Source
Type ID: grafanaDataSource · Kind: Action · Ports: 1 in, 1 out
Configure, health-check, and list Grafana data source connections.
Credentials
Grafana (Service Account Token)
{
"credentials": {
"name": "grafana",
"id": "<credential-id>"
}
}
Resources & operations
- Data Source (
datasource)- Configure (
configure) - Create or update a data source connection (provisions Grafana to talk to another backend) - Health Check (
healthCheck) - Verify a configured data source is reachable - List (
list) - List configured data sources
- Configure (
For agent integrations (name: 'grafanaDataSource' in permissions.integrations), grant '*', a resource key, or an operation key — see Tools and Permissions:
Resource key (<resource>) | Operation keys (<resource>.<operation>) |
|---|---|
datasource | datasource.configure, datasource.healthCheck, datasource.list |
Properties
Common
| Property | Key | Type | Required | Default | Possible values | Applies when |
|---|---|---|---|---|---|---|
| Resource | resource | options | Yes | datasource | Data Source (datasource) | - |
| Operation | operation | options | Yes | configure | Configure (configure), Health Check (healthCheck), List (list) | resource = datasource |
Data Source → Configure
| Property | Key | Type | Required | Default | Possible values | Applies when |
|---|---|---|---|---|---|---|
| Existing Data Source UID | uid | string | No | '' | UID of an existing data source to update. Leave empty to create a new data source. | resource = datasource, operation = configure |
| Name | name | string | Yes | '' | Display name for the data source connection | resource = datasource, operation = configure |
| Type | type | string | Yes | '' | Grafana data source plugin type, for example prometheus, postgres, mysql, elasticsearch, loki | resource = datasource, operation = configure |
| URL | url | string | Yes | '' | Base URL of the backend this data source connects to, e.g. the target Prometheus or Postgres host | resource = datasource, operation = configure |
| Access Mode | access | options | No | proxy | Server (Proxy) (proxy), Browser (Direct) (direct) | resource = datasource, operation = configure |
| Basic Auth | basicAuth | boolean | No | false | Enable HTTP Basic Auth when connecting to the backend data source | resource = datasource, operation = configure |
| Basic Auth User | basicAuthUser | string | No | '' | Username for Basic Auth against the backend data source | resource = datasource, operation = configure, basicAuth = true |
| Basic Auth Password | basicAuthPassword | string | No | '' | Password for Basic Auth against the backend data source. Stored encrypted by Grafana as secureJsonData. | resource = datasource, operation = configure, basicAuth = true |
| JSON Data | jsonData | json | No | {} | Non-secret, data-source-type-specific configuration, for example { "httpMethod": "POST", "sslmode": "require" } | resource = datasource, operation = configure |
| Secure JSON Data | secureJsonData | json | No | {} | Secret, data-source-type-specific fields sent once and stored encrypted by Grafana, for example { "password": "...", "apiKey": "..." }. Never returned by Grafana on reads. | resource = datasource, operation = configure |
Data Source → Health Check
| Property | Key | Type | Required | Default | Possible values | Applies when |
|---|---|---|---|---|---|---|
| Data Source UID | uid | string | Yes | '' | UID of the data source to health-check | resource = datasource, operation = healthCheck |
Data Source → List
(No additional properties)
Notes
- Configure output:
{ id, uid, name, message, raw }. - Health Check output:
{ status, message, raw }. - List output:
{ datasources, count }.