Grafana Data Sources API

If you are running Grafana Enterprise and have Fine-grained access control enabled, for some endpoints you would need to have relevant permissions. Refer to specific resources to understand what permissions are required.

GitHub OpenAPI
Pull this API's OpenAPI, operations, scores and pricing into your own code or AI agent with a free APIs.io key — sign in with GitHub, Google or LinkedIn. No form to fill in; signing in shares your email address with us (Privacy).

Operations 20

Each operation below carries the questions people ask an LLM about it and the instructions they give an agent to run it. Generated by API Evangelist overlay

GET /datasources List all data sources · Get all data sources #
Ask an LLM
“Which data sources are configured in Grafana?”
“Can I get every data source's name and type?”
Tell an agent
List all data sources.
Show every configured data source.
POST /datasources Add a data source · Create a data source #
Ask an LLM
“How do I add a new database data source?”
“Can I store a password securely when creating a data source?”
Tell an agent
Create a data source named {name} of type {type} at {url}.
Add data source {name} with basic auth user {user} and password {password}.
GET /datasources/correlations List data source correlations · Gets all correlations #
Ask an LLM
“What correlations exist between my data sources?”
“Can I page through all data source correlations?”
Tell an agent
List all data source correlations.
Show {limit} correlations starting at page {page}.
GET /datasources/id/{name} Look up a data source by name (deprecated) · Get data source Id by Name. This function will be removed in the future #
Ask an LLM
“Is there an older endpoint that resolves a data source name to its ID?”
“What does the deprecated data source name-to-ID lookup return?”
Tell an agent
Look up the data source ID for {name} using the deprecated name lookup.
Resolve the old data source name {name} to its ID.
GET /datasources/name/{name} Get a data source by name · Get a single data source by Name. This function will be removed in the future #
Ask an LLM
“How do I fetch a data source when I only know its name?”
“Can I read one data source by name through the deprecated name route?”
Tell an agent
Get the data source named {name}.
Fetch data source {name} by name.
DELETE /datasources/name/{name} Delete a data source by name · Delete an existing data source by name. #
Ask an LLM
“How do I remove a data source when I only know its name?”
“Can I delete a data source through the deprecated name route?”
Tell an agent destructive · confirm first
Delete the data source named {name}.
Remove data source {name} using the deprecated name route.
GET /datasources/proxy/uid/{uid}/{datasource_proxy_route} Proxy a GET call to a data source · Data source proxy GET calls #
Ask an LLM
“How do I proxy a GET request to a data source through its UID?”
“Can I fetch a data source resource by UID and route?”
Tell an agent
Proxy a GET call to data source {uid} at route {datasource_proxy_route}.
Fetch {datasource_proxy_route} from data source {uid}.
POST /datasources/proxy/uid/{uid}/{datasource_proxy_route} POST to a data source using its UID · Data source proxy POST calls #
Ask an LLM
“How do I send a POST request through a data source to a proxy route?”
“Which role does the data source need to support proxying POST calls?”
Tell an agent
Proxy the POST call through data source {uid} to route {datasource_proxy_route}.
Send a {datasource_proxy_route} POST request to data source {uid}.
DELETE /datasources/proxy/uid/{uid}/{datasource_proxy_route} DELETE through a data source using its UID · Data source proxy DELETE calls #
Ask an LLM
“Can I delete an item by routing a DELETE through a data source?”
“What route does the data source need to support for proxying DELETE calls?”
Tell an agent destructive · confirm first
Proxy the DELETE call through data source {uid} to route {datasource_proxy_route}.
Delete through data source {uid} using the {datasource_proxy_route} route.
GET /datasources/uid/{sourceUID}/correlations List correlations from a data source · Gets all correlations originating from the given data source #
Ask an LLM
“What correlations originate from a given data source?”
“Can I see only the correlations tied to one source UID?”
Tell an agent
List correlations from data source {sourceUID}.
Show all correlations originating at {sourceUID}.
POST /datasources/uid/{sourceUID}/correlations Add a correlation between data sources · Add correlation #
Ask an LLM
“How do I link two data sources with a correlation?”
“Can a correlation be an external URL instead of a query?”
Tell an agent
Add a {type} correlation from {sourceUID} to {targetUID}.
Create correlation {label} from {sourceUID} with config {config}.
GET /datasources/uid/{sourceUID}/correlations/{correlationUID} Get one correlation between data sources · Gets a correlation #
Ask an LLM
“How do I read a single correlation between two data sources?”
“Can I fetch a correlation by its UID?”
Tell an agent
Get correlation {correlationUID} from data source {sourceUID}.
Show correlation {correlationUID} on {sourceUID}.
PATCH /datasources/uid/{sourceUID}/correlations/{correlationUID} Update a correlation between data sources · Updates a correlation #
Ask an LLM
“How do I change the label or description of an existing correlation?”
“Can I update a correlation's type?”
Tell an agent
Update correlation {correlationUID} on {sourceUID} to label {label}.
Change the description of correlation {correlationUID} on {sourceUID} to {description}.
GET /datasources/uid/{uid} Get a data source by UID · Get a single data source by UID #
Ask an LLM
“How do I fetch a data source when I only know its UID?”
“Can I read a data source by UID?”
Tell an agent
Get the data source with UID {uid}.
Fetch data source {uid}.
PUT /datasources/uid/{uid} Update a data source by UID · Update an existing data source #
Ask an LLM
“How do I change the URL of a data source I already have?”
“Can I update a data source's basic auth settings by UID?”
Tell an agent
Update data source {uid} to point at {url}.
Change the basic auth user of data source {uid} to {user}.
DELETE /datasources/uid/{uid} Delete a data source by UID · Delete an existing data source by UID #
Ask an LLM
“How do I remove a data source when I only know its UID?”
“Can I delete a data source by UID?”
Tell an agent destructive · confirm first
Delete the data source with UID {uid}.
Remove data source {uid}.
DELETE /datasources/uid/{uid}/correlations/{correlationUID} Delete a correlation between data sources · Delete a correlation #
Ask an LLM
“How do I unlink two data sources by removing their correlation?”
“Can I delete a correlation by its UID?”
Tell an agent destructive · confirm first
Delete correlation {correlationUID} from data source {uid}.
Remove correlation {correlationUID} on {uid}.
GET /datasources/uid/{uid}/health Health-check a data source · Sends a health check request to the plugin datasource identified by the UID #
Ask an LLM
“Is my data source up and reachable?”
“Can I health-check a data source by UID?”
Tell an agent
Health-check the data source with UID {uid}.
Ping data source {uid} to confirm it is healthy.
GET /datasources/uid/{uid}/resources/{datasource_proxy_route} Fetch a resource from a data source · Fetch data source resources #
Ask an LLM
“How do I fetch a resource from a data source through its UID?”
“Can I read a data source's resources by UID and route?”
Tell an agent
Fetch resource {datasource_proxy_route} from data source {uid}.
Read {datasource_proxy_route} on data source {uid}.
POST /ds/query Query metrics with expressions · DataSource query metrics with expressions #
Ask an LLM
“How do I query metrics from a data source with expressions?”
“Can I run a query with expressions between two times?”
Tell an agent
Query data source {queries} from {from} to {to}.
Run a metrics query with expressions between {from} and {to}.

