Grafana REST API
Query, visualize, and alert on metrics and logs
Grafana is an open-source analytics and interactive visualization platform. Developers use the Grafana REST API to programmatically manage dashboards, data sources, alerts, and organizations, enabling automated monitoring infrastructure deployment and configuration as code workflows.
https://your-grafana-instance.com/api
API Endpoints
| Method | Endpoint | Description |
|---|---|---|
| GET | /dashboards/uid/:uid | Retrieves a dashboard by its unique identifier. Returns dashboard JSON model including panels and templating configuration. |
| POST | /dashboards/db | Create or update a dashboard in the database |
| DELETE | /dashboards/uid/:uid | Deletes a dashboard by UID. Requires the dashboard's unique identifier in the path and returns deletion confirmation. |
| GET | /datasources | Retrieves all configured data sources. Returns array of datasource objects including type, URL, and access settings. |
| POST | /datasources | Creates a new data source. Requires name, type, and connection details in the request body; returns the datasource ID. |
| PUT | /datasources/:id | Update an existing data source by ID |
| DELETE | /datasources/:id | Deletes a data source by ID. Requires the numeric datasource identifier in the path and returns confirmation message. |
| GET | /alerts | Retrieves all alerts configured in the organization. Returns array of alert rules with state, conditions, and notification settings. |
| GET | /alert-notifications | Retrieves all notification channels. Returns array of configured channels including type, settings, and enabled state. |
| POST | /alert-notifications | Create a new alert notification channel |
| GET | /org/users | Retrieves users in the current organization. Returns array of users with email, role, and last seen timestamp. |
| POST | /org/users | Adds a user to the current organization. Requires loginOrEmail and role in the request body; returns the user ID. |
| GET | /folders | Retrieves all folders in the organization. Returns array of folder objects with title, UID, and permission metadata. |
| POST | /folders | Creates a new folder. Requires title in the request body; optionally accepts UID and returns the created folder object. |
| GET | /search | Searches for dashboards and folders. Accepts query, tag, and type parameters; returns matching items with metadata. |
Sponsor this page
AvailableReach developers actively building with Grafana. See live pageview data and self-serve checkout — your slot goes live in minutes.
View inventory & pricing →Code Examples
curl -X GET 'https://your-grafana-instance.com/api/dashboards/uid/cIBgcSjkk' \
-H 'Authorization: Bearer glsa_HOruNAb7SOiCdshU9algkdIloRHXeGFi7'
Use Grafana from Claude / Cursor / ChatGPT
Get a hosted MCP endpoint for Grafana. Paste your Grafana API key, copy back one URL, drop it into Claude Desktop, Cursor, or any AI client that supports remote MCP. Your AI calls Grafana directly with your credentials — no local install, works on mobile.
create_grafana_dashboard
Create or update a Grafana dashboard with panels, queries, and visualizations based on natural language requirements
query_grafana_metrics
Query metrics from configured data sources and return time-series data for analysis
manage_alert_rules
Create, update, or delete alert rules with conditions and notification channels
configure_data_source
Add or update data source configurations for Prometheus, Elasticsearch, or other supported backends
search_dashboards
Search for dashboards by name, tag, or folder and retrieve their configuration
Connect in 60 seconds
Paste your Grafana key → get an MCP URL → paste into Claude/Cursor. Hosted by IOX, encrypted at rest.
Connect Grafana to your AI →