Skip to content

Mock server

desktop only The mock server binds a local HTTP listener, which the browser sandbox can’t do — it’s available only in the desktop app.

Point a frontend (or any HTTP client) at http://127.0.0.1:PORT and get back recorded or stubbed responses without standing up a real backend.

From a collection’s menu, choose “Start mock server”. Restura compiles the collection’s requests — plus matching entries from your history — into routes using a record-and-replay strategy: each HTTP request becomes a route that returns its recorded response.

The listener binds to 127.0.0.1 only (never a public interface). If you don’t pin a port, the OS assigns a free one and returns it.

If the collection has an OpenAPI spec attached (collection settings → contract spec), Restura also generates a route for every operation the spec defines — including ones you’ve never actually called. Recorded history always wins for an operation it covers; spec-derived routes only fill in the gaps, so attaching a spec never changes the behavior of an endpoint you’ve already recorded. The response body for a spec-derived route comes from the operation’s own example (static example, named example, or a value generated from its JSON Schema), picking the lowest declared 2xx status.

The Runs panel shows the live server: running state, the base URL (one click to copy), and the served routes. Stop it from there or from the same collection menu.

Pattern in pathMatches
:id or {id}exactly one path segment
trailing *the rest of the path
literal textitself

The first route whose method (or *) and path pattern match wins, with exact paths preferred. Each route carries a status, headers, and a body (text, or base64 for binary), plus an optional artificial delayMs to simulate latency.