Skip to content

API Gateway Expressions Reference

Bondy API Specification use a logic-less domain-specific language (internally called "Mops") for data transformation and dynamic configuration.


The expression language operates on the API Context and it works by expanding keys (or key paths) provided in a context and adding or updating keys in the same context object.

This reference assumes you are familiar with the API Context schema.


We call Mops "logic-less" because there are no if statements, else clauses, or for loops. Instead there are only tags. Some tags are replaced with a value, some nothing, and others a series of values. This document explains the different types of Mops tags[1].


Expressions are strings containing one or more Tags.

You can use an expression in an API Gateway Specification object property when its value is of type expression.

An expression is a promise i.e. a proxy for a value not necessarily known when the promise is created.

Promise Type

The promise type syntax used across the documentation is () => DATATYPE where DATATYPE is the type of value the promise should be fulfilled with i.e. () => string means that once the expression is evaluated, and thus the promise fulfilled, the value should be of type string.


Tags are indicated by the double mustaches. {{request}} is a tag, as is {{defaults.timeout}}.

Mops always operates on an API Context, a map that contains



  1. Mops droves inspiration from Mops is inspired by mustache. ↩︎

Except where otherwise noted, content on this site is licensed under a Creative Commons Attribution-ShareAlike (CC-BY-SA) 4.0 International license.
Bondy and Leapsight are registered trademarks of Leapsight Technologies Ltd.