Skip to main content

API Overview

The Grafana HTTP API provides programmatic access to Grafana’s core functionality. The same API is used by the frontend to perform operations like managing dashboards, data sources, users, and organizations.

Base URL

All API requests are made to:
http(s)://<grafana-host>:<port>/api

API Versioning

The current API version is 0.0.1. The API uses the following schemes:
  • Schemes: http, https
  • BasePath: /api
  • Consumes: application/json
  • Produces: application/json

Common Response Codes

The API uses standard HTTP response codes:
CodeDescription
200Success
201Created
400Bad Request - Invalid request data
401Unauthorized - Authentication required
403Forbidden - Insufficient permissions
404Not Found - Resource does not exist
409Conflict - Resource already exists
500Internal Server Error

Response Format

API responses are returned in JSON format:

Success Response

{
  "message": "Success message",
  "id": 1,
  "data": {}
}

Error Response

{
  "message": "Error message",
  "error": "Detailed error information"
}

Rate Limiting

API rate limiting is configured per organization. Contact your Grafana administrator for specific rate limits.

API Resources

The Grafana API provides endpoints for:

Fine-Grained Access Control

If you are running Grafana Enterprise with Fine-grained access control enabled, you need specific permissions for each API endpoint. Refer to the individual endpoint documentation for required permissions.

Build docs developers (and LLMs) love