object field is the heart of every line in an import file. It holds the actual configuration and
is where most of the work goes. This page walks through building it from scratch.
Object structure
Theobject takes one of two shapes, depending on whether the type uses named prototypes or a single default prototype:
prototype key is needed.
Step by step
1
Pick a top-level type
The
type at the top level of the line decides what you are building. Only the types below are allowed at the top level of an import line.The main types you start from:Connection types, referenced by the ones above:
Helper types:
2
Find the prototypes for that type
Each type offers a set of prototypes or a default prototype: templates with a
JSON schema that lists the fields you fill in. Fetch the supported prototypes for a
type from the Alumio API:See Finding configuration types and schemas
below for more information.
3
Set the prototype and its parameters
Put the chosen prototype identifier in For a type that uses its default prototype, omit the
prototype, and fill the fields from its schema into parameters:prototype key and provide only parameters.4
Reference or inline a nested configuration
Some fields hold another prototype or configuration rather than a plain value. The field’s schema
tells you which through its Or reference a configuration that is already saved in the environment
(or defined on another line in the same file), by its identifier:To see what already exists to reference, list the saved configurations of that type:
di:type and di:allow properties
(see Common schema properties below). When a reference is allowed,
you have two options.Inline as its own prototype and parameters:5
Nest as deep as you need
Prototypes can hold other prototypes, so the structure nests. In the example below, a
list-transformer (prototype data) contains an http-transformer, whose client is a reference to a saved http-client (webshop) and whose request.serializer is an inline json prototype:ULIDs
Alumio stamps aulid on every prototype object during import validation. Do not generate them yourself.
- When creating: omit
ulideverywhere. The server injects them. - When updating: start from the exported or fetched JSON and keep the
ulidfields it already contains, so embedded objects keep their identity.
Finding configuration types and schemas
Use the Alumio API to find prototypes and configurations.Search for prototypes of a type
To list all available prototypes for a type use the following API call.List saved configurations
To see what is already configured in the environment (so you reuse instead of duplicate), list the saved configurations of a type.Common schema properties
When you read a prototype’s schema, a handful of properties tell you how to fill in a field. They live under a field’sui object.
di:type
Marks a field that holds a nested configuration of a given type, rather than a plain value. For example, a field withdi:type: subscriber expects a subscriber prototype (inline) or a reference to a saved subscriber. The value is either an inline prototype object or a reference object, as shown in the steps above.
di:allow and di:force
These say whether adi:type field may point at a saved configuration.
di:allow: configurationmeans a reference to a saved configuration is allowed. Use a reference object{ "identifier": "..." }, or inline the prototype if you prefer. The route’sincomingandoutgoingfields work this way.di:force: configurationmeans the value must be its own saved configuration, referenced by identifier. Everytransformersarray uses this: create a standalonelist-transformerline and reference it. Inline objects are accepted by the importer but render poorly in the dashboard.
ui:supportsPlaceholders
Marks a field that accepts a placeholder. For example&{id}. See Placeholders.
ui:patterns
Marks a field that uses path patterns to select or write data. For exampleproducts.*.sku. See Patterns.