API Simulator’s Blog

API Simulator 1.0.0 Release!

April 20, 2018   We are very pleased to announce the release of API Simulator version 1.0.0. What a milestone! API Simulator has certainly matured well beyond the point to give it the designation of version 1.0.0. Extensive list of features and ease of use with our intuitive YAML DSL (Domain-Specific Language) make API Simulator an indispensable tool for anyone’s toolbox to model and run API Simulations. Among the latest changes: Added eval for parameters. It allows for defining the final parameter value as result of evaluating a script expression. Now the sky is the limit when it comes to […]

API Simulator 0.9.0 Release

March 23, 2018   The v0.9.0 release introduces enhancements and additions to the YAML DSL (domain-specific language) for configuring simulation simlets for the Standalone API Simulator: CSV (comma-separated values) data as source for parameter values. The CSV data can come from files or be embedded in the simlet’s configuration. SQL data store (RDBMS) as source for parameter values. Lists as source for parameters. The parameter’s value can be the whole list, a sublist from randomly selected items, or a single randomly picked item from the list. This can be very handy as part of Test Data Management to construct dynamic […]

Introducing the Simula Template Engine

March 9, 2018   We have awesome news! API Simulator release 0.8.2 is out and it makes available the all-new Simula Template Engine for API simulations response templating. Modeling API Simulations and configuring dynamic responses using intuitive YAML DSL (Domain Specific Language) is now easier and more flexible than ever before. Simula Template Engine Simula takes a template and combines it with data values to produce HTTP response. Status code and reason, standard and custom header fields, text or binary body content – Simula can produce them all, dynamically. A Simula template consists of fragments. Some fragments do not change […]

It is here: YAML DSL for API Simulation Modeling

December 31, 2017   What a great way to end 2017! Modeling API Simulations via configuration for the Standalone API Simulator is now easier than ever with our new YAML-based DSL (Domain Specific Language). YAML has gained wide acceptance as the language of choice for configuration. Concise and expressive, our YAML DSL is easy to learn and start using in no time. Here is a small example demonstrating possible configuration for matching HTTP requests that have “GET” HTTP method, and a particular URI path and “Accept” header: matchers: – method: GET – where: UriPath equals: “/api/v2/products” – header: “Accept” contains: […]

API Simulator 0.6.2 Release

November 14, 2017   The following features are now also available in the Embedded API Simulator. Simlet Matching Ranking Using matching ranking, the simulator attempts to match first simlets with higher rank then simlets with lower rank. The configuration property in the Standalone API Simulator was called “order” and now its name is “rank”. Latency Simulation Latency simulation helps with testing how an API client handles slow responses from an API. The latency added via configuration is a delay on top of any network latency and request processing time. It is to note that it is now possible to configure […]

API Simulator 0.6.1 Release

November 1, 2017    Embedded API Simulator is an indispensable tool for simulating API calls in tests or the calling of APIs that don’t exist yet. Few weeks back we released the Embedded API Simulator packed with features. Something that was missing was support for simulating API calls over HTTPS. This release adds to the Embedded API Simulator support for HTTPS via three different kinds of TLS configuration – X.509 certificate and private key in PEM format, run-time generated self-signed cert, or Java KeyStore (JKS). As result of refactoring within the API Simulator’s core, configuring TLS for HTTPS in the […]

Embedded HTTP API Simulator is Here!

October 7, 2017   You’ve asked and we delivered – embedded API Simulator you can start, stop, and use to simulate HTTP APIs from within your applications.   Built on the standalone API Simulator’s foundation, embedded API Simulator also offers an intuitive and simple to use Java DSL (Domain-Specific Language) for defining simulations and their simlets. Your applications now don’t have to fake it that they are making calls to HTTP APIs. They actually will make those calls and will receive simulated responses from an always-available API Simulator running embedded in the same JVM alongside the applications.   Here is […]

API Simulator 0.5.2 Release

