2022-05-26 23:06:25 +08:00
---
aliases:
2022-12-10 00:36:04 +08:00
- ../http_api/
- ../overview/
2023-02-07 01:14:36 +08:00
canonical: /docs/grafana/latest/developers/http_api/
2022-05-26 23:06:25 +08: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 16:10:12 +08:00
labels:
products:
- enterprise
- oss
2022-05-26 23:06:25 +08:00
title: HTTP API
weight: 100
---
2016-11-28 00:09:47 +08:00
2021-10-29 01:26:23 +08:00
# HTTP API reference
2016-11-28 00:09:47 +08:00
2024-10-24 22:42:04 +08:00
The Grafana backend exposes an HTTP API, which is the same API that's used by the frontend to do everything from saving
2021-10-29 01:26:23 +08:00
dashboards, creating users, and updating data sources.
2016-11-28 00:09:47 +08:00
2024-10-24 22:42:04 +08:00
HTTP API details are [specified ](https://editor.swagger.io/?url=https://raw.githubusercontent.com/grafana/grafana/main/public/api-merged.json ) using OpenAPI v2.
2023-03-01 22:36:37 +08:00
2024-10-24 22:42:04 +08:00
There is also an [OpenAPI v3 specification ](https://editor.swagger.io/?url=https://raw.githubusercontent.com/grafana/grafana/main/public/openapi3.json ) (generated by the v2 one).
2023-03-01 22:36:37 +08:00
2024-09-06 14:17:20 +08:00
Users can browser and try out both via the Swagger UI editor (served by the Grafana server) by navigating to `/swagger-ui` .
2023-03-01 22:36:37 +08:00
2024-09-06 14:17:20 +08:00
## Authenticate API requests
2023-10-31 21:29:08 +08:00
2024-09-06 14:17:20 +08:00
{{< docs / shared lookup = "developers/authentication.md" source = "grafana" version = "<GRAFANA_VERSION>" > }}
2023-10-31 21:29:08 +08:00
## X-Grafana-Org-Id Header
**X-Grafana-Org-Id** is an optional property that specifies the organization to which the action is applied. If it is not set, the created key belongs to the current context org. Use this header in all requests except those regarding admin.
**Example Request**:
```http
GET /api/org/ HTTP/1.1
Accept: application/json
Content-Type: application/json
X-Grafana-Org-Id: 2
Authorization: Bearer eyJrIjoiT0tTcG1pUlY2RnVKZTFVaDFsNFZXdE9ZWmNrMkZYbk
```
2021-05-20 18:38:05 +08:00
## HTTP APIs
2020-10-03 02:02:11 +08:00
2025-03-06 20:59:08 +08:00
- [Admin API ](admin/ )
2022-10-13 21:09:49 +08:00
- [Alerting API (unstable) ](https://editor.swagger.io/?url=https://raw.githubusercontent.com/grafana/grafana/main/pkg/services/ngalert/api/tooling/post.json )
2025-03-06 20:59:08 +08:00
- [Alerting provisioning API ](alerting_provisioning/ )
- [Annotations API ](annotations/ )
- [Correlations API ](correlations/ )
- [Dashboard API ](dashboard/ )
- [Dashboard permissions API ](dashboard_permissions/ )
- [Dashboard versions API ](dashboard_versions/ )
- [Data source API ](data_source/ )
- [Folder API ](folder/ )
- [Folder permissions API ](folder_permissions/ )
- [Folder/Dashboard search API ](folder_dashboard_search/ )
- [Library element API ](library_element/ )
- [Organization API ](org/ )
- [Other API ](other/ )
- [Playlists API ](playlist/ )
- [Preferences API ](preferences/ )
- [Shared dashboards API ](dashboard_public/ )
- [Query history API ](query_history/ )
- [Service account API ](serviceaccount/ )
- [Short URL API ](short_url/ )
- [Snapshot API ](snapshot/ )
- [SSO settings API ](sso-settings/ )
- [Team API ](team/ )
- [User API ](user/ )
2020-01-27 20:41:15 +08:00
2022-06-10 22:25:15 +08:00
## Deprecated HTTP APIs
2025-03-06 20:59:08 +08:00
- [Authentication API ](auth/ )
2022-06-10 22:25:15 +08:00
2021-05-20 18:38:05 +08:00
## Grafana Enterprise HTTP APIs
2024-09-06 14:17:20 +08:00
Grafana Enterprise includes all of the Grafana OSS APIs as well as the following APIs:
2020-01-27 20:41:15 +08:00
2025-03-06 20:59:08 +08:00
- [Data source permissions API ](datasource_permissions/ )
- [Group attribute sync API ](group_attribute_sync/ )
- [License API ](licensing/ )
- [Query and resource caching API ](query_and_resource_caching/ )
- [Reporting API ](reporting/ )
- [Role-based access control API ](access_control/ )
- [Team sync API ](team_sync/ )