Skip to content

API Reference

The REST API provided by mroki-api. It manages traffic-testing gates and the requests captured against them, and exposes server configuration and aggregate statistics.

This reference is generated from the multi-file OpenAPI 3.1 spec (docs/api/openapi/), bundled at prebuild time with every external $ref resolved. Use the sidebar to open any single operation on its own page, grouped by tag.

Need the raw spec? Open the fully resolved openapi.json.

Conventions

  • Responses — all successful responses are wrapped in a data envelope.
  • Errors — error responses follow RFC 7807 (Problem Details for HTTP APIs).
  • Authentication — every endpoint except the infrastructure endpoints (/health/*, /metrics) requires a bearer token, supplied as Authorization: Bearer <your-api-key>.

Base URL

EnvironmentURL
Local developmenthttp://localhost:8090

Each operation page has an interactive playground whose server dropdown includes a Custom entry — pick it to point requests at your own instance's base URL. Your mroki-api must allow the docs-site origin via CORS, and you supply your own API key in the playground's authorization field.

Operations by tag

TagDescription
ConfigRead-only, server-wide configuration.
StatsCross-gate aggregate statistics.
GatesTraffic-testing gates with live and shadow URLs.
RequestsRequests captured and compared against a gate.
HealthKubernetes liveness and readiness probes (unauthenticated).
MetricsPrometheus metrics scrape endpoint (unauthenticated).