2022-05-26 11:06:25 -04:00
---
aliases:
2025-11-13 09:04:57 -05:00
- ../../http_api/ # /docs/grafana/next/http_api/
- ../../overview/ # /docs/grafana/next/overview/
- ../../../developers/http_api/ # /docs/grafana/developers/http_api/
- ../../developers/http_api/ # /docs/grafana/next/developers/http_api/
canonical: https://grafana.com/docs/grafana/latest/developer-resources/api-reference/http-api/
2022-05-26 11:06:25 -04:00
description: Grafana HTTP API
keywords:
- grafana
- http
- documentation
- api
- overview
Explicitly set all front matter labels in the source files (#71548)
* Set every page to have defaults of 'Enterprise' and 'Open source' labels
Signed-off-by: Jack Baldry <jack.baldry@grafana.com>
* Set administration pages to have of 'Cloud', 'Enterprise', and 'Open source' labels
Signed-off-by: Jack Baldry <jack.baldry@grafana.com>
* Set administration/enterprise-licensing pages to have 'Enterprise' labels
Signed-off-by: Jack Baldry <jack.baldry@grafana.com>
* Set administration/organization-management pages to have 'Enterprise' and 'Open source' labels
Signed-off-by: Jack Baldry <jack.baldry@grafana.com>
* Set administration/provisioning pages to have 'Enterprise' and 'Open source' labels
Signed-off-by: Jack Baldry <jack.baldry@grafana.com>
* Set administration/recorded-queries pages to have labels cloud,enterprise
* Set administration/roles-and-permissions/access-control pages to have labels cloud,enterprise
Signed-off-by: Jack Baldry <jack.baldry@grafana.com>
* Set administration/stats-and-license pages to have labels cloud,enterprise
* Set alerting pages to have labels cloud,enterprise,oss
* Set breaking-changes pages to have labels cloud,enterprise,oss
* Set dashboards pages to have labels cloud,enterprise,oss
* Set datasources pages to have labels cloud,enterprise,oss
* Set explore pages to have labels cloud,enterprise,oss
* Set fundamentals pages to have labels cloud,enterprise,oss
* Set introduction/grafana-cloud pages to have labels cloud
Signed-off-by: Jack Baldry <jack.baldry@grafana.com>
* Fix introduction pages products
Signed-off-by: Jack Baldry <jack.baldry@grafana.com>
* Set panels-visualizations pages to have labels cloud,enterprise,oss
* Set release-notes pages to have labels cloud,enterprise,oss
* Set search pages to have labels cloud,enterprise,oss
* Set setup-grafana/configure-security/audit-grafana pages to have labels cloud,enterprise
Signed-off-by: Jack Baldry <jack.baldry@grafana.com>
* Set setup-grafana/configure-security/configure-authentication pages to have labels cloud,enterprise,oss
* Set setup-grafana/configure-security/configure-authentication/enhanced-ldap pages to have labels cloud,enterprise
* Set setup-grafana/configure-security/configure-authentication/saml pages to have labels cloud,enterprise
* Set setup-grafana/configure-security/configure-database-encryption/encrypt-secrets-using-hashicorp-key-vault pages to have labels cloud,enterprise
* Set setup-grafana/configure-security/configure-request-security pages to have labels cloud,enterprise,oss
Signed-off-by: Jack Baldry <jack.baldry@grafana.com>
* Set setup-grafana/configure-security/configure-team-sync pages to have labels cloud,enterprise
Signed-off-by: Jack Baldry <jack.baldry@grafana.com>
* Set setup-grafana/configure-security/export-logs pages to have labels cloud,enterprise
Signed-off-by: Jack Baldry <jack.baldry@grafana.com>
* Set troubleshooting pages to have labels cloud,enterprise,oss
* Set whatsnew pages to have labels cloud,enterprise,oss
* Apply updated labels from review
Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com>
Co-authored-by: Isabel <76437239+imatwawana@users.noreply.github.com>
---------
Signed-off-by: Jack Baldry <jack.baldry@grafana.com>
Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com>
Co-authored-by: Isabel <76437239+imatwawana@users.noreply.github.com>
2023-07-18 04:10:12 -04:00
labels:
products:
- enterprise
- oss
2025-11-13 09:04:57 -05:00
- cloud
2022-05-26 11:06:25 -04:00
title: HTTP API
weight: 100
---
2016-11-27 11:09:47 -05:00
2025-11-13 09:04:57 -05:00
# Grafana HTTP API reference
2016-11-27 11:09:47 -05:00
2026-04-15 06:17:11 -04:00
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.
2016-11-27 11:09:47 -05:00
2026-04-15 06:17:11 -04:00
If you need to manage or access other resources from your [Grafana Cloud Stack ](https://grafana.com/docs/grafana-cloud/account-management/cloud-stacks/ ), refer to the [Grafana Cloud API ](https://grafana.com/docs/grafana-cloud/developer-resources/api-reference/cloud-api/ ) instead.
2023-03-01 09:36:37 -05:00
2026-04-15 06:17:11 -04:00
## New generation HTTP APIs
2023-03-01 09:36:37 -05:00
2026-04-15 06:17:11 -04:00
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 ](https://grafana.com/docs/grafana/<GRAFANA_VERSION>/developer-resources/api-reference/http-api/apis ).
2023-03-01 09:36:37 -05:00
2026-04-15 06:17:11 -04:00
These are the available new generation APIs:
2025-11-13 09:04:57 -05:00
2026-04-15 06:17:11 -04:00
- [Dashboards API ](https://grafana.com/docs/grafana/<GRAFANA_VERSION>/developer-resources/api-reference/http-api/dashboard/ )
- [Folder API ](https://grafana.com/docs/grafana/<GRAFANA_VERSION>/developer-resources/api-reference/http-api/folder/ )
- [Playlist API ](https://grafana.com/docs/grafana/<GRAFANA_VERSION>/developer-resources/api-reference/http-api/playlist/ )
- [Resource history API ](https://grafana.com/docs/grafana/<GRAFANA_VERSION>/developer-resources/api-reference/http-api/resource-history/ )
- [Secrets Management API ](https://grafana.com/docs/grafana/<GRAFANA_VERSION>/developer-resources/api-reference/http-api/secrets_management/ )
## Grafana API specification
HTTP API specs are available in Swagger:
- [OpenAPI v2 specification ](https://editor.swagger.io/?url=https://raw.githubusercontent.com/grafana/grafana/main/public/api-merged.json )
- [OpenAPI v3 specification ](https://editor.swagger.io/?url=https://raw.githubusercontent.com/grafana/grafana/main/public/openapi3.json ), generated from the v2 specs
You can browser and try out both via the Swagger UI editor (served by the Grafana server) by navigating to `/swagger-ui` .
2025-11-13 09:04:57 -05:00
## Authenticate HTTP API requests
### Grafana OSS
2023-10-31 09:29:08 -04:00
2024-09-06 02:17:20 -04:00
{{< docs / shared lookup = "developers/authentication.md" source = "grafana" version = "<GRAFANA_VERSION>" > }}
2023-10-31 09:29:08 -04:00
2025-11-13 09:04:57 -05:00
### Grafana Cloud
{{< docs / shared source = "grafana-cloud" lookup = "/developer-resources/authentication.md" version = "" > }}
2023-10-31 09:29:08 -04:00
## X-Grafana-Org-Id Header
2026-04-15 06:17:11 -04:00
**X-Grafana-Org-Id** is an optional property that specifies the organization to which the action is applied. If not set, the created key belongs to the current context org. Use this header in all requests except those regarding admin.
2023-10-31 09:29:08 -04:00
**Example Request**:
```http
GET /api/org/ HTTP/1.1
Accept: application/json
Content-Type: application/json
X-Grafana-Org-Id: 2
Authorization: Bearer eyJrIjoiT0tTcG1pUlY2RnVKZTFVaDFsNFZXdE9ZWmNrMkZYbk
```