Open-Source Wikis

/

Grafana

/

API

/

REST endpoints

grafana/grafana

REST endpoints

A high-level inventory of the legacy /api/* endpoints. The canonical reference is the OpenAPI spec at public/api-merged.json; this page maps each group to its handler file so you know where to look for source code.

Read this with the routing table

pkg/api/api.go is the source of truth for which paths exist. This page groups them thematically; in the file they're mostly grouped the same way but the precise ordering can change.

Resources

Path prefix Handlers What it does
/api/dashboards/* pkg/api/dashboard.go Dashboard CRUD, version history, permissions
/api/folders/* pkg/api/folder.go Folder CRUD, permissions
/api/folders/:uid/permissions pkg/api/folder_permission.go Folder ACLs
/api/dashboards/uid/:uid/permissions pkg/api/dashboard_permission.go Dashboard ACLs
/api/dashboards/snapshots, /api/snapshots/* pkg/api/dashboard_snapshot.go Snapshots
/api/dashboards/import pkg/api/dashboard.go (delegates to dashboardimport) Import from JSON
/api/library-elements/* pkg/services/libraryelements/api.go Library panels/elements
/api/datasources/* pkg/api/datasources.go Datasource registry
/api/datasources/uid/:uid/health pkg/api/datasources.go Health check
/api/datasources/proxy/* pkg/api/dataproxy.go Datasource proxy
/api/ds/query pkg/api/ds_query.go Server-side query orchestrator
/api/plugins/* pkg/api/plugins.go Plugin admin, install, settings
/api/plugins/:plugin/resources/* pkg/api/plugin_resource.go Plugin custom resources
/api/playlists/* pkg/api/playlist.go Playlists
/api/preferences/* pkg/api/preferences.go User/team/org preferences
/api/short-urls/* pkg/api/short_url.go Share-link shortener
/api/annotations/* pkg/api/annotations.go Annotations

Identity

Path prefix Handlers What it does
/api/login, /api/login/oauth pkg/api/login.go, pkg/api/login_oauth.go Login flow
/api/user/* pkg/api/user.go Self-user CRUD, password change, sessions
/api/users/* pkg/api/user.go Admin user CRUD
/api/orgs/* pkg/api/org.go Organizations
/api/org/users pkg/api/org_users.go Org membership
/api/org/invites pkg/api/org_invite.go Invites
/api/serviceaccounts/* pkg/services/serviceaccounts/api/ Service accounts + tokens
/api/auth/keys/* (legacy API keys) Legacy API keys
/api/access-control/* pkg/services/accesscontrol/api/ RBAC management
/api/admin/* pkg/api/admin*.go Admin (stats, users, encryption, provisioning)

Alerting

Path prefix Handlers
/api/v1/provisioning/* pkg/services/ngalert/api/
/api/ruler/* same
/api/alertmanager/* same
/api/v1/eval same

See Backend / Alerting.

Path prefix Handlers
/api/live/ws, /api/live/sse pkg/services/live/
/api/live/publish pkg/services/live/pushhttp/
/api/search pkg/api/search.go

Frontend support

Path prefix Handlers What it does
/api/frontend/settings pkg/api/frontendsettings.go Bootstrap settings (config + features)
/api/frontend/logs pkg/api/frontend_logging.go Browser log ingestion
/api/frontend-metrics pkg/api/frontend_metrics.go Browser metrics
/render/* pkg/api/render.go (proxies to renderer) Image render

Health & metrics

  • /api/health{ "database": "ok", ... } from pkg/api/health.go.
  • /metrics — Prometheus-formatted metrics (configured via [metrics]).

Plugin proxy

/api/plugins/<id>/health, /api/plugins/<id>/resources/<path>, and the datasource proxy all funnel through pkg/api/pluginproxy/ which adds upstream auth and applies access control.

See also

Built by Factory AutoWiki from public repository content. It is a generated preview for codebase exploration, not source-maintained documentation.

REST endpoints – Grafana wiki | Factory