Skip to content

How to Import/Export Modules

If you don't want to manually create a module via the vendor portal, you can export and import modules via the UI or REST API.

This is useful for module developers who:

  • want to quickly set up a module or share it with others
  • want to test a module in a different environment
  • want to create a backup of a module

Import/Export Modules via UI

Export Modules

If you want to export a module, navigate to the My Modules overview page and click on the context menu of the module you want to export. There you will find the Export Module ZIP button.

Export module button in context menu

The button will trigger the REST endpoint GET ExportModuleAsync, which will download a zip file containing the module's data.

Import Modules

If you already have a module zip file and want to import it, you can do so by clicking the Import Module ZIP button at the top of the My Modules overview page.

Import module button im my modules overview

On click, the file explorer opens and a zip can be chosen. After choosing the zip, it will be uploaded by triggering the REST endpoint POST ImportModuleAsync.

File explorer after clicking import module button

Import/Export Modules via REST API

Export Module

See the API documentation for the endpoint GET /api/v8.0/{orgId}/ExportModuleAsync/{moduleId} to export a module.

Import Module

See the API documentation for the endpoint POST /api/v8.0/{orgId}/ImportModuleAsync to import a module.

Required ZIP File Structure

  • moduleSchema.json
  • PackageArtifact
    • build (or whatever folder as route)
  • ModuleToS
    • definition must be in JSON file where name of the file is given in File property with format: "ModuleToS/filename.extension"
  • ModulePrivacy
    • definition must be in JSON file where name of the file is given in File property with format: "ModulePrivacy/filename.extension"
  • AlertRuleDefinitionFile
    • Yaml document
    • definition can't be given and is not needed in JSON file
    • should be only one document
  • ModuleImage
    • contains only files, no folders are allowed
    • definition must be in JSON file where name of the file is given in File property (example: "image.jpeg", wrong:"ModuleImages/image.jpeg")
  • ModuleLogo
    • contains only files, no folders are allowed
    • definition must be in JSON file where name of the file is given in File property (example: "logo.jpeg", wrong:"ModuleLogo/logo.jpeg")
  • ModuleSpecificRolesEntitiesDefinition
    • must contain only one json file, no folders

Module Schema JSON Rules

  • the name of the file has to be moduleSchema.json
  • it has to be in the root folder of the uploaded zip file
  • schema - should be given with value "1.0" as string
  • moduleId
    • if null or empty GUID, the system will create a new module and assign new id
    • if the id is defined - system will create new module if the id is not already taken
    • if the id is defined - system will try to uplate the module if the module is found for the given id
  • organizationId - will be ignored in import - system will work with the organization id given in the request or with the organization id of the logged-in user
  • scope has to be unique for the tenant
  • translations - english translation is obligatory in order to create or update the module. Other translations will be added or replaced
  • moduleFiles- all the files given in the ModuleTos, ModulePrivacy, ModuleImages or ModuleLogo folder must be defined in json schema with the country and language id and the document type id
    • File property example: "ModuleToS/filename.pdf" (with the '/' separator)
  • stateId - read-only field - module must be created in develop-draft state.