Skip to content

Features


apitwin provides a rich set of features for mocking, stubbing, and proxying APIs. This section covers each feature in detail.

FeatureDescription
ConditionsRoute requests to different responses based on body, query, header, or path values
Named ParametersExtract values from URL paths with {name} syntax
Directory-Based StubsFull CRUD with one JSON file per resource
Dynamic File Resolution{source.field} placeholders in stub file paths
Template Tokens{{uuid}}, {{now}}, {{timestamp}}, and {{ref:...}} in responses
Cross-Endpoint ReferencesReference data from other stub files with filtering and transformation
Array Processing$each / $template syntax for iterating over collections and reshaping data
Type Conversion$as directive to convert between types (e.g. merge an array of objects into one)
Response TransitionsTime-based state progression across cases
Record ModeProxy a real API, save responses, replay offline
Hot ReloadEdit config, see changes on the next request
API PrefixStrip path prefixes before matching and forwarding
Runtime State IsolationGitignored mirror dir keeps mutations out of git; --ephemeral for throwaway sessions
Devtool UIBrowser dashboard for inspecting routes, testing requests, and watching config changes

Released under the MIT License.