Documentation for automated readers
A curated documentation index is available at: https://grafana.com/llms.txt
A complete documentation index is available at: https://grafana.com/llms-full.txt
These indexes can help with page discovery before fetching individual documents.
This page is also available in Markdown, which may be easier for automated readers and AI tools to parse than HTML. The Markdown version is available at https://grafana.com/docs/grafana/next/developer-resources/api-reference/http-api.md, or by sending Accept: text/markdown to https://grafana.com/docs/grafana/next/developer-resources/api-reference/http-api/. For broader documentation discovery, the curated index is available at https://grafana.com/llms.txt and the complete index is available at https://grafana.com/llms-full.txt.
This is documentation for the next version of Grafana documentation. For the latest stable release, go to the latest version.
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 new API structure in Grafana for information on the new HTTP API structure.
- The API migration guide for details on the legacy API deprecation process.
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 |
| Stars HTTP API | New | /api/collection/* |
| 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 |
Stars API - /user/stars/* | Deprecated | Not Applicable |
| Team HTTP API | Deprecated | Not Applicable |
| Team Sync HTTP API | Deprecated | Not Applicable |
| User HTTP API | Deprecated | Not Applicable |
Related resources
Use the following resources to keep working with Grafana APIs:
- API structure: Refer to The new API structure in Grafana.
- Migration guide: Refer to Migrate to the new APIs.
- Swagger UI: Open the
/swaggerpage in your Grafana instance to inspect endpoint schemas and try requests.
Was this page helpful?
Related resources from Grafana Labs


