openapi: 3.0.3
info:
title: Grafana HTTP Access Post API
description: The Grafana HTTP API provides programmatic access to Grafana's core functionality including dashboards, data sources, alerts, users, organizations, folders, annotations, and teams. Authentication is handled via API keys, basic auth, or OAuth tokens passed in the Authorization header.
version: 11.0.0
contact:
name: Grafana Labs
url: https://grafana.com
license:
name: AGPL-3.0
url: https://www.gnu.org/licenses/agpl-3.0.html
servers:
- url: https://{instance}.grafana.net/api
description: Grafana Cloud
variables:
instance:
default: your-instance
- url: http://localhost:3000/api
description: Local Grafana instance
security:
- BearerAuth: []
- BasicAuth: []
- ApiKeyAuth: []
tags:
- name: Post
paths:
/datasources/proxy/uid/{uid}/{datasource_proxy_route}:
parameters: []
post:
tags:
- Post
summary: Grafana Datasource Proxy POST By UID Calls
description: This API operation enables POST requests to be proxied through Grafana to a configured datasource identified by its unique identifier (UID). The endpoint acts as an intermediary, forwarding requests from the Grafana UI to the target datasource using the specified proxy route path. This allows Grafana to securely communicate with various datasources without exposing their direct endpoints to clients, while maintaining authentication and authorization controls. The datasource_proxy_route parameter provides flexibility to target specific endpoints or paths within the datasource's API, making it particularly useful for executing queries, sending data, or performing operations that require POST method semantics through Grafana's unified interface.
operationId: datasourceProxyPOSTByUIDcalls
parameters:
- name: datasource_proxy_route
in: path
description: ''
required: true
schema:
type: string
- name: uid
in: path
description: ''
required: true
schema:
type: string
requestBody:
description: ''
content:
text/plain:
schema:
contentMediaType: text/plain
required: true
responses:
'201':
description: (empty)
headers: {}
content: {}
'202':
description: (empty)
headers: {}
content: {}
'400':
description: BadRequestError is returned when the request is invalid and it cannot be processed.
headers: {}
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponseBody'
'401':
description: UnauthorizedError is returned when the request is not authenticated.
headers: {}
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponseBody'
'403':
description: ForbiddenError is returned if the user/token has insufficient permissions to access the requested resource.
headers: {}
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponseBody'
'404':
description: NotFoundError is returned when the requested resource was not found.
headers: {}
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponseBody'
'500':
description: InternalServerError is a general error indicating something went wrong internally.
headers: {}
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponseBody'
deprecated: false
x-api-evangelist-processing:
SplitPascalCaseOperationSummaries: true
CaselCaseOperationIds: true
WriteDescription: true
ChooseTags: true
/datasources/proxy/{id}/{datasource_proxy_route}:
parameters: []
post:
tags:
- Post
summary: Grafana Datasource Proxy POST Calls
description: The Grafana datasource proxy POST operation allows users to send POST requests to a configured datasource through Grafana's proxy endpoint by specifying the datasource ID and the target route. This API call acts as an intermediary that forwards HTTP POST requests to the underlying datasource while handling authentication, connection management, and security concerns on behalf of the client. The endpoint accepts a datasource identifier in the path along with a dynamic route parameter that determines the specific datasource endpoint to be invoked, enabling users to interact with various datasource APIs such as querying data, executing commands, or performing write operations without directly exposing datasource credentials or connection details to the frontend application.
operationId: datasourceProxyPOSTcalls
parameters:
- name: datasource_proxy_route
in: path
description: ''
required: true
schema:
type: string
- name: id
in: path
description: ''
required: true
schema:
type: string
requestBody:
description: ''
content:
text/plain:
schema:
contentMediaType: text/plain
required: true
responses:
'201':
description: (empty)
headers: {}
content: {}
'202':
description: (empty)
headers: {}
content: {}
'400':
description: BadRequestError is returned when the request is invalid and it cannot be processed.
headers: {}
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponseBody'
'401':
description: UnauthorizedError is returned when the request is not authenticated.
headers: {}
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponseBody'
'403':
description: ForbiddenError is returned if the user/token has insufficient permissions to access the requested resource.
headers: {}
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponseBody'
'404':
description: NotFoundError is returned when the requested resource was not found.
headers: {}
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponseBody'
'500':
description: InternalServerError is a general error indicating something went wrong internally.
headers: {}
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponseBody'
deprecated: true
x-api-evangelist-processing:
SplitPascalCaseOperationSummaries: true
CaselCaseOperationIds: true
WriteDescription: true
ChooseTags: true
/annotations:
parameters: []
post:
tags:
- Post
summary: Grafana Post Annotation
description: Creates a new annotation in Grafana, which is a way to mark points in time on graphs with rich metadata. Annotations can be associated with specific dashboards, panels, or tags, and are commonly used to mark events like deployments, incidents, or system changes that help correlate metrics with real-world events. The request requires authentication and accepts parameters such as time range, text description, tags, and optional dashboard or panel IDs to specify where the annotation should appear. This operation is frequently used in CI/CD pipelines and monitoring systems to automatically mark when changes occur in the infrastructure.
operationId: postAnnotation
parameters: []
requestBody:
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/PostAnnotationsCmd'
required: true
responses:
'200':
description: (empty)
headers: {}
content:
application/json:
schema:
$ref: '#/components/schemas/postAnnotationResponse'
'400':
description: BadRequestError is returned when the request is invalid and it cannot be processed.
headers: {}
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponseBody'
'401':
description: UnauthorizedError is returned when the request is not authenticated.
headers: {}
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponseBody'
'403':
description: ForbiddenError is returned if the user/token has insufficient permissions to access the requested resource.
headers: {}
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponseBody'
'500':
description: InternalServerError is a general error indicating something went wrong internally.
headers: {}
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponseBody'
deprecated: false
x-api-evangelist-processing:
SplitPascalCaseOperationSummaries: true
CaselCaseOperationIds: true
WriteDescription: true
ChooseTags: true
/annotations/graphite:
parameters: []
post:
tags:
- Post
summary: Grafana Post Graphite Annotation
description: Creates a new Graphite-style annotation in Grafana by submitting annotation data through a POST request to the /annotations/graphite endpoint. This operation allows users to mark specific points in time on their graphs with contextual information, which is particularly useful for correlating system events, deployments, or incidents with metric changes. The annotation typically includes details such as timestamp, tags, and descriptive text that will be displayed on Grafana dashboards when hovering over or viewing the marked timepoint.
operationId: postGraphiteAnnotation
parameters: []
requestBody:
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/PostGraphiteAnnotationsCmd'
required: true
responses:
'200':
description: (empty)
headers: {}
content:
application/json:
schema:
$ref: '#/components/schemas/postAnnotationResponse'
'400':
description: BadRequestError is returned when the request is invalid and it cannot be processed.
headers: {}
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponseBody'
'401':
description: UnauthorizedError is returned when the request is not authenticated.
headers: {}
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponseBody'
'403':
description: ForbiddenError is returned if the user/token has insufficient permissions to access the requested resource.
headers: {}
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponseBody'
'500':
description: InternalServerError is a general error indicating something went wrong internally.
headers: {}
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponseBody'
deprecated: false
x-api-evangelist-processing:
SplitPascalCaseOperationSummaries: true
CaselCaseOperationIds: true
WriteDescription: true
ChooseTags: true
/licensing/token:
parameters: []
post:
tags:
- Post
summary: Grafana Post License Token
description: This API operation allows administrators to activate or update a Grafana Enterprise license by submitting a license token via a POST request to the /licensing/token endpoint. When called, it accepts a license token string in the request body, validates the token with Grafana's licensing service, and applies the license to the Grafana instance if valid. This operation is typically used during initial Enterprise setup or when renewing an existing license, and it requires administrative privileges to execute. Upon successful validation, the license details are stored and the Enterprise features associated with that license tier become available to the Grafana instance.
operationId: postLicenseToken
parameters: []
requestBody:
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/DeleteTokenCommand'
required: true
responses:
'200':
description: (empty)
headers: {}
content:
application/json:
schema:
$ref: '#/components/schemas/Token'
'400':
description: BadRequestError is returned when the request is invalid and it cannot be processed.
headers: {}
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponseBody'
deprecated: false
x-api-evangelist-processing:
SplitPascalCaseOperationSummaries: true
CaselCaseOperationIds: true
WriteDescription: true
ChooseTags: true
/licensing/token/renew:
parameters: []
post:
tags:
- Post
summary: Grafana Post Renew License Token
description: This API operation is used to renew an existing Grafana Enterprise license token. When invoked via a POST request to the /licensing/token/renew endpoint, it initiates the license token renewal process, typically validating the current token and requesting a fresh token from the Grafana licensing server. This operation is essential for maintaining continuous access to Grafana Enterprise features by ensuring the license remains valid and up-to-date. Authentication and appropriate permissions are required to execute this operation, and upon successful renewal, the system receives an updated token that extends the licensing period for the Grafana Enterprise instance.
operationId: postRenewLicenseToken
parameters: []
requestBody:
description: ''
content:
text/plain:
schema:
type: object
contentMediaType: text/plain
required: true
responses:
'200':
description: (empty)
headers: {}
content: {}
'401':
description: UnauthorizedError is returned when the request is not authenticated.
headers: {}
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponseBody'
'404':
description: NotFoundError is returned when the requested resource was not found.
headers: {}
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponseBody'
deprecated: false
x-api-evangelist-processing:
SplitPascalCaseOperationSummaries: true
CaselCaseOperationIds: true
WriteDescription: true
ChooseTags: true
/admin/ldap/sync/{user_id}:
parameters: []
post:
tags:
- Post
summary: Grafana Post Sync User With LDAP
description: This API operation triggers a synchronization between a specific Grafana user and LDAP directory services by sending a POST request to the endpoint with the target user's ID. When invoked, it forces Grafana to retrieve the latest user information, groups, and permissions from the configured LDAP server for the specified user, updating their local Grafana profile accordingly. This is particularly useful when LDAP user attributes or group memberships have changed and you need to immediately reflect those changes in Grafana without waiting for the automatic synchronization cycle. The operation requires admin privileges to execute and helps maintain consistency between the LDAP source of truth and Grafana's user database.
operationId: postSyncUserWithLDAP
parameters:
- name: user_id
in: path
description: ''
required: true
schema:
type: integer
contentEncoding: int64
responses:
'200':
description: An OKResponse is returned if the request was successful.
headers: {}
content:
application/json:
schema:
$ref: '#/components/schemas/SuccessResponseBody'
'401':
description: UnauthorizedError is returned when the request is not authenticated.
headers: {}
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponseBody'
'403':
description: ForbiddenError is returned if the user/token has insufficient permissions to access the requested resource.
headers: {}
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponseBody'
'500':
description: InternalServerError is a general error indicating something went wrong internally.
headers: {}
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponseBody'
deprecated: false
security:
- basic: []
x-api-evangelist-processing:
SplitPascalCaseOperationSummaries: true
CaselCaseOperationIds: true
WriteDescription: true
ChooseTags: true
/convert/api/prom/rules:
parameters: []
post:
tags:
- Post
summary: Grafana Route Convert Prometheus Cortex Post Rule Groups
description: This API operation converts Prometheus or Cortex rule group configurations into Grafana's native format by accepting a POST request to the /convert/api/prom/rules endpoint. It enables users to migrate their existing Prometheus-style alerting and recording rules from Prometheus or Cortex deployments into Grafana, facilitating the transition between monitoring systems while preserving rule logic and structure. The endpoint processes the submitted rule groups and transforms them into a format compatible with Grafana's alerting engine, streamlining the configuration migration process and reducing manual conversion efforts.
operationId: routeConvertPrometheusCortexPostRuleGroups
parameters:
- name: Content-Type
in: header
description: ''
required: true
schema:
const: application/json
type: string
responses:
'202':
description: ConvertPrometheusResponse
headers: {}
content:
application/json:
schema:
$ref: '#/components/schemas/ConvertPrometheusResponse'
'403':
description: ForbiddenError
headers: {}
content:
application/json:
schema:
$ref: '#/components/schemas/ForbiddenError'
deprecated: false
x-api-evangelist-processing:
SplitPascalCaseOperationSummaries: true
CaselCaseOperationIds: true
WriteDescription: true
ChooseTags: true
/convert/api/prom/rules/{NamespaceTitle}:
parameters: []
post:
tags:
- Post
summary: Grafana Route Convert Prometheus Cortex Post Rule Group
description: The Grafana API operation POST /convert/api/prom/rules/{NamespaceTitle} converts and creates a Prometheus or Cortex rule group within a specified namespace. This endpoint accepts Prometheus-style rule definitions and transforms them into Grafana's native alert rule format, allowing users to migrate their existing Prometheus alerting and recording rules into Grafana's unified alerting system. The {NamespaceTitle} parameter identifies the target namespace where the converted rule group will be stored, enabling organized management of alert rules across different teams or services within Grafana.
operationId: routeConvertPrometheusCortexPostRuleGroup
parameters:
- name: NamespaceTitle
in: path
description: ''
required: true
schema:
type: string
- name: x-grafana-alerting-datasource-uid
in: header
description: ''
schema:
type: string
- name: x-grafana-alerting-recording-rules-paused
in: header
description: ''
schema:
type: boolean
- name: x-grafana-alerting-alert-rules-paused
in: header
description: ''
schema:
type: boolean
- name: x-grafana-alerting-target-datasource-uid
in: header
description: ''
schema:
type: string
- name: x-grafana-alerting-folder-uid
in: header
description: ''
schema:
type: string
- name: x-grafana-alerting-notification-settings
in: header
description: ''
schema:
type: string
requestBody:
description: ''
content:
application/yaml:
schema:
$ref: '#/components/schemas/PrometheusRuleGroup'
required: false
responses:
'202':
description: ConvertPrometheusResponse
headers: {}
content:
application/json:
schema:
$ref: '#/components/schemas/ConvertPrometheusResponse'
'403':
description: ForbiddenError
headers: {}
content:
application/json:
schema:
$ref: '#/components/schemas/ForbiddenError'
deprecated: false
x-api-evangelist-processing:
SplitPascalCaseOperationSummaries: true
CaselCaseOperationIds: true
WriteDescription: true
ChooseTags: true
/convert/prometheus/config/v1/rules:
parameters: []
post:
tags:
- Post
summary: Grafana Route Convert Prometheus Post Rule Groups
description: This API operation converts Prometheus rule group configurations to Grafana's format via a POST request to the /convert/prometheus/config/v1/rules endpoint. It accepts Prometheus-formatted rule groups as input and transforms them into a compatible format that can be used within Grafana's alerting and recording rule system, facilitating migration or integration between Prometheus and Grafana monitoring setups.
operationId: routeConvertPrometheusPostRuleGroups
parameters:
- name: Content-Type
in: header
description: ''
required: true
schema:
const: application/json
type: string
responses:
'202':
description: ConvertPrometheusResponse
headers: {}
content:
application/json:
schema:
$ref: '#/components/schemas/ConvertPrometheusResponse'
'403':
description: ForbiddenError
headers: {}
content:
application/json:
schema:
$ref: '#/components/schemas/ForbiddenError'
deprecated: false
x-api-evangelist-processing:
SplitPascalCaseOperationSummaries: true
CaselCaseOperationIds: true
WriteDescription: true
ChooseTags: true
/convert/prometheus/config/v1/rules/{NamespaceTitle}:
parameters: []
post:
tags:
- Post
summary: Grafana Route Convert Prometheus Post Rule Group
description: This API operation converts Prometheus rule group configurations to Grafana's native format by accepting a POST request to the endpoint /convert/prometheus/config/v1/rules/{NamespaceTitle}, where {NamespaceTitle} represents the target namespace for the rule group. It takes Prometheus-formatted alerting and recording rules as input and transforms them into Grafana-compatible rule configurations, facilitating migration or integration between Prometheus and Grafana alerting systems. The operation allows users to seamlessly transfer their existing Prometheus rule definitions into Grafana without manual reconfiguration, preserving the rule logic, labels, annotations, and evaluation intervals while adapting them to Grafana's rule management structure.
operationId: routeConvertPrometheusPostRuleGroup
parameters:
- name: NamespaceTitle
in: path
description: ''
required: true
schema:
type: string
- name: x-grafana-alerting-datasource-uid
in: header
description: ''
schema:
type: string
- name: x-grafana-alerting-recording-rules-paused
in: header
description: ''
schema:
type: boolean
- name: x-grafana-alerting-alert-rules-paused
in: header
description: ''
schema:
type: boolean
- name: x-grafana-alerting-target-datasource-uid
in: header
description: ''
schema:
type: string
- name: x-grafana-alerting-folder-uid
in: header
description: ''
schema:
type: string
- name: x-grafana-alerting-notification-settings
in: header
description: ''
schema:
type: string
requestBody:
description: ''
content:
application/yaml:
schema:
$ref: '#/components/schemas/PrometheusRuleGroup'
required: false
responses:
'202':
description: ConvertPrometheusResponse
headers: {}
content:
application/json:
schema:
$ref: '#/components/schemas/ConvertPrometheusResponse'
'403':
description: ForbiddenError
headers: {}
content:
application/json:
schema:
$ref: '#/components/schemas/ForbiddenError'
deprecated: false
x-api-evangelist-processing:
SplitPascalCaseOperationSummaries: true
CaselCaseOperationIds: true
WriteDescription: true
ChooseTags: true
/dashboards/db:
parameters: []
post:
tags:
- Post
summary: Grafana Post Dashboard
description: Creates or updates a Grafana dashboard in the database. This endpoint accepts a dashboard JSON model along with optional metadata such as folder ID, message for the version history, and overwrite settings. The dashboard must include a unique identifier (UID) and will be saved to the specified folder or the General folder if none is provided. If a dashboard with the same UID exists, it can be overwritten by setting the overwrite flag to true. The operation returns the saved dashboard's ID, UID, URL, version number, and status indicating whether it was created or updated. This is the primary method for programmatically managing dashboard definitions in Grafana.
operationId: postDashboard
parameters: []
requestBody:
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/SaveDashboardCommand'
required: true
responses:
'200':
description: (empty)
headers: {}
content:
application/json:
schema:
$ref: '#/components/schemas/postDashboardResponse'
'400':
description: BadRequestError is returned when the request is invalid and it cannot be processed.
headers: {}
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponseBody'
'401':
description: UnauthorizedError is returned when the request is not authenticated.
headers: {}
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponseBody'
'403':
description: ForbiddenError is returned if the user/token has insufficient permissions to access the requested resource.
headers: {}
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponseBody'
'404':
description: NotFoundError is returned when the requested resource was not found.
headers: {}
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponseBody'
'412':
description: PreconditionFailedError
headers: {}
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponseBody'
'422':
description: UnprocessableEntityError
headers: {}
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponseBody'
'500':
description: InternalServerError is a general error indicating something went wrong internally.
headers: {}
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponseBody'
deprecated: false
x-api-evangelist-processing:
SplitPascalCaseOperationSummaries: true
CaselCaseOperationIds: true
WriteDescription: true
ChooseTags: true
/saml/acs:
parameters: []
post:
tags:
- Post
summary: Grafana Post ACS
description: The Grafana SAML ACS (Assertion Consumer Service) POST endpoint receives and processes SAML authentication responses from identity providers after a user attempts to log in. When a user authenticates with an external IdP, the IdP sends a signed SAML assertion to this endpoint containing user identity information and authentication status. Grafana validates the SAML response signature, extracts user attributes like email, username, and roles, then creates or updates the user session accordingly. This endpoint is a critical component of SAML-based single sign-on integration, enabling Grafana to trust authentication performed by external identity management systems and grant appropriate access to authenticated users based on their SAML attributes and role mappings.
operationId: postACS
parameters:
- name: RelayState
in: query
description: ''
style: form
explode: true
schema:
type: string
responses:
'302':
description: (empty)
headers: {}
content: {}
'403':
description: ForbiddenError is returned if the user/token has insufficient permissions to access the requested resource.
headers: {}
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponseBody'
'500':
description: InternalServerError is a general error indicating something went wrong internally.
headers: {}
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponseBody'
deprecated: false
x-api-evangelist-processing:
SplitPascalCaseOperationSummaries: true
CaselCaseOperationIds: true
WriteDescription: true
ChooseTags: true
/saml/slo:
parameters: []
post:
tags:
- Post
summary: Grafana Post SLO
description: The Grafana SAML Single Logout (SLO) POST endpoint processes logout requests in SAML-based authentication workflows, allowing users to securely terminate their sessions across all connected service providers. When invoked, this endpoint receives SAML logout request or response messages, validates the SAML assertions, and performs the necessary cleanup to end the
# --- truncated at 32 KB (59 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/grafana/refs/heads/main/openapi/grafana-post-api-openapi.yml