Ripple
All guides

Mock servers

Run self-hosted HTTP mock APIs on 127.0.0.1 inside Ripple — define routes, start a local server, point requests at it, and watch live traffic.

Jump to section

What it is

Mock Servers let you stand up a lightweight HTTP server bound to localhost without leaving Ripple. Define method + path + status + JSON body responses, start the server, and use the base URL (http://127.0.0.1:{port}) in your HTTP requests.

  • Route table — GET/POST/PUT/PATCH/DELETE/OPTIONS/HEAD or * (any method)
  • Path parameters — /users/{id} with {id} substitution in response body
  • Configurable status, delay (ms), and response headers
  • Live request log — method, path, status, timestamp
  • CORS enabled for browsers and Ripple's HTTP client
  • Import from OpenAPI Design document
  • Start Mock from Design Studio — one-click generate, save, and start
  • Persist definitions in app settings (ripple_mock_servers)

How to open it

  • Click the Mock Servers icon in the footer
  • The full-screen Mock Servers panel opens

Create a definition

  • Click New and name your server (e.g. Pet Store Mock)
  • A default GET /api/example route is created
  • Set port and start the server — base URL shown in the panel

Edit routes

ColumnExample
MethodGET, POST, or *
Path/users/{id}
Status200, 404, 500
Delay0–5000 ms
BodyJSON with {id} substitution
HeadersContent-Type: application/json

OpenAPI import & Design Studio

  • Import routes from an OpenAPI Design document in the Mock Servers panel
  • From Design Studio: Start Mock — generate routes from the active spec, save, and launch in one click
  • Useful for prototyping APIs before the backend exists

Testing against mocks

  • Point collection variables like baseUrl to http://127.0.0.1:{port}
  • Run Collection Runner or manual sends — live log shows each hit
  • Cookie jar and auth work normally against mock URLs

rip mock (headless)

For CI pipelines, use rip mock to start and stop mock servers without the desktop UI. Definitions live at {ripple data}/mocks/{name}.json.

rip mock start my-api
rip run collection ./ci/smoke.json --env ./ci/staging.json
rip mock stop my-api
  • rip mock list — available mock definition names
  • rip mock start my-api — start from my-api.json (default port 4010)
  • rip mock status — running URL and route count
  • rip mock stop my-api — stop the server
  • Only one mock server runs at a time

Limitations

LimitationNotes
Cloud-hosted mocksLocal 127.0.0.1 only
Request-body matchingRoutes match method + path only
Dynamic templatesStatic bodies with {param} substitution only
Shared multi-instanceNo Redis / Mockbin-style deployment