Skip to content

API Reference

MiniAPM provides a simple HTTP API for ingesting traces, errors, and deploy information.

All ingestion endpoints require API key authentication via the Authorization header:

Terminal window
Authorization: Bearer proj_abc123...

All endpoints are relative to your MiniAPM server URL:

http://localhost:3000
EndpointMethodDescription
/ingest/v1/tracesPOSTIngest OTLP traces
/ingest/errorsPOSTReport a single error
/ingest/errors/batchPOSTReport multiple errors
/ingest/deploysPOSTRecord a deployment
/ingest/requestsPOSTBatch HTTP request metrics
/healthGETHealth check (no auth)
CodeDescription
200Success
401Missing or invalid API key
400Invalid request body
500Server error

MiniAPM accepts traces in OpenTelemetry Protocol (OTLP) format over HTTP. Configure any OpenTelemetry SDK to export to:

OTEL_EXPORTER_OTLP_ENDPOINT=http://localhost:3000/ingest
OTEL_EXPORTER_OTLP_HEADERS=Authorization=Bearer proj_abc123...
Terminal window
curl -X POST http://localhost:3000/ingest/errors \
-H "Authorization: Bearer proj_abc123..." \
-H "Content-Type: application/json" \
-d '{
"error_type": "RuntimeError",
"message": "Something went wrong",
"backtrace": ["app/models/user.rb:42:in `save`"]
}'
Terminal window
curl -X POST http://localhost:3000/ingest/deploys \
-H "Authorization: Bearer proj_abc123..." \
-H "Content-Type: application/json" \
-d '{
"version": "v1.2.3",
"git_sha": "abc123def",
"deployer": "github-actions"
}'
Terminal window
curl http://localhost:3000/health
# Response:
{"status":"ok"}