API Mock Sandbox
Describe routes and their ordered responses in a local JSON scenario. Enter a request and see which route matches, which response step runs and how its state changes. This is a browser-only simulator: it neither starts an HTTP server nor sends the request to a remote endpoint.
Key features
- Match HTTP method, literal or named path segments, exact query values and required headers
- Replay different statuses, headers, bodies and bounded delays in a deterministic per-route sequence
- Hold the last response after the final step; reset all route cursors to reproduce the same request order
- See captured path parameters, the selected route and response step in a local history table
- Export the validated scenario and complete in-memory history as separate JSON files
How to use
- Load the example or paste a local-api-mock-v1 JSON scenario and apply it.
- Review route order, matching conditions and response steps in the route table.
- Choose a method and local path, then enter optional request headers and body.
- Run the same or different request repeatedly to advance each matched route's response sequence.
- Reset the route counters to replay or download the scenario and local history.
Use cases
- Verify how a client handles a 200, then a delayed 503, then a recovery response
- Compare a header-gated route with a fallback route using the same URL pattern
- Share a reproducible response scenario with a teammate without exposing a live service
Frequently asked questions
Does this send a real HTTP request?
No. The browser evaluates a local scenario and shows the simulated response. It does not listen on a port, intercept other tabs or contact the URL you enter.
How are multiple matching routes chosen?
Routes are considered in the order shown in the JSON. The first route whose method, path segments, query conditions and headers all match is selected.
What happens after the final response step?
The last step repeats for later matching requests. Reset returns all route counters to the first step and clears the local history.
Can I model latency and cancellation?
Each step can delay for 0–5,000 milliseconds. Cancelling a delayed response leaves its route counter unchanged so the next run sees the same step.
What are the limits?
A scenario may contain up to 24 routes and 12 response steps per route. Scenario JSON is limited to 128 KiB; each response or request body is limited to 32 KiB. Only the latest 100 history entries stay in memory.
Are request bodies used for matching?
No. The body is preserved in the local request history, but this version matches method, path, query and headers only. A nonmatching request returns a local 404 simulation.
Privacy
Mock routes and response sequences run in your browser only. No actual HTTP request or server is created. Downloaded scenarios and history may include paths, headers and response bodies you entered; review before sharing.
Comments & questions