Concepts
Routes
How to add, match, and order the responses a twin serves.
Open a twin and use Routes. New route saves one rule. Add a collection saves seven routes that share a named store: list, create, read, replace, update, delete, and clear. The item routes use the collection path plus /:id.
Behaviors
- Static JSON returns the body as written.
- Template replaces {{ }} tokens, then returns the text.
- Stateful resource reads or writes one operation on a collection.
- OpenAI chat and OpenAI models answer the chat and model-list shapes.
- gRPC, GraphQL, SOAP, WebSocket, and Kafka use the bodies described on their own pages.
A path may include :name segments. Those become {{param.name}} in a template. A HEAD request can match a GET route. Paths starting with /__ are reserved for the twin's own controls. Delay is 0 to 5000 milliseconds and applies to that route. Enabled turns the route off without deleting it.
A route whose method is * and whose behavior is Stateful resource still handles every method on that path and on one extra segment. New collections do not use that form. It remains so older twins keep working.