Import: Overview¶
Model definitions and instances can be imported using JSON files. These can
be compressed ( .json.zip
) or be uncompressed files with extension .json
.
The format of the JSON files should correspond with the JSON schema for the model or instance that is imported. Typically, a model instance is exported as a JSON file in order to obtain such a schema. The export can then for example be edited as required.
For each model instance in a JSON file, if it contains the same values for a business key as an existing model instance, then the import will update the existing instance. Otherwise, the import will add a model instance. The business key of a model is specified on its design form and can be seen in the Add Form schema of the Model API Help Reference.
When exporting items that belong to a package, all hierarchy information will be removed from item meta business keys so that the packages have no hierarchy.
The importing process will still adhere to the hierarchy specified in the meta of each item except for a data/Package instance, which will be imported at the import hierarchy (breadcrumb hierarchy). For items other than Packages, the hierarchy where the items is loaded can be overridden (to the same or lower hierarchy level only) by specifying the hierarchy in the meta of the item.
If no hierarchy is found in the meta of the item, then the hierarchy will be taken from the import hierarchy (breadcrumb hierarchy).