May 28, 2017   The focus of this API Simulator v0.5.2 release is new Test Data Management (TDM) capabilities related to the generation and use of random values in API simulations. Here are the highlights: New random token generator makes it easy to generate random text values according to a pattern. New random number parameter generates a whole number within a preconfigured range. New random date parameter generates a date between two dates, including between now and a provided date in the future or the past. New parameter for a value randomly selected from a list of values. New value […]

API Simulator 0.5.1 Release

March 5, 2017   This release improves various aspects of working with API Simulator and running the example simulations. API Simulator v0.5.1 Release Changes Removed the separate startup and shutdown scripts for Linux and Windows. Now it is just one script – apisimulator/apisimulator.bat – with ‘start’ and ‘stop’ arguments. Improvements to the apisimulator, apisimulator.bat, apiclient, and apiclient.bat scripts. Improved handling of command line arguments for API Simulator. Renamed the default raw output file for HTTP from output.raw to response.http. Moved the test inputs for the example simulations from a separate ‘input’ sub-directory under ‘examples’ to a ‘tests’ sub-directory in the […]

Running Docker Containers with Non-root Users or Random User IDs

February 12, 2017   By default, Docker containers run as root. Using root is dangerous and it may not be available in all environments. “Best practices for writing Dockerfiles” recommend that “…If a service can run without privileges, use USER to change to a non-root user”. There is a twist to this – for better security, some aPaaS (Application Platform-as-a-Service) like OpenShift use by default a user with random UID when running an image. That leads us to the question – how can one build more secure Docker images so the containers can run as a concrete non-root user and […]

Docker Container Image for API Simulator v0.5.0

January 31, 2017   Following the recently released v0.5.0 of API Simulator, we built, tested, and published a new version of API Simulator’s Docker container image. The new Docker image creates a user group called (of course) apisimulator and adds a user named apisimulator to it. With proper change of file ownership also handled in the Docker image, that allows you to start the container and have API Simulator run as a user different than root. As before the image is based on the official openjdk repository image for JRE 8 update 111, which itself contains the lightweight Alpine Linux. […]

API Simulator 0.5.0 Release

January 29, 2017   API Simulator v0.5.0 Release Changes Enhanced and more precise request URI matching. Modified existing examples to use the new enhanced URI matching. Decoding the URI parts (e.g. ‘+’ to space, %HEX to actual UTF-8 character, etc.) now happens at the time of parsing the input instead of during parameter matching. Added out-of-the-box support for JSON, XML, and URL encoding of placeholder values. Defect fixes and internal refactorings. Below are a few details about the changes in this release.   Request URI matching was flexible before. For example, it supported URI path pattern matching. Matching a request […]

API Simulator 0.4.0 Release

December 31, 2016   API Simulator v0.4.0 Release Changes Support for JavaScript as scripting language is now built-in. Support for Groovy is out-of-the-box, too, and the Groovy JARs are still part of the distro. Added the ability to forward unmatched requests to their actual destination and pass the actual responses back to the calling client instead of returning a default simulated output. That includes handling HTTPS tunneling (HTTP CONNECT). Added in API Recorder detection and avoidance of infinite loop in the special case when the proxied destination address is one API Recorder is listening on. Made the jump and upgraded […]

Docker Container Image for API Simulator v0.3.0

November 27, 2016   Following the recently released v0.3.0 of API Simulator, we built, tested, and published a new version of API Simulator’s Docker container image. This time we based our image on the new official openjdk repository image for JRE 8 update 111, which itself contains the lightweight Alpine Linux. Please visit Docker Hub for more info on how to use the image.   Happy Simulations, The API Simulator Team

API Simulator 0.3.0 Release

November 19, 2016   The biggest feature in the release is the new support for external parameters. Previously, it was possible to configure and use default parameters and parameters extracted from the HTTP request. This release introduces the concept of parameters providers. Through providers, API Simulator now can use parameters from external data sources. This feature makes it even easier to model flexible API simulations by using elements of Test Data Management (TDM). The API Simulator distro includes support for parameters from CSV (comma-separated values) files and RDBMS (Relational Database Management Systems). API Simulator loads CSV files into an in-memory […]