API Simulator’s Blog

It is here: YAML DSL for API Simulation Modeling

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:

We have created a tutorial to get you quickly up to speed on modeling simulations with […]

API Simulator 0.6.2 Release

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 latency for the Standalone […]

API Simulator 0.6.1 Release

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 Standalone API Simulator is […]

Embedded HTTP API Simulator is Here!

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 a tutorial to get […]

API Simulator 0.5.2 Release

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 formatter for placeholders that […]

API Simulator 0.5.1 Release

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 respective example simulation folders. […]

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

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 with a random non-root […]

Docker Container Image for API Simulator v0.5.0

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. Please visit Docker Hub […]

API Simulator 0.5.0 Release

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 URI is now even […]

API Simulator 0.4.0 Release

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 Netty to v4.1.6. Various […]