API Documentation: POST /api/v8.0/{orgId}/ImportModuleAsync
Description
Imports a module into the system for the specified organization. The endpoint expects a ZIP file adhering to a strict folder and file structure. This file must include a moduleSchema.json
file at the root, which defines module metadata and references to accompanying content files.
Endpoint
POST /api/v8.0/{orgId}/ImportModuleAsync
Path Parameters
Parameter | Type | Description |
orgId | string | ID of the organization performing the import |
Request
Content-Type: multipart/form-data
Authorization: Bearer <token>
Field | Type | Description |
file | file | A .zip archive file containing the module and its associated resources |
ZIP File Structure
The uploaded ZIP file must comply with the following structure and content rules:
<zip-root>/
│
├── moduleSchema.json
├── PackageArtifact/
│ └── build/ (single package artifact folder)
├── ModuleToS/
│ └── <filename>.<ext>
├── ModulePrivacy/
│ └── <filename>.<ext>
├── AlertRuleDefinitionFile/
│ └── <only-one-file>.yaml
├── ModuleImage/
│ └── <image files only>
├── ModuleLogo/
│ └── <logo files only>
└── ModuleSpecificRolesEntitiesDefinition/
└── <only-one-file>.json
moduleSchema.json
Specification
- Must be located in the root of the ZIP file.
- File name must be exactly
moduleSchema.json
.
JSON Schema Example
{
"schema": "1.0",
"moduleId": "GUID or null",
"hostingTypeId": "GUID",
"typeId": "GUID",
"parentId": "GUID or null",
"moduleVersion": "decimal value, importing the module will create version 0.1",
"vendorInternalCodeVersion": "string or null",
"categoryId": "GUID or null",
"component": "string or null",
"scope": "string or null - unique-scope-name",
"entryFileUrl": "string or null",
"offlineCapability": "boolean or null",
"offlineReason": "string or null",
"federationTypeId" : "GUID or null",
"deploymentType" : "int",
"paymentOptionIds" : ["GUID"],
"cropIds" : ["GUID"],
"environmentIds" : ["GUID"],
"requirementIds" : ["GUID"],
"dataAreaIds" : ["GUID"],
"dependencies" : ["GUID"],
"translations": [
{
"languageId": "GUID of the language",
"moduleName": "the module name",
"shortName": "short name of the module",
"description": "description of the module",
"shortDescription": "short description of the module",
"websiteUrl": "url of the module web-site",
"websiteName": "website name",
"supportContact": "e-mail address"
}
],
"subscriptionOptions": [
{
"paymentCycleId": "GUID",
"currencyId": "GUID",
"regionId": "GUID or null",
"trialLength": "int or null",
"price": "decimal"
}
],
"environmentVariables": [
{
"appEnvironmentId": "GUID",
"key": "string",
"value": "string"
}
],
"moduleFiles": [
{
"file": "ModuleToS/terms_en.pdf",
"countryId": "US",
"languageId": "en",
"documentTypeId": "123"
}
]
}
Field Rules
schema
: Must be "1.0"
(string). moduleId
: - If
null
or empty GUID: a new module will be created. - If a valid GUID:
- If module with the ID does not exist yet: creates a new module with this ID (if allowed).
- If module exists with the ID: updates existing module.
organizationId
: Ignored; org ID is derived from the request. scope
: Must be unique per tenant. translations
: Must include at least English translation. Other translations are optional and will be added or updated. moduleFiles
: Each referenced file must be present in its specified folder.
Special Folder Rules
Folder | Constraints |
AlertRuleDefinitionFile/ | Only one .yaml file; not referenced in moduleSchema.json |
ModuleImage/ | Only files, no folders. Filenames must match entries in moduleSchema.json |
ModuleLogo/ | Only files, no folders. Filenames must match entries in moduleSchema.json |
ModuleSpecificRolesEntitiesDefinition/ | Only one .json file; no folders inside |
Response
200 OK
400 Bad Request
- Missing or invalid
moduleSchema.json
- Invalid ZIP structure or missing required files
- Duplicate
scope
for tenant - Missing English translation
Notes
- Use
'/'
as a path separator in the file
paths inside moduleSchema.json
. - Avoid nesting folders inside folders such as
ModuleImage
or ModuleLogo
. - If the module already exists and
moduleId
is provided, an update will be attempted.