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.
See also:
- Export - of a single entity
- DeepExport - for the equivalent CLI command
Request
DeepExport
Parameters
- username (String): Name of the user (syntax: system name / client number / user name / department)
Note: When only one client is installed, the system name is optional.
-
password : Password of the user specified in username
Type: string
-
mainType (String): must be
Application
- customType (optional, String): Name of the main type of the entities to export
Important! You can only specify custom types based on the main type Application.
Note: Use this option to export a specific custom type only. If you leave the parameter empty, all custom types are exported.
- begin (optional, Integer): Index of the entity to begin the export from
Note: If not set, the export begins with the first entity (index number of the first entity is 0).
- count (optional, Integer): Number of entities to export
Note: If not set, all entities are exported.
-
startDate (optional, Date): If set, only entities that have been created on that day or after the specified day are considered in the export - otherwise, all entities are considered in the export
-
endDate (optional, Date): If set, only entities that have been created until the specified date are considered in the export - otherwise, all entities are considered in the export
- conditions (optional, List): List of conditions to restrict the export
Important! You can only specify conditions to filter entities of the main type Application. You cannot set conditions for subordinate entities (for example, workflows).
You can use a string array of conditions to filter the data. The format of a single 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.
Example: system_owner.system_name eq 'Max' will filter all entities of the given main type, that are owned by Max.
For conditions, only properties of directly related entities can be used.
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
- eq: 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.
Notes:
- If multiple conditions are given, all of them are applied (AND)
- 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)
Important! All parameters (for example, startDate or endDate) do affect the selection of the main entities only. They are not applied in the export of their sub entities.
Response
The response contains the result object containing the exported zip file in base64 encoded format. See section Result object on WebService. See:Import/Export Web Service
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>