Script Objects

All about objects that contain Javascript

This whole section needs to be done

Rather than recreate the Rules and parser that we had in OLab3, we have instead decided to create an API that can be accessed via Javascript. This opens up a whole range of possibilities. It also means that authors are no longer limited by the simplistic parsing engine but can take greater advantage of what Javascript offers.

Scripts can be standalone but have much more utility when they can interface with other objects within the OLab4 core, via the REST API.

Script API

List here the objects that can be manipulated

Get Cakes

GET https://api.cakes.com/v1/cakes/:id

This endpoint allows you to get free cakes.

Path Parameters

Query Parameters

Headers

{
    "name": "Cake's name",
    "recipe": "Cake's recipe name",
    "cake": "Binary cake"
}

Script Examples

insert some examples, well commented, showing how

Scripts as Scoped Objects

As noted in the section on Object, Scripts can also be Scoped Objects. They can have the same scope levels e.g. global, server, map and node-level. See #scopeforobjects for more details on this.

Last updated