API Reference

Metrics Endpoint

Time-series metric queries — shape your own dashboards in Grafana, Looker, or Excel.

GET /api/v1/servers/:id/metrics/timeseries

Pull a time-series for any metric in the catalog. Scope: read:metrics.

Required params: metric=tps_commit|tps_rollback|active_backends|cache_hit_ratio|replication_lag|total_db_size and many more — full list is at /api/v1/servers/:id/metrics/catalog. Plus from + to in ISO-8601, a bucket (one of 30s|1m|5m|1h|1d), and an aggregation (default avg; also min, max, p95, p99, sum).

{
  "server_id": 4,
  "metric": "tps_commit",
  "bucket": "1m",
  "from": "2026-04-24T18:00:00Z",
  "to":   "2026-04-24T19:00:00Z",
  "points": [
    { "t": "2026-04-24T18:00:00Z", "v": 1243.5 },
    { "t": "2026-04-24T18:01:00Z", "v": 1187.2 },
    ...
  ]
}

GET /api/v1/servers/:id/metrics/catalog

List metrics available for this server. Catalog varies by extension state — track_io_timing being off, for example, removes the I/O latency metrics from the list. Scope: read:metrics.

GET /api/v1/servers/:id/queries

Top queries by total_time over a window. Same pagination, filtering, and sorting as the UI. Params: range=1h|24h|7d, database=<name>, search=<text>, sort=total_time|mean_time|calls|shared_blks_read. Scope: read:metrics.

Bulk export

For full daily or weekly exports — anything that paginates uncomfortably through the API — use Settings → Reports → CSV export → Scheduled. Delivered to S3, GCS, or as an email attachment. Don't try to scrape /metrics in a loop for export; you'll hit rate limits and the CSV path is what we tuned for that volume.