Basic Concepts

API Simulator™ is a versatile tool for easily creating and running API simulations.

API simulations are stand-ins that imitate the behavior and data of real APIs or APIs that are yet to be developed. One can think of API simulations as more powerful and smarter remote stubs and mocks.

An API simulation consists of a set of simlets. For synchronous request/response type of APIs, like those exposed over HTTP, each simlet simulates the output (the HTTP response) for a given input (the HTTP request).

API Simulator inspects the input by applying input matching rules. Those matching rules usually look for key values in the input but can also try to match the complete input verbatim.

A matched input is then mapped to the simlet that will produce the simulated output for that input. A default, “catch-all” simlet is used when a match can’t be found for an input.

The output produced by a simlet is rendered from a template. The template is comprised of fragments. Special kinds of fragments – placeholders – make it possible to provide dynamic output.

All simlets part of the same simulation are reachable on the same port number – that of the simulation. Moreover, API Simulator executes the same preconfigured default simlet – that of the simulation – when no simlet from the simulation matches an input.

One installation of API Simulator can run multiple simulations on the same host concurrently by starting a separate lightweight API Simulator process for each simulation on a different port number.