REST API

Plain HTTP over one facade.

Drive Mock Machines from any HTTP client over the REST API. It exposes scenarios and experiments as resources, so any client can browse a deployed scenario, run an experiment, and read back the results — a thin HTTP adapter over the same Lab → Workbench → Scenario → Experiment facade as the MCP server, holding no engine logic of its own.

OVERVIEW

The REST API is a thin HTTP adapter over the Mock Machines facade. It exposes scenarios and experiments as resources, so any HTTP client can browse a deployed scenario, run an experiment, and read back the results.

It is a sibling of the MCP server — both drive the same Lab → Workbench → Scenario → Experiment facade, and neither holds engine logic of its own.

THE HOSTED API

Live and hosted — no local build or server to run. Every endpoint hangs off this base.

# Base URL — liveness probe at /health
https://api.mockmachines.dev

The API is open for reading the curated preset scenarios anonymously — no token required. Creating, running, and deploying scenarios needs a bearer token, which scopes the work to your own private workbench. The MCP connector is the sibling adapter, and the read-only studio is a browser UI over this same API.

ENDPOINTS

Scenarios and experiments.

Scenarios

GET /scenarios List deployed scenarios (presets included).
GET /scenarios/{id} One scenario's metadata.
POST /scenarios Deploy a scenario from a YAML request body; returns the new id. (auth)
DELETE /scenarios/{id} Delete a scenario and all its experiments. (auth)

Experiments · under /scenarios/{id}/experiments

GET /experiments List a scenario's experiments.
GET /experiments/{eid} Status, turn, and entity counts — poll this after a run.
POST /experiments Create (seed) an experiment at turn 0. (auth)
DELETE /experiments/{eid} Delete an experiment. (auth)
POST /experiments/{eid}/run Advance the experiment N turns, or request an event. (auth)
POST /experiments/{eid}/persist Checkpoint at the current closed-turn boundary. (auth)
POST /experiments/{eid}/load Resume a named checkpoint into a new experiment. (auth)
POST /experiments/{eid}/export Export tables to CSV or Parquet. (auth)
GET /experiments/{eid}/db Download the DuckDB database + OSI model as a zip.
GET /experiments/{eid}/events Paginated event log (?from=&limit=).
GET /experiments/{eid}/dataset Dataset metadata (status, counts, file list).

Browsing a ready experiment · under …/experiments/{eid}

GET /entities Machine types with counts.
GET /entities/{type} All instances of a type, fields decoded.
GET /entities/{type}/{id} One instance's field map.
GET /entities/{type}/{id}/actions The current state and available events, each with condition verdicts.
GET ACCESS

Pick a world. Or build your own.

OPTION A · OPEN NOW Try it live

Explore a pre-built scenario over REST & MCP — no signup.

OPTION B · WAITLIST Join the waitlist

Author and edit your own scenarios. Rolling out in batches.