
Grafana Cloud Has a Free API: Here's How to Build Dashboards and Query Metrics Programmatically
What is Grafana Cloud? Grafana Cloud is a fully managed observability platform combining Grafana, Prometheus, Loki, and Tempo . You get metrics, logs, traces, and dashboards — all in one place. The free tier includes 10K metrics, 50 GB logs, 50 GB traces — and the HTTP API is completely free to use. Grafana HTTP API Authentication export GRAFANA_URL = "https://your-instance.grafana.net" export GRAFANA_TOKEN = "your-service-account-token" Create a Dashboard curl -X POST " $GRAFANA_URL /api/dashboards/db" \ -H "Authorization: Bearer $GRAFANA_TOKEN " \ -H "Content-Type: application/json" \ -d '{ "dashboard": { "title": "API Performance", "panels": [ { "title": "Request Rate", "type": "timeseries", "gridPos": {"h": 8, "w": 12, "x": 0, "y": 0}, "targets": [{ "expr": "rate(http_requests_total[5m])", "legendFormat": "{{method}} {{status}}" }] } ] }, "overwrite": false }' Query Prometheus Metrics # Instant query curl -G " $GRAFANA_URL /api/datasources/proxy/1/api/v1/query" \ -H "Authorization:
Continue reading on Dev.to Tutorial
Opens in a new tab


