Import XaaS Content Example

POST /api/content/bundles imports an XaaS content bundle. You can use the command to import a 6.2.x package into vRealize Automation 7.0.

curl Command

The following command imports a file called XaaSContent.zip.
curl --insecure -X POST -H "Authorization: Bearer $token" -H "Content-Type:multipart/form-data"-F"[email protected]"-F"prefix=prefix_"-F"prefixOnlyConflicting=true"' https://$vRA/advanced-designer-service/api/content/bundles' 

JSON Output

The output of the command is a message indicating the status and details of the import operation.

{
  "importStatus" : "SUCCESSFUL",
  "data" : [ {
    "logLevel" : "INFO",
    "entityType" : "com.vmware.vcac.designer.service.domain.ServiceBlueprint",
    "entityId" : "4740aa54-61e6-47d7-945f-0bb50ff153c8",
    "entityName" : "XaaSBlueprint",
    "messageKey" : "import.blueprint.success",
    "message" : "Success"
  } ]
}

Input

Table 1. XaaS Import Input Parameters
Name Parameter
file Identifies the .zip file that is the content bundle to import.
prefix The prefix to use with imported objects. Ensures avoidance of a duplicate name failure.
prefixOnlyConflicting Set to true to rename or prefix conflicting objects.

Output

The command output contains property names and values based on the command input parameters.

Table 2. Import and Export Response Body Parameters
Parameter Description
importStatus Over all status of the import/validation operation, one failure in import/validation result guarantees failed status. Values are as follows:
  • Successful - Denotes the successful import or validation status at a particular component or package level.
  • Partial - Denotes a scenario that warrants a system level warning. Alerts the user about a possible error condition that the proposed action may create.
  • Failed - Denotes an import or validation failure at a particular component package level.
data Set of collected content import/validation results populated by the provider. The Content import operation result collection is the set of content that passed or failed:
  • entityType - (string) The ID for the entity being imported.
  • entitytId - (string) Unique content ID within the file system.
  • messageKey - (string)
  • logLevel - The logging level to use for any errors that occur.
  • message - Information returned by the provider.
  • entityName - (anyType) Name of the entity being imported.