DeepExport
This method can be used to export a complete application structure at once; that is, the application entity together with all its sub entities and its deployment model.
Syntax
deepExport -mt Application [-ct <custom type name>] [-fi [<file path>]] [-begin <no of first entity> -count <no of entities>] [-startdate <date>] [-enddate <date>] [-where <condition>]
(line breaks for formatting purposes only)
Parameters
- -con: URL of the import/export service of the web application
Example:
https://www.mycompany.com/WebUI
- -usr: Name of the user (syntax: system name / client number / user name / department)
Note: When only one client is installed, the system name is optional.
-
-pwd: Password of the user specified in -usr or the token that is returned by the Java API
-
-mt: Application.
- -ct: Name of the custom type of the entities
Note: Use this option to export a specific custom type only. If you leave the parameter empty, all custom types are exported.
- -fi: Path name to the file that contains the entities you want to export.
Options:
- No parameter: The exported data is piped to standard output
- Without file name (only -fi): the exported data is stored in the current folder, the file name is
deepExport.zip
- With file name: the exported data is stored with the specified file path and name
Note: If a file already exists, it is overwritten without any confirmation.
- -begin: Optional number of the first entity to be exported.
Note: Entities are sorted by their internal ID.
- -count: Optional number of entities to be exported
Important! You can use this parameter only together with
-begin
- -startdate: Export all data which was created or changed on that day or since this date
Note: If the parameter is not set all data is exported. The date has to be supplied in ISO 8601 format.
- -enddate: Export all data which were created or changed until this date
Note: If not set, all data is exported. The date has to be supplied in ISO 8601 format.
- -where: An optional condition (enclosed with " " - double quotes) that is used to filter the data.
The format of the condition is: "[propertyname] [operator] '[value]' "
propertyname: the name of the system or custom property which should be filtered. You can also filter on properties of related entities via the dot notation; for example system_owner.system_name eq 'Bob' will filter all entities of the given main type, that are owned by Bob.
Note: in conditions only properties of directly related entities can be used. For example: system_component.system_application.system_name is not valid.operator: the operator which should be used for filtering. It can be: eq (equal), neq (not equal), gt (greater than), geq (greater than or equal), lt (lower than), leq (lower than or equal), like (matches a pattern with * as wildcard), unlike (matches a pattern with * as wildcard)
'value': the filter value. It has to be quoted in single quotes. If you filter for something eq '' both empty values and NULL values are found.
Note: Wildcard matching is only possible on properties which do not have predefined values.
You can add the -where parameter multiple times, to apply multiple conditions (AND combined) to the export.
Note: If there are multiple properties with the same name but different types (for example, one is a date and time property, the other a longtext property), the operator behaves as if both properties are a string (for example, greater or lower than will not work as expected for the date and time property).
Example
Importexportcli.exe deepExport -con url -usr username -pwd password -mt Application -fi filename
Result ZIP File
Deep export validates the input parameters (see: DeepExport) and generates a ZIP file in base64 encoded format that contains a set of the common single entity export files in a predefined file and folder structure, shown in the following example:
- Application 1
- All components
- All component links
- All deployment target filters
- Dynamic properties of the application
- Dynamic properties of the components
- All workflows
- All workflow definitions
- Dynamic properties of the workflow
- Application 2
- All components
- ...
- Application n
- ...
In addition to this, a meta file is generated for the deep export and attached to the ZIP Folder Structure file in its root folder. This meta file contains information about the content of the export file, about the included files and about the system version with which it was created (see Meta file with information about the export).
For each application that gets exported the following folder and file structure is created:
-
\Application + [FirstCharacterOfObjectName + LastCharacterOfObjectName + "_" + ObjectID/DateTime]
One folder for each application. This folder contains the export files of the following entities:
- The application itself.
Filename: "Application " + [FirstCharacterOfObjectName + LastCharacterOfObjectName + "_" + ObjectID/DateTime].xml - Dynamic Properties of the application.
Filename: "DynamicProperty " + [FirstCharacterOfObjectName + LastCharacterOfObjectName + "_" + ObjectID/DateTime].xml
Example: Application dp_18309
- The application itself.
-
\Component + [FirstCharacterOfObjectName + LastCharacterOfObjectName + "_" + ObjectID/DateTime]
One folder for each component. This folder contains the export files of the following entities:
- The component itself.
Filename: "Component " + [FirstCharacterOfObjectName + LastCharacterOfObjectName + "_" + ObjectID/DateTime].xml - Component Links of the component.
Filename: "ComponentLink " + [FirstCharacterOfObjectName + LastCharacterOfObjectName + "_" + ObjectID/DateTime].xml - Dynamic properties of the component.
Filename: "DynamicProperty " + [FirstCharacterOfObjectName + LastCharacterOfObjectName + "_" + ObjectID/DateTime].xml - Deployment target filters of the component.
Filename: "DeploymentTargetRequirementFilter " + [FirstCharacterOfObjectName + LastCharacterOfObjectName + "_" + ObjectID/DateTime].xml
Example: Component dp_18309
- The component itself.
-
\Workflow + [FirstCharacterOfObjectName + LastCharacterOfObjectName + "_" + ObjectID/DateTime]
One folder for each workflow. This folder contains the export files of the following entities:
- The workflow itself.
Filename: "Workflow " + [FirstCharacterOfObjectName + LastCharacterOfObjectName + "_" + ObjectID/DateTime].xml - The workflow definition.
Filename: "WorkflowDefinition " + [FirstCharacterOfObjectName + LastCharacterOfObjectName + "_" + ObjectID/DateTime].xml - Dynamic properties of the workflow.
Filename: "DynamicProperty " + [FirstCharacterOfObjectName + LastCharacterOfObjectName + "_" + ObjectID/DateTime].xml
Example: Workflow dp_18309
- The workflow itself.
Each single entity export uses the name as identifier of the entity itself and all of its references.
The meta file Export.xml is a XML file that contains relevant data about the export files and consists of three sections (XML elements):
- XML element System: Information about the CDA version the export was created with
- XML element Files: Information about the exported files including their relative paths, listed in the order in which they must be imported.
- XML element ExportContext: Information about the main entities that of the export file
System:
-
SystemVersion
Version number of theCDA with which the export file was generated.
For example: 9.0Type: String
Files
-
file
Relative path and file name
Type: String
ExportContext:
The context information belongs to the main entities (currently applications only) for which the export was done. For each application the XML element ExportContext is written to the file:
-
mainType
Maintype of the entity: Application
Type: String
-
name
Optional name of the component, must be set for mainType='Component'
Type: String
-
description (optional)
Description of the entity (optional)
Type: String
-
createdOn
Timestamp of the entities creation
Type: ISO-8601 date/time
-
createdBy
Standard username of the user who created the entity
Type: String
-
lastModifiedOn
Timestamp of the entities last modification (optional)
Type: ISO-8601 date/time
-
lastModifiedBy
Standard username of the user who modified the entity the last time (optional)
Type: String
Example
Example of a deep export meta file:
<?xml version="1.0" encoding="utf-8"?> <DeepExport> <System> <!-- Application version with which the export was created --> <SystemVersion>3.5.168.20601</SystemVersion> </System> <Files> <!-- List of all files in the order they need to be imported --> <File>\Application App1\Application Export Application.xml</File> <File>\Application App1\Component Database\Component Database.xml</File> <File>\Application App1\Component Database\Component Web App.xml</File> </Files> <ExportContext> <!-- List of all entities the export was performed for. --> <Entities> <Entity> <mainType>Application</mainType> <name>Export Application</name> <description>Some additional description</description> <createdOn>2012-12-06T11:18:50.4790453+01:00</createdOn> <createdBy>2000/API/API</createdBy> <lastModifiedOn>2012-12-06T14:14:05.4790453+01:00</lastModifiedOn> <lastModifiedBy>2000/API/API</lastModifiedBy> </Entity> </Entities> </ExportContext> </DeepExport>
See also:
- Export - of a single entity
- DeepExport - for the equivalent web service request