Grafana HTTP API reference
Every Grafana instance exposes an HTTP API, which is the same 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 running in Grafana Cloud. Below is the list of existing HTTP APIs.
Note
If you need to manage or access other resources from your Grafana Cloud Stack, refer to the Grafana Cloud API instead.
Authenticate HTTP API requests
To use the HTTP API provided by a Grafana Cloud instance, authenticate requests with a service account token.
To access or create your service account tokens, click on Administration in the left-side menu, click Users and access, then Service Accounts. For details on creating service accounts, assigning permissions, and adding tokens, refer to Service Accounts.
Include the service account token in the Authorization
header for all requests to your Grafana instance:
GET http://your.grafana.com/api/dashboards/db/mydash HTTP/1.1
Accept: application/json
Authorization: Bearer eyJrIjoiT0tTcG1pUlY2RnVKZTFVaDFsNFZXdE9ZWmNrMkZYbk
Requests to the HTTP API are authenticated using the Authorization
header:
Authorization: Bearer <SERVICE ACCOUNT TOKEN>
HTTP APIs
- Alerting API (unstable)
- Alerting provisioning API
- Annotations API
- Correlations API
- Dashboard API
- Dashboard permissions API
- Dashboard versions API
- Data source API
- Folder API
- Folder permissions API
- Folder/Dashboard search API
- Library element API
- Playlists API
- Preferences API
- Public dashboard API
- Query history API
- Service account API
- Short URL API
- Snapshot API
- SSO settings API
- Team API
- User API
Grafana Enterprise HTTP APIs
Grafana Cloud also provides access to the following Enterprise APIs: