Grafana HTTP API reference guide

Every Grafana instance exposes an HTTP API, used by the Grafana frontend to manage resources like saving dashboards, creating users, updating data sources, deleting alerts, and more. You can use the HTTP API to programmatically access or manage resources from your Grafana instance.

If you need to manage or access other resources from your Grafana Cloud Stack, refer to the Grafana Cloud API instead.

New generation HTTP APIs

Grafana is deprecating legacy APIs (/api) in favor of a new generation of improved APIs (/apis) which follow a standardized API structure alongside consistent API versioning.

To learn more refer to:

The Grafana API specification

Grafana HTTP APIs comply both with the OpenAPI v2 specification (Swagger 2.0) and OpenAPI v3 specification. While both describe the exact same set of Grafana HTTP API routes (dashboards, folders, data sources, organizations, users, teams, RBAC, alerting provisioning…), v2 is the canonical specification and source of truth, and v3 is converted from the v2 file using a conversion script.

If you’re consuming a Grafana HTTP API:

  • Use v2 if your tooling (SDK generators, older Swagger UI, terraform-provider-grafana) expects Swagger 2.0.
  • Use v3 if your tooling requires OpenAPI 3.x (for example, newer codegen tools, some API gateways, Postman’s newer import features).

You can browse and try out both via the Swagger UI editor, served by the Grafana server, by navigating to /swagger-ui.

Authentication

In OSS, you can authenticate your requests to the HTTP APIs using basic auth or a service account token. In Grafana Cloud, only the service account token option is available. For more details refer to HTTP API authentication.

List of available HTTP APIs

The following table lists all available HTTP API reference pages. New APIs are listed first, followed by legacy APIs.

API Type Replaces legacy API
Alert enrichment HTTP API (Swagger) New No
Alert notifications HTTP API (Swagger) New No
Banners HTTP API (Swagger) New No
Dashboard HTTP API New /api/dashboards/*
Folder HTTP API New /api/folders/*
SLO (Swagger) New - Cloud only No
Playlist HTTP API New No
Resource history HTTP API New No
Secrets Management HTTP API New No
Admin HTTP API Deprecated Not Applicable
Alerting Provisioning HTTP API Deprecated Not Applicable
Annotations HTTP API Deprecated Not Applicable
Correlations HTTP API Deprecated Not Applicable
Dashboard Permissions HTTP API Deprecated Not Applicable
Dashboard Versions HTTP API Deprecated Not Applicable
Data source HTTP API Deprecated Not Applicable
Data source LBAC rules HTTP API Deprecated Not Applicable
Data source permissions HTTP API Deprecated Not Applicable
Folder/Dashboard Search HTTP API Deprecated Not Applicable
Folder Permissions HTTP API Deprecated Not Applicable
Library Element HTTP API Deprecated Not Applicable
Licensing HTTP API Deprecated Not Applicable
Organization HTTP API Deprecated Not Applicable
Other HTTP API Deprecated Not Applicable
Preferences API Deprecated Not Applicable
Query and Resource Caching HTTP API Deprecated Not Applicable
Query History HTTP API Deprecated Not Applicable
RBAC HTTP API Deprecated Not Applicable
Reporting API Deprecated Not Applicable
Service account HTTP API Deprecated Not Applicable
Shared Dashboards HTTP API Deprecated Not Applicable
Short URL HTTP API Deprecated Not Applicable
Snapshot API Deprecated Not Applicable
SSO Settings API Deprecated Not Applicable
Team HTTP API Deprecated Not Applicable
Team Sync HTTP API Deprecated Not Applicable
User HTTP API Deprecated Not Applicable

Use the following resources to keep working with Grafana APIs: