Export an application, service, or task package to import to a different vCloud Application Director appliance.

You can also export a package using the vCloud Application Director CLI. See the Using vCloud Application Director guide.

Packages that you export using CLI are encoded in the plain text package file and cannot be imported using REST APIs. To import these packages using REST APIs, use an external tool to convert the plain text package file to a Base64 encoded package.

To import packages using REST APIs that were previously exported with the CLI, use an external tool to convert the plain text package file to a Base64 encoded package.

Exports a list of APPLICATION_VERSION, SERVICE_VERSION, or SCRIPT_TASK_VERSION information to import to another vCloud Application Director appliance. The output is Base64 encoded.

The user account with the ROLE_APP_ARCHITECT application architect role and ROLE_CATALOG_ADMIN catalog administrator role can access this API.

POST

https://ApplicationDirectorServerIP:8443/darwin/api/1.0/action/export

You must type the URI syntax because the copy and paste operation removes formatting from the text.

Example URI syntax:

https://ApplicationDirectorServerIP:8443/darwin/api/1.0/action/export
Description for Request Message

Request Message

Description

stripSecuredProperties

Specifies whether to remove the secure properties.

exportRequestParameter

Specifies the object to export.

exportRequestParameter.type

Specifies the types of available export parameters. The valid export parameters are, APPLICATION_VERSION, SERVICE_VERSION, and SCRIPT_TASK_VERSION.

{
   "stripSecuredProperties":true,
   "exportRequestParameter":[
      {
         "name":"dukesbank",
         "major":1,
         "minor":0,
         "micro":0,
         "qualifier":"",
         "type":"APPLICATION_VERSION"
      }
   ]
}
Description for Response Messages

Response Message

Description

result

Shows the Base64 encoded object xml.

{
   "errors":false,
   "messageList":[
   ],
   "result":"UEQ5NGJXd2dkbVZ5YzJsdm...."
}

Imports a package that includes APPLICATION_VERSION, SERVICE_VERSION, or SCRIPT_TASK_VERSION, previously exported from a different vCloud Application Director appliance. The input must be Base64 encoded.

The user account with the ROLE_APP_ARCHITECT application architect role and ROLE_CATALOG_ADMIN catalog administrator role can access this API.

POST

https://ApplicationDirectorServerIP:8443/darwin/api/1.0/action/import

You must type the URI syntax because the copy and paste operation removes formatting from the text.

Example URI syntax:

https://ApplicationDirectorServerIP:8443/darwin/api/1.0/action/import
Description for Request Message

Request Message

Description

exportPackage

Indicates the Base64 encoded object xml.

conflictResolutionAction

Indicates the options for importing the object. The valid import options are, CHECK, SKIP, OVERWRITE, and IMPORTASNEW.

Note

If you use the OVERWRITE option, all of the related services and logical templates are ovewritten. This option also affects other applications that use those services and logical templates.

importAsNewSuffix

Indicates the suffix to add to the object name. Adding a suffix to the object when importing avoids conflict in the repository.

{
   "exportPackage":"UEQ5NGJXd2dkbVZ5YzJsdm....",
   "conflictResolutionAction":"IMPORTASNEW",
   "importAsNewSuffix":"John-test"
}
{
   "errors":false,
   "messageList":[
      {
         "messageType":"INFO",
         "message":"Application saved successfully.",
         "messageKey":null,
         "property":null
      },
      {
         "messageType":"INFO",
         "message":"CentOS56 64bit_John-test:1.0.0",
         "messageKey":"VM_TEMPLATE_VERSION_CREATED",
         "property":null
      },
      {
         "messageType":"INFO",
         "message":"CentOS64_John-test:5.6.0",
         "messageKey":"OS_VERSION_CREATED",
         "property":null
      },
      {
         "messageType":"INFO",
         "message":"Logical VM template saved successfully.",
         "messageKey":null,
         "property":null
      },
      {
         "messageType":"INFO",
         "message":"OS Templates_John-test-SERVER_TYPE",
         "messageKey":"META_TAG_CREATED",
         "property":null
      },
      {
         "messageType":"INFO",
         "message":"Tag saved successfully",
         "messageKey":null,
         "property":null
      },
      {
         "messageType":"INFO",
         "message":"operatingSystem.save.msg",
         "messageKey":null,
         "property":null
      },
      {
         "messageType":"INFO",
         "message":"John_John-test:1.0.0",
         "messageKey":"APPLICATION_VERSION_CREATED",
         "property":null
      },
      {
         "messageType":"INFO",
         "message":"Import succeeded.",
         "messageKey":"IMPORT_SUCCESS",
         "property":null
      }
   ]
}