API Reference

API Overview

REST API for programmatic access to MonPG data. All endpoints require an API key.

The MonPG API is what every screen in the UI reads from, exposed for direct use. The patterns below are constant across endpoints; each endpoint page lists the surface specifics.

Base URL

Production is https://api.monpg.app/api/v1. Preprod (for testing integrations before they touch real data) is https://api-preprod.monpg.app/api/v1. Same auth, same shape, separate org space.

Authentication

Every request needs Authorization: Bearer <api-key>. Generate keys under Settings → API Keys. The full auth model lives in API authentication — including the scope reference and rotation playbook.

Response format

Successful responses are JSON. Errors use HTTP status codes plus a structured body:

{
  "error": "human-readable message",
  "code": "machine-readable code",
  "request_id": "abc123"
}

Always include request_id in support requests — it's how we trace what your call did on our side.

Versioning

The version sits in the URL (/api/v1/). Breaking changes will mean /v2; new fields and new endpoints get added to v1 without a bump. We don't promise no fields will ever be added — if your client breaks on unknown fields, that's a client bug.

Rate limits

Per-API-key, depending on plan: Free 60 requests per minute, Pro 600/min, Business 3,000/min, Enterprise custom. Every response carries X-RateLimit-Limit, X-RateLimit-Remaining, and X-RateLimit-Reset so you can back off proactively. The most common reason customers hit limits is a misconfigured Grafana datasource polling at high frequency — that's a Grafana cache setting, not an API limit problem.

Pagination

List endpoints take ?page=1&limit=50. Default 25, max 100. The response carries the page metadata so you don't have to track it yourself:

{
  "data": [...],
  "meta": { "page": 1, "limit": 50, "total": 312, "pages": 7 }
}

Endpoint index