The Medable platform offers a JavaScript API for developers to create, read, update, and delete cortex objects; query and aggregate data; send custom notifications; perform callouts; console and debug logging; create object triggers; run scheduled jobs; create custom api routes and more.
All scripts run synchronously. There are no callbacks or timers and as such no implementation of functions such as setInterval, setTimeout or setImmediate. For example, a route script employing an http callout might look like the following:
import http from 'http';
try {
const response = http.get('https://www.example.com/service?json');
return JSON.parse(response.body);
} catch(err) {
// handle me
}