The API
Dromo provides a standard REST API for working with schemas. The API provides standard CRUD operations for saved schemas. You can view the full Saved Schema API reference here.Saved Schema Structure
Schemas have the following fields:Schemas are automatically assigned a UUID when they are created.
Schemas must have a unique name within your organization.Schema names are displayed in the Dromo dashboard.
Saved schemas accept the same settings that can be provided to the browser SDK.See Settings for more details.
Schemas have an array of fields which also accept the same full set of options as the browser SDK.See Field Object Reference for more details.
You can define any or all of the hooks that Dromo provides using the Saved Schema API.The hook function JavaScript source is passed as a string, which must evaluate to a valid JavaScript function. See the defining hooks section for examples.All hooks are optional.
Defining hooks
Hook functions are defined using strings containing JavaScript source code. The code is evaluated in the end user’s browser for standard imports, and using Node.js 18 for headless imports. All types of function declarations are accepted:- Anonymous function expression:
function(a, b) { return a + b; }
- Named function expression:
function sum(a, b) { return a + b; }
- Arrow function:
(a, b) => { return a + b; }
Row hook example
Row hook example
To define a row hook, you could pass the following to the API’s
hooks
parameter:Step hook example
Step hook example
To define a step hook, you could pass the following to the API’s
hooks
parameter: