[POST] /import

[POST] /import

/api/bpm/organizations/import

Description

This endpoint can be used to import a complete or partial organization from an export file (XML). The request is sent as a multipart/form-data containing two parts: the import file (file) and a control JSON (data) which specifies what to import and where.

The organization flag controls whether the organizational structure (users, roles, classes) from the import file is imported. When set to true:

  • If organizationId is provided, the structure is imported into that existing organization.

  • If organizationId is omitted (or empty), the enaio server creates a new organization and imports the structure there.

When organization is false, the organizational structure is not touched and only the listed workflow families, process definitions, report configurations, routing list templates and system languages are imported into target organizations specified per entity.

The control JSON also lists which workflow families, process definitions, report configurations, routing list templates and system languages should be imported, each with its target organizationId. Per-entity flags overwrite (whether an existing entity with the same ID should be overwritten), complete (whether the entire substructure of a family is also imported automatically) and oldParent (whether to use the original parent when the parent was copied rather than overwritten — this flag must always be set when the parent is going to be overwritten) control how each entity is handled.

Required system role

R_WFEDIT_START (ID = 21)

Request
Method

POST

Content-Type: multipart/form-data

Part

Content-type

Description

file

application/xml

The XML import file.

data

application/json

Import control JSON describing what should be imported and target IDs.

Minimum Version

BPM Service: 1.5.0

Request
Example

/api/bpm/organizations/import

Content-Type: multipart/form-data; boundary=----Boundary ------Boundary Content-Disposition: form-data; name="file"; filename="organization_export.xml" Content-Type: application/xml <?xml version="1.0" encoding="UTF-16" standalone="no"?> <WorkflowImport> ... </WorkflowImport> ------Boundary Content-Disposition: form-data; name="data" Content-Type: application/json { "organization": true, "organizationId": "D637157E0C0742CE8EDABDD8BDF30E5B", "reportConfigurations": [{ "id": "AA9CF7316A6648578D4CBA16DB7E30BD", "organizationId": "D637157E0C0742CE8EDABDD8BDF30E5B", "overwrite": true }], "routingListTemplates": [{ "id": "2E9F8FBF56E446AEBA5C5B66712AC38A", "organizationId": "D637157E0C0742CE8EDABDD8BDF30E5B", "overwrite": true }], "families": [{ "id": "9817A0BEA82A4B34BFFB0113FA196D95", "parentId": "062A13A03BD8426197E8AFD6B87692B2", "organizationId": "D637157E0C0742CE8EDABDD8BDF30E5B", "overwrite": false, "oldParent": true }], "processDefinitions": [{ "id": "06685317CB204F29A9F3C54EAE90BB74", "parentId": "BFCA7C96F99346A9965979B77A61B045", "organizationId": "D637157E0C0742CE8EDABDD8BDF30E5B", "overwrite": false, "oldParent": false }], "systemLanguages": [{ "sourceLocale": "de-DE", "targetLocale": "de-DE", "organizationId": "D637157E0C0742CE8EDABDD8BDF30E5B" }] } ------Boundary--

 

Response Codes

  • 204 - Success: The organization parts have been successfully imported.

  • 400 - Invalid json or xml file.

  • 403 - If the user does not have the required role.