API simulation

Test more than the happy path

Mock API Studio adds controlled backend behavior to generated REST resources. Configure the project in the cloud, then use the local runtime to test stateful CRUD flows, authentication requirements, slow responses, injected failures, pagination, search, sorting, and parent-child routes.

Create stateful CRUD endpoints

Choose which GET, POST, PUT, PATCH, and DELETE operations each resource exposes. The local SQLite store preserves successful mutations, disabled operations return HTTP 405, missing records return 404, and unsafe parent deletion can return 409.

Simulate slow and failing services

Fixed latency delays requests by the configured duration. The error-rate setting probabilistically injects HTTP 503 responses before normal request handling. Together they make loading, retry, timeout, and service-error interfaces observable during development.

HTTP
HTTP/1.1 503 Service Unavailable
content-type: application/json

{ "error": "Injected mock failure." }

Require authentication

Projects can protect resource routes with API key, basic, or bearer authentication. Bearer mode can expose mock login and registration behavior backed by the local SQLite database. OpenAPI and Swagger output describe the active security scheme for manual testing.

Exercise lists and nested screens

Collection routes can paginate, search nested values, and sort only by fields explicitly allowed in the project. Parameter names and ascending or descending values can be customized. Relationships add nested routes that validate the parent before returning matching children.

HTTP
GET /products?page=2&limit=20
GET /products?search=keyboard
GET /products?sortBy=price&order=desc
GET /clients/client-1/products

Know the simulation limits

An injected error rate is random rather than a request-by-request scenario script. Latency is a fixed configured delay. The runtime models development behavior and local data, not the full infrastructure, authorization policy, or scaling characteristics of a production backend.

Related questions

Can a mock API test loading states?

Yes. Configure fixed latency so the application has time to render loading indicators and skeletons.

Can it test server errors?

Yes. A configured error rate injects HTTP 503 responses, which can exercise retry and error interfaces.

Does it support protected routes?

Yes. Resource routes can require API-key, basic, or bearer authentication according to project settings.

Keep exploring

Last updated September 17, 2026. Product behavior described here is verified against the current Mock API Studio runtime.