Skip to main content
Working with the API lets you create and manage reusable import schemas. Saved schemas support the serializable fields, settings, and hooks defined by the Saved Schema API.

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:
string
Schemas are automatically assigned a UUID when they are created.
string
required
Schemas must have a unique name within your organization.Schema names are displayed in the Dromo dashboard.
Settings
required
Saved schemas accept the serializable settings defined by the API schema. This includes the uploadStep, matchingStep, matchValuesStep, and reviewStep objects and autoMapHeaders.Some browser-runtime settings are not accepted by the saved-schema serializer. These currently include initialFile, savePartialSession, textOverrides, allowEmptySubmit, and batchRowHookBatchSize.See Settings for the full browser SDK settings reference.
Field[]
required
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.
object
You can define the serializable hooks listed below using the Saved Schema API. Batch row hooks are currently available only through embedded SDK integrations and cannot be stored in a saved schema or used by a headless import.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; }
To define a row hook, you could pass the following to the API’s hooks parameter:
To define a step hook, you could pass the following to the API’s hooks parameter:

Using saved schemas

Saved schemas can be used in the browser or using the Headless API. You can also use the Saved Schema API to programmatically create and manage schemas.