A fake JSON API with your own data
Write the JSON you want back, put it at the path your app calls, and Mockzilla hosts it as a mock API. No OpenAPI spec, no code, no server to run.
- No spec needed
- Your own data
- Free tier
- MIT licensed
[
{ "id": 1, "name": "Alice", "plan": "pro" },
{ "id": 2, "name": "Bob", "plan": "free" }
]What is a fake JSON API?
A server that returns JSON you wrote, at the paths your app calls, over HTTP. A file named index.json becomes a GET at the path of its folder, and wrapping it in a folder named after an HTTP method gives you anything else. That is the whole format.
No spec, no code and no DSL to learn. Drop the folder in the app, or add the GitHub Action to the repository it lives in, and the routes are live. Add an OpenAPI spec later and the two mix, with your files winning.
Placeholder APIs give you their data, not yours
The public fake APIs are fine until your UI needs a field they do not have. Mockzilla serves the JSON you wrote, at the routes your app calls, on a URL your whole team can reach.
A mock running from a db.json on your laptop has the opposite problem: the data is yours, but it exists in one place. Your designer cannot open it and CI cannot call it.
Add an OpenAPI spec
Mix both. The spec generates responses from your schemas, and any JSON file you add overrides that route or adds a new one.
Simulate failures
Add latency and error rates so your frontend has something to handle. Proxy anything you have not mocked to the real API.
Run it on your laptop
The engine is MIT licensed. Point the CLI at the same folder and get the same endpoints locally or in CI.
Questions
- Do I need an OpenAPI spec?
- No. A folder of JSON files is enough. Mockzilla works out the routes from the folder names. You can add a spec later and mix the two.
- Can I use it in CI?
- Yes. The URL is stable, so your test suite can call it like any other API. You can also run the open source engine as a binary or a Docker image inside your CI job.
- Is it free?
- There is a free tier, and it is enough to build against. Paid plans add more throughput and larger mocks, and the higher ones add a dedicated setup with a domain of your own.
- How is this different from json-server?
- json-server runs on your machine from one db.json file. Mockzilla runs hosted on a URL your whole team and your CI can reach, and the same engine still runs locally when you want it to.
Bring a spec. Get a mock server.
It costs nothing to start. Dedicated infrastructure when you need it.