Documentation 40
Mock Grafana API quickstart · 4 min read
The incident, on dashboards. Compatible with the Grafana HTTP API.
A dashboard per service, a panel per metric series, one Prometheus data source that is the Prometheus host, and one alert rule per monitor whose state changes are annotations at the instants the incident opened and closed. The same incident PagerDuty, Sentry and Prometheus serve.
Coverage, hosts and pinned snapshots for Grafana — 103 of 181 read surfaces served and verified.
Import it instead
Both files list exactly what this host serves — generated from our own coverage manifest, not from Grafana's published specification — and carry no vendor schema: paths, methods and what each one answers, with the base URL and auth header already set. One folder holds a write, so the read-only refusal is something you can press.
Try it — a real request to grafana.sandboxapis.dev
01 / Base URL + auth
A base-URL swap, nothing else.
Point your client at https://grafana.sandboxapis.dev. Paths are /api/… exactly as on a Grafana server, and the bodies, error shapes and headers follow Grafana OSS 13.2.4. Auth is any service-account token as Authorization: Bearer, any Basic pair, or none. Whatever you send, you are the data set's founding member, an organization Admin and a server admin, so the admin reads answer too.
# mcp-grafana: the only settings that change are the URL and a token (any value)
GRAFANA_URL=https://grafana.sandboxapis.dev GRAFANA_SERVICE_ACCOUNT_TOKEN=any-token mcp-grafanacurl -H "Authorization: Bearer any-token" "https://grafana.sandboxapis.dev/api/search?type=dash-db"from grafana_client import GrafanaApi, TokenAuth
grafana = GrafanaApi.from_url("https://grafana.sandboxapis.dev", credential=TokenAuth("any-token"))
for board in grafana.search.search_dashboards(type_="dash-db"):
print(board["uid"], board["title"], board["folderTitle"])With mcp-grafana the dashboard, data source, Prometheus, alerting, annotation, folder and admin tools all answer from this data set. Using a key? Keys & rate limits The Node snippet on the quickstarts page is a verified quickstart
02 / Where the data ends
The data ends at 00:00 UTC today.
On the live host the data set's last instant is 00:00 UTC today, and that instant is "now": a range like now-6h to now in /api/ds/query or /api/annotations resolves to the six hours before 00:00 UTC, and the alert rules are evaluated there. A client that sends absolute times from its own clock is asking about a period with no samples yet; end the range at 00:00 UTC, or reach back past it.
Outside the incident's window every series is hourly. The data source declares a 1-hour scrape interval, so Grafana's $__rate_interval is at least 4 hours and a rate() on a dashboard is never empty; inside the incident's window the error, latency and CPU series step every 5 minutes.
03 / Dashboards, the data source and the rules
Every panel queries the Prometheus host.
Each team is a folder (uid team-<team>) and each service a dashboard in its team's folder (uid svc-<service>), with one timeseries panel per metric series. The one data source has the uid prometheus, and it is the Prometheus host: the resource API at /api/datasources/uid/prometheus/resources/api/v1/…, the proxy at /api/datasources/proxy/uid/prometheus/api/v1/… and POST /api/ds/query all answer the same series with the same values, errors included.
# The dashboards, then one of them
curl -H "Authorization: Bearer any-token" "https://grafana.sandboxapis.dev/api/search?type=dash-db"
curl -H "Authorization: Bearer any-token" "https://grafana.sandboxapis.dev/api/dashboards/uid/svc-<service>"
# A panel's query, as data frames, over the data set's last six hours
curl -X POST -H "Authorization: Bearer any-token" -H "Content-Type: application/json" "https://grafana.sandboxapis.dev/api/ds/query" \
-d '{"queries":[{"refId":"A","datasource":{"uid":"prometheus"},"expr":"service:http_request_errors:ratio"}],"from":"now-6h","to":"now"}'
# The alert rules, one per monitor, and when each changed state
curl -H "Authorization: Bearer any-token" "https://grafana.sandboxapis.dev/api/prometheus/grafana/api/v1/rules"
curl -H "Authorization: Bearer any-token" "https://grafana.sandboxapis.dev/api/annotations?type=alert&limit=100"Every alert rule watches one series and links to the panel that charts it (__dashboardUid__ and __panelId__). The provisioning API, the ruler API, the YAML export and the Prometheus-compatible status API all list the same rules; /api/v1/rules/history?ruleUID=… and /api/annotations carry every state change, Pending, Alerting and back to Normal, at the times the canon records, and the incident itself is a region on its service's dashboard from open to resolve.
04 / People and administration
The members are the users, the teams are the teams.
/api/org/users, /api/users and /api/teams/search list the data set's members and teams; organization roles come from each member's membership role. The organization's one group token is the token of its one service account, served as metadata (name, creation, expiry), never as a key. /api/admin/stats counts what this Grafana holds: a dashboard per service, a rule per monitor, one data source.
05 / What is not served
Empty where Grafana has nothing, refused where OSS refuses.
This host is Grafana OSS, so the Enterprise APIs (role-based access control, reporting, licensing, SAML, recording rules, team sync) answer the same 404 an OSS server gives. LDAP and quotas are off, and say so the way OSS does. There are no public dashboards, snapshots, playlists, library elements, silences, contact points, mute timings or templates, so those lists are empty; paging runs through PagerDuty's escalation policies, not Grafana's alertmanager. There is no Loki data source and no Grafana IRM plugin, so there are no logs, incidents or OnCall here: the incident lives on pd. and sentry.. The app-platform APIs under /apis answer 404, which sends mcp-grafana to the /api paths. The server's configuration, its signing keys and the built-in home dashboard are not served. Every write answers a 403 saying this universe is read-only.
Live host only: no pinned snapshot exists for this provider yet, so the data rolls with the live universe. Coverage manifest · Versioning & pinning