Export
This method can be used to export entities into a file.
Syntax
Importexportcli.exe export -con <ARA-url> -usr <user> -pwd <password> -format <xml> -fi <file> [-mt <maintype>] [-properties “<list of properties>” [-where <matches>] [-failonerror]
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: Name of the main type you want to export
Can be one of the following:
- Application
- ApprovalRequest
- ApprovalRule
- ApprovalRuleCondition
- Artifact
- ArtifactComponentRelation
- ArtifactSource
- Component
- ComponentLink
- Credential
- DeploymentProfile
- DeploymentProfileComponentLink
- DeploymentProfileQueueRelation
- DeploymentProfileTarget
- DeploymentTarget
- DeploymentTargetSnapshot
- DeploymentTargetSnapshotReport
- Environment
- EnvironmentDeploymentTargetRelation
- EnvironmentSnapshot
- EnvironmentSnapshotReport
- Execution
- ExecutionReport
- ExecutionTemplate
- InstalledPackageComponent
- LoginObject
- Package
- PackageComponentRelation
- PackageContentEntry
- PackageDependency
- PackageStateChangeEvent
- Queue
- QueueRun
- Reservation
- ReservationProfileRelation
- ReservationTeamMember
- User
- UserUserGroupRelation
- Workflow
- WorkflowDefinition
- -ct: Name of the custom type you want to export
Note: If the parameter is not set, all custom types of the given main type 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 filename is in the format <maintype>.< format> (for example, Package.xml)
- 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: Number of the first entity to be exported
Note: Entities are sorted by their internal ID.
- -count: Number of entities to be exported
Important! You can use this parameter only together with
-begin
- -format: Format to export to
See Serialization.
- -properties: Comma separated list of properties (enclosed with " "- double quotes) which should be exported. Per default all properties of the given entity are exported.
Note: When specifying properties which only exist in some custom types, an empty value for those entities which do not hold this property is returned.
- -startdate: Export all data which was created or changed since this date ( =). 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 ( ). 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. E.g. 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.
Notes:
- 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.
- 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).
See also:
- CA Automic Community: How to export an Application without any additional information.
- 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.