The Metrics API provides Prometheus-compatible endpoints for querying your app’s metrics. Use it to build custom monitoring, integrate with external tools, or power your own dashboards.

Authentication

All requests require a Miget API token in the Authorization header:
Generate an API token in Settings → API Tokens in your Miget dashboard.

Endpoints

The API is hosted at https://metrics.miget.com and supports standard Prometheus query endpoints.

Instant Query

Range Query

Label Discovery

Logs API

Query logs via a Loki-compatible endpoint.

Workspace Selection

By default, the API returns data for your default workspace. To query a different workspace, add the X-Workspace-Id header:

Grafana Integration

You can point an external Grafana instance at the Metrics API:
  1. Add a Prometheus datasource with URL: https://metrics.miget.com/prometheus
  2. Under Custom HTTP Headers, add:
    • Header: Authorization, Value: Bearer miget_live_your_token
  3. Click Save & Test
For logs, add a Loki datasource with URL: https://metrics.miget.com (no /loki suffix - Grafana adds it automatically).

Rate Limits

The API is subject to fair-use rate limits. If you receive HTTP 429 responses, reduce your query frequency. Typical usage patterns (dashboard refresh every 30s, alerting every 60s) are well within limits.

Example Queries