add_rule
Add a conditional response to a route: when the request matches the conditions (query, header, path param, body field), the mock answers with this status, body and latency. Rules are evaluated in order, the first match wins; x-loutre-* headers keep priority.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| body | No | JSON body of the response | |
| name | No | Human-readable label of the rule | |
| slug | Yes | Subdomain of the mock, e.g. "brisk-otter" | |
| when | Yes | Every condition must hold | |
| route | Yes | Route identifier, lowercase method: "get:/users/{id}" | |
| status | No | ||
| latencyMs | No | ||
| ownerToken | No | Owner token received at creation (not needed when the account is connected with an API token) |