QuantaAPI
Dashboard
Guides

Configuration

Control the HTTP method, response latency, and how often the endpoint returns a simulated failure.

Method, latency, errors
4 min read

Open the Configuration tab on any endpoint. Changes are applied only after you click Save changes.

HTTP method

The method stored in the configuration is what the mock endpoint matches. It must be the same method consumers use; otherwise the request is not matched and returns 404.

Changing the method changes the endpoint identityIf you switch an endpoint from POST to GET, clients still calling POST will get 404 until they change their method.

Latency

Latency is a delay applied before the response is returned. It is applied to successful responses, validation failures, and simulated errors alike, so it is a reliable way to test loading and timeout states.

Slider range
0 – 5000 ms
Slider step
100 ms
New endpoint default
20 ms
HTTP header
X-Response-Latency

Error ratio

Error ratio is a percentage between 0 and 100. On each request that passes validation, QuantaAPI rolls a random number. If the roll falls under the ratio, one entry from the error pool is returned instead of the stored response.

Validation runs firstValidation failures always return 400 regardless of the error ratio. Simulation only applies after the request is considered valid.
100% is deterministicWith the ratio at 100, every valid request returns a pool entry. This is the fastest way to exercise client error handling.

Error pool

The pool is the list of failures that can be injected. Each entry has an error code, a status code, and an optional message. An empty pool disables simulation even if the ratio is above zero.

ERROR CODESTATUSMESSAGE
BAD_GATEWAY502Bad gateway, upstream server returned an invalid response.
INTERNAL_SERVICE_ERROR500Internal service error, something went wrong on the server.
GATEWAY_TIMEOUT504Gateway timeout, upstream server took too long to respond.
TOO_MANY_REQUEST429Too many requests, please slow down and try again later.

Status codes must be between 200 and 599. Statuses that cannot carry a body (204, 205, 304) are not allowed; an invalid value falls back to 500.

What a simulated response looks like

The injected entry does not replace your JSON body directly. Your stored response is still rendered, but {{message}}, {{status_code}}, and {{success}} are filled with the simulated values. Design the response template accordingly.

Response template that works for success and failure
{
  "ok": {{success}},
  "status": {{status_code}},
  "message": "{{message}}"
}