The Sandbox API

Nick Houghton, June 15 2016


REST API

The first version of our API for the Sandbox and Activity resources is now public! We have had an unofficial / unsupported API for more than 2 years as some eager users have discovered, but as of now the first version of our API is now public and supported.

The API covers operations across both the Sandbox and Activity resources, most importantly the Activity search operation is part of the API, which is required for external test assertions (available through both the API and the upcoming Java SDK)

The API documentation including interface specification and examples is available here, we have a task on our backlog to write tutorials showing how to use the API, so you should see those soon!

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

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')) 

or 

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


Config!

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


Docs!

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


Docs!

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.

Newer    Older