REST API#

Static data#

Give a mock endpoint a JSON array on its Static Data tab and it serves that collection instead of its response body.

Static Data tab of a mock holding three product records
Give a mock a JSON array and GET returns it, filtered by exact field values in the query string.
GET/m/{ws}/{resource}
GET/m/{ws}/{resource}/:id

The single-record route needs its own mock, with a path ending in /:id and the same static data. The item is found by its id field.

Filtering#

Each query parameter keeps only the items whose field equals the value exactly. Several parameters must all match.

http·Example: exact-match filters
GET /m/abc-xyz/api/users?role=admin&status=active

There are no comparison operators, full-text search, sorting or pagination. For those, write the response yourself with the template engine or conditional response rules.

CRUD endpoints from a YAML model#

Importing a YAML model (see Importing) creates one mock per route. Each response is generated on every call and nothing is stored, so a record you POST will not appear in the next GET.

GET/m/{ws}/{model}
GET/m/{ws}/{model}/:id
POST/m/{ws}/{model}
PUT/m/{ws}/{model}/:id
DELETE/m/{ws}/{model}/:id

A model with has_many relations includes five generated child records inside its single-record response. A belongs_to relation adds a parent id field, for example user_id.


MockLane © 2026 · Built for developers

Go to Dashboard