Response Template (Status & Type)
Note — feature scope. This page describes the Response Template selector inside the Edit Response window. The earlier "named scenario groups" concept (a saved set of responses activated across many handlers at once) is not implemented in the current build. Each response is configured per URL handler; switching behavior across handlers is done by editing each handler's responses individually or by importing a configuration.
What it does
For typed services, the Response Template: ComboBox in the Edit Response window lists the predefined response definitions available for that operation. Each entry pairs an HTTP status code with a body structure that was imported from the service metadata (for example from an OpenAPI/GraphQL/SOAP specification). Selecting an entry sets the response's status code and chooses the appropriate body editor.
When to use
- Your service metadata defines multiple status codes (e.g.
200 OK,404 NotFound,500 Internal Server Error) and you want to pick the matching canned response quickly. - You are simulating a plain HTTP/REST service and need a Custom response with full control over the raw HTTP message.
- A gRPC operation has no predefined responses and you just need a default body.
How to use
- Open the Edit Response window for a URL handler (see Managing Responses).
- Select the Default tab or a named response tab.
- For an HTTP/REST handler, use the Response Template: ComboBox:
- Each item shows its HTTP status (bold) and description (e.g.
200 OK,404 NotFound). - HTTP REST also offers a Custom entry. Selecting Custom switches the body editor to the HTTP Message Editor (raw status line, headers, and body) and lets you use any status code.
- Selecting a typed entry switches the body editor to the standard Object Editor for that body type and sets the HTTP status code from the description.
- Each item shows its HTTP status (bold) and description (e.g.
- For SOAP handlers the Response Template selector is not shown; instead use Return SOAP Fault (see SOAP Fault Simulation) to choose between a normal SOAP response (HTTP 200) and a fault (HTTP 500).
- For gRPC handlers with no predefined responses, a Default entry is offered so you can still configure a body.
The selection is stored per response as StatusCodeText — the literal "Custom" for custom responses, or the HTTP status code string for a predefined one. That stored value is also what puts the selector back on the same entry when you reopen the window, so a response saved on 404 Not Found reopens on 404 Not Found with the body you saved, and it decides the status the simulated server answers with. A response that was never configured opens on the operation's first predefined entry.