In Hyperon Studio there is functionality that allows users to export current domain definition and configuration into a compact zip file for specified profiles.
In the snapshot ZIP file any directories with names starting with '@' have special meaning. They define the structure of snapshot file. Names of other directories (not starting with '@') are part of import data. For example, they may be interpreted as parts of domain element's name or names of profiles, depending on where they are in the directory structure.
The part of the directory tree of the snapshot zip file related to the domain has the following structure:
To export domain in Hyperon Studio, go to Tools → Snapshot Export, check Domain checkbox, choose profiles from which domain should be exported and click the Export button.A popup window will appear. When the export is finished and no errors occurred, click the Download button to download snapshot in the zip file. If any error during export happens, an error message will be shown and the Download button will be unavailable to click.
Endpoint path, method, response statuses are available here: REST export endpoint
To export Domain via REST, the section below must be present in the REST request:
Located in a top-level of the zip file directory and contains the domain content. Each subdirectory of @domain/ stands for the profile with the same name as the directory name, with the same name as the folder name. Inside each profile folder there are two subdirectories:
Located under @domain directory, the structure inside the @conf/ folder or inside each individual version directory defines domain structure. The path to a specific directory defines the Hyperon domain path, for example, /PLANS[ABC] corresponds to ABC element in PLANS collection located at the root level in structure example above. Collection directory is always present, even if multiple checkbox is set to false in domain definition. Element directories, for example, ABC might have:
Marks that all nested directories will be imported as part of the region and version. Proper structure is:
Holds basic information about current domain element in TOML format, for example:
Holds information about the current domain element's attributes in TOML format, for example:
Holds reference path uniquely locating domain element, to which current element should be forwarded, for example:
Contains domain definition. It is the same file that you receive during domain export in Hyperon Studio (Model → Domain Configuration → Export to XML)
Export of empty definition or configuration (domain) will result with basic tree structure, ready to be used outside of Hyperon
If collection is empty, then the export of domain will not have the corresponding directory with the collection name!! There must be at least one child in a collection of a processed type so that the directory will be created.