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

You can also export a package using the Application Services CLI. See the Using Application Services 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.

Export an Application, Service, or Task Version

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

The application architect and application catalog administrator roles combined can access this API.

HTTP Method

POST

URI Syntax

https://ApplicationServicesServerIP:8443/darwin/api/2.0/exportimport/export

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

Example URI syntax:

https://ApplicationServicesServerIP:8443/darwin/api/2.0/exportimport/export

Request

Table 1. 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"
      }
   ]
}

Response

Table 2. Description for Response Messages

Response Message

Description

result

Shows the Base64 encoded object xml.

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

Import an Application, Service, or Task Version

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

The application architect and application catalog administrator roles combined can access this API.

HTTP Method

POST

URI Syntax

https://ApplicationServicesServerIP:8443/darwin/api/2.0/exportimport/import

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

Example URI syntax:

https://ApplicationServicesServerIP:8443/darwin/api/2.0/exportimport/import

Request

Table 3. 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"
}

Response

{
   "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
      }
   ]
}