API Documentation: GET /api/v8.0/{orgId}/ExportModuleAsync/{moduleId}¶
Description¶
Exports a module for the specified organization. The module data is returned as a ZIP archive with the structure and content format in the following description.
Endpoint¶
Path Parameters¶
| Parameter | Type | Description |
|---|---|---|
orgId | GUID | ID of the organization requesting the export |
moduleId | GUID | ID of the existing module to be exported |
Request¶
Headers¶
Authorization: Bearer <token>
Response¶
200 OK¶
Returns a ZIP file (application/zip) with the following structure:
<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¶
This file will include module metadata and references to files located in the archive.
JSON Schema Example¶
{
"schema": "1.0",
"organizationId": "GUID - Unique identifier of the organization",
"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"],
"activePackageId" : "Unique identifier of the active package",
"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"
}
]
}
Module Files Folder Rules¶
| Folder | Constraints |
|---|---|
PackageArtifact/ | Not referenced in moduleSchema.json; |
AlertRuleDefinitionFile/ | Only one .yaml file; |
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 |
Content Rules Recap¶
- Filenames and structure will match the expected import format.
- All associated translations, privacy documents, ToS, images, logos, roles, and alert definitions will be packaged.
- The
organizationIdfield inmoduleSchema.jsonwill reflect the system value and should be ignored during re-import.
Example Response Headers¶
Content-Type: application/zip
Content-Disposition: attachment; filename="module_export_<moduleId>.zip"
Errors¶
404 Not Found¶
- Module with
moduleIddoes not exist in the specifiedorgId.
403 Forbidden¶
- User does not have permission to export modules for the given organization.
Notes¶
- The exported file can be directly used with the
/ImportModuleAsyncendpoint. - File paths in
moduleSchema.jsonwill follow'/'separator conventions.