Change to req.get() behaviour

Nick Houghton, May 29 2016

Change in JS functionality

This is a notification of a minor but potentially important change in functionality that might effect your Sandbox behaviour.

The change is to how the req.get() function behaves when no header for the given name is found, previously this incorrectly returns ‘undefined’ as a string, we will be deploying a change over the coming weekend 29th May 2016 that will fix this incorrect behaviour to return a proper JS undefined.

You may have to update some of your Sandbox JavaScript code to suit this subtle new behaviour. Where previously you may have had code like this because of this defect:

if(req.get('HeaderName') == 'undefined')

you can now write the proper:



if(req.get('HeaderName') === undefined)

A number of Sandboxes with the now incorrect usage have been automatically updated to suit, but yours may have been missed by the search and you will need to update it manually.

Hit us up with any feedback, or raise a ticket on GitHub.

Externalised JavaScript configuration

Nick Houghton, February 21 2016


A feature users have been asking for in different ways for a while was a way to make their Sandboxes more configurable, to be able to describe their Sandboxes logic in JavaScript but not have to keep updating and tweaking it to change environment style values. Our new feature Sandbox.config solves this problem!

The new config feature is already live, and the details of how it works are here - config properties.

It is super simple, all the config values configured via the UI or API are exposed to your JavaScript as a JS map object on the Sandbox object. A simple example would be:

Sandbox.define('/test', 'GET', function(req, res) {
return res.send(Sandbox.config.responseText)


Hit us up with any feedback, or raise a ticket on GitHub.

More JavaScript documentation

Nick Houghton, December 10 2015


Second round of documentation updates are in, more tweaks to request handling , supported libraries and the more details about the JMS implementation for the Sandbox Server deployments.

Recent additions for this week:

JMS Request Handling, a new addition to the platform (server only) is JMS support, so you can build Sandboxes across both HTTP and JMS transports, ActiveMQ and Websphere MQ support to start with.

Supported 3rd party JavaScript libraries available out-of-the box, extended the list to cover the new versions of 3rd party libraries we support. All new Sandboxes created after the go-live date for this feature will be referencing this new set of library versions.

Also tweaks to existing entries. Expect more updates soon!

Hit us up with any feedback, or raise a ticket on GitHub.

JavaScript documentation

Nick Houghton, October 20 2015


We have finally started updating our documentation, and the first bunch of changes are now live. While generally the least enjoyable part of the product development process for us, we’ve stop putting it off have started doing our homework.

Recent additions for this week:

How the require() function works, something that many people figured out by themselves, much like NodeJS our JavaScript files can import other files to create much more maintainable projects. Long overdue, but the docs now explain how it works.

Supported 3rd part JavaScript libraries available out-of-the box, again something many people dug around to find, we’ve now written it down. Also there is now a reference for when we add new or tweak existing 3rd party libraries.

Also tweaks to existing entries. Expect more updates soon!

Hit us up with any feedback, or raise a ticket on GitHub.

RAML Support

Nick Houghton, May 20 2015


We are pleased to announce we have recently added RAML support to the platform. Adding to the existing support for Apiary / API Blueprint, Swagger and WSDL.

Importing a RAML file to generate your Sandbox definition is as simple as clicking on the new RAML button on your Sandbox Dashboard. The only caveat is that like all the other API definition importers, the RAML file must be a flattened file that doesn’t include any external elements.

If you have a large RAML definition you will likely have followed best practices and broken your file down into many sub-files. If you are in this situation, you can use a library to ‘flatten’ your definition for you before importing into Sandbox. One of those tools is node-flat-raml.

Try it out now, and hit us up with any feedback, or raise a ticket on GitHub.

Newer    Older