Documentation

📖
Documentation
https://grafana.com/docs/grafana/latest/developers/http_api/
📖
Authentication
https://grafana.com/docs/grafana/latest/developers/http_api/authentication/
📖
Documentation
https://grafana.com/docs/grafana/latest/developers/http_api/dashboard/
📖
Documentation
https://grafana.com/docs/grafana/latest/developers/http_api/dashboard_versions/
📖
Documentation
https://grafana.com/docs/grafana/latest/developers/http_api/dashboard_permissions/
📖
Documentation
https://grafana.com/docs/grafana/latest/developers/http_api/dashboard_public/
📖
Documentation
https://grafana.com/docs/grafana/latest/developers/http_api/folder/
📖
Documentation
https://grafana.com/docs/grafana/latest/developers/http_api/folder_dashboard_search/
📖
Documentation
https://grafana.com/docs/grafana/latest/developers/http_api/folder_permissions/
📖
Documentation
https://grafana.com/docs/grafana/latest/developers/http_api/data_source/
📖
Documentation
https://grafana.com/docs/grafana/latest/developers/http_api/datasource_permissions/
📖
Documentation
https://grafana.com/docs/grafana/latest/developers/http_api/datasource_lbac_rules/
📖
Documentation
https://grafana.com/docs/grafana/latest/developers/http_api/alerting_provisioning/
📖
Documentation
https://grafana.com/docs/grafana/latest/developers/http_api/annotations/
📖
Documentation
https://grafana.com/docs/grafana/latest/developers/http_api/org/
📖
Documentation
https://grafana.com/docs/grafana/latest/developers/http_api/user/
📖
Documentation
https://grafana.com/docs/grafana/latest/developers/http_api/team/
📖
Documentation
https://grafana.com/docs/grafana/latest/developers/http_api/team_sync/
📖
Documentation
https://grafana.com/docs/grafana/latest/developers/http_api/preferences/
📖
Documentation
https://grafana.com/docs/grafana/latest/developers/http_api/access_control/
📖
Documentation
https://grafana.com/docs/grafana/latest/developers/http_api/serviceaccount/
📖
Documentation
https://grafana.com/docs/grafana/latest/developers/http_api/sso-settings/
📖
Documentation
https://grafana.com/docs/grafana/latest/developers/http_api/admin/
📖
Documentation
https://grafana.com/docs/grafana/latest/developers/http_api/licensing/
📖
Documentation
https://grafana.com/docs/grafana/latest/developers/http_api/reporting/
📖
Documentation
https://grafana.com/docs/grafana/latest/developers/http_api/query_and_resource_caching/
📖
Documentation
https://grafana.com/docs/grafana/latest/developers/http_api/library_element/
📖
Documentation
https://grafana.com/docs/grafana/latest/developers/http_api/correlations/
📖
Documentation
https://grafana.com/docs/grafana/latest/developers/http_api/snapshot/
📖
Documentation
https://grafana.com/docs/grafana/latest/developers/http_api/short_url/
📖
Documentation
https://grafana.com/docs/grafana/latest/developers/http_api/query_history/

Specifications

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/grafana-com:grafana-com-data-sources-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

grafana-com-data-sources-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  description: 'The Grafana backend exposes an HTTP API, the same API is used by the frontend to do

    everything from saving dashboards, creating users and updating data sources.'
  title: Grafana HTTP API. Datasources API
  contact:
    name: Grafana Labs
    url: https://grafana.com
    email: hello@grafana.com
  version: 0.0.1
servers:
- url: /api
security:
- basic: []
- api_key: []
tags:


# --- truncated at 32 KB (52 KB total) ---
# Full source: https://artifacts.apis.io/grafana-com/openapi/grafana-com-data-sources-api-openapi.yml