REST API Reference Generated by AI
Alongside the MCP server, MockMotor exposes the same environment/service/reaction/account management as a plain REST API under /console/api/ — JSON over HTTP, no JSON-RPC envelope required, for scripts, CI pipelines, or any HTTP client that doesn't speak MCP. Every endpoint here calls the exact same server-side logic as its MCP tool counterpart (the same *Handler classes), so the two stay behaviourally identical — only the transport differs.
This page pulls its field-level documentation live from the MCP server's own tools/list response (see MCP Tools Reference), so parameter and result descriptions always match what the server actually validates — only the HTTP method/path framing below is REST-specific.
Conventions used by every endpoint below
- Auth: read-only endpoints (
GET) work without authentication. Endpoints that change something require an API key, sent as either theAuthorization: Bearer <key>orX-MockMotor-API-Key: <key>header — find your key on your account page. GET/DELETEparameters go in the query string, e.g.?envid=XXX&varid=YYY.POSTparameters go in a JSON request body (Content-Type: application/json) — one flat JSON object with the fields listed under "Body" below, same field names as the equivalent MCP tool's arguments.- Create vs. update share one endpoint for several resources (environment, service, reaction, property, account):
POSTwithout the resource's id field creates a new one;POSTwith it updates the existing one. Both variants are documented below where this applies. - Errors always come back as HTTP
200with a{"error": "message"}body (matching the rest of the MockMotor console) — check for anerrorkey rather than the HTTP status code.
Loading field documentation from
/console/api/mcp…