perf-monitor API
Base URL: http://your-host:8000/api
All endpoints require authentication via API key header: X-API-Key: your-key
Monitors
Section titled “Monitors”List monitors
Section titled “List monitors”GET /api/monitorsResponse:
[ { "id": "monitor-uuid", "name": "Login flow", "tool": "k6", "schedule": "*/15 * * * *", "enabled": true, "thresholds": { "latencyMs": 2000, "errorRatePercent": 5.0, "apdexMin": 0.7 }, "lastRun": "2026-03-29T08:15:00Z", "lastStatus": "pass" }]Create monitor
Section titled “Create monitor”POST /api/monitorsContent-Type: multipart/form-data
name=Login flowschedule=*/15 * * * *tool=k6thresholds[latencyMs]=2000thresholds[errorRatePercent]=5.0parameters[TARGET_HOST]=https://api.example.comscript=@load-test.js (file upload)Or JSON (script content as base64):
{ "name": "Login flow", "schedule": "*/15 * * * *", "tool": "k6", "scriptContent": "base64-encoded-script", "thresholds": { "latencyMs": 2000, "errorRatePercent": 5.0 }, "parameters": { "TARGET_HOST": "https://api.example.com" }}Get monitor
Section titled “Get monitor”GET /api/monitors/{monitorId}Update monitor
Section titled “Update monitor”PATCH /api/monitors/{monitorId}Content-Type: application/json
{ "schedule": "*/5 * * * *", "enabled": false}Delete monitor
Section titled “Delete monitor”DELETE /api/monitors/{monitorId}Trigger manual run
Section titled “Trigger manual run”POST /api/monitors/{monitorId}/runReturns {"runId": "uuid", "status": "queued"} immediately. The run executes asynchronously.
Monitor Runs
Section titled “Monitor Runs”List runs for a monitor
Section titled “List runs for a monitor”GET /api/monitors/{monitorId}/runs?limit=20&offset=0Get run
Section titled “Get run”GET /api/runs/{runId}Response:
{ "id": "run-uuid", "monitorId": "monitor-uuid", "startedAt": "2026-03-29T08:15:00Z", "completedAt": "2026-03-29T08:16:02Z", "status": "pass", "tool": "k6", "metrics": { "p50": 142, "p95": 387, "avg": 158, "errorRate": 0.001, "throughput": 12.4 }, "thresholdBreaches": [], "agentId": "default"}Get run logs
Section titled “Get run logs”GET /api/runs/{runId}/logsReturns raw execution output from the test tool.
Alerts
Section titled “Alerts”List alert history
Section titled “List alert history”GET /api/alerts?monitorId={uuid}&limit=50Acknowledge alert
Section titled “Acknowledge alert”POST /api/alerts/{alertId}/acknowledgeContent-Type: application/json
{ "note": "Investigating — known deployment in progress"}Agents
Section titled “Agents”List agents
Section titled “List agents”GET /api/agentsResponse:
[ { "id": "eu-west-1", "name": "EU West Agent", "status": "online", "lastHeartbeat": "2026-03-29T08:14:55Z", "location": "eu-west-1" }]Get agent metrics
Section titled “Get agent metrics”GET /api/agents/{agentId}/metricsSettings
Section titled “Settings”Get license info
Section titled “Get license info”GET /api/settings/licenseResponse:
{ "tier": "professional", "monitorLimit": 50, "monitorsUsed": 12, "validUntil": "2027-01-15T00:00:00Z"}Update license
Section titled “Update license”POST /api/settings/licenseContent-Type: application/json
{ "licenseKey": "your-new-key"}Error Responses
Section titled “Error Responses”| Status | Meaning |
|---|---|
400 | Invalid request |
401 | Missing or invalid API key |
403 | License limit reached (e.g., monitor count exceeded) |
404 | Monitor or run not found |
409 | Schedule conflict |
429 | Rate limit |
500 | Internal error |