7.3

Table Of Contents
"lastUpdated": "2015-08-04T20:47:20.308Z",
"version": 0
}
],
"metadata": {
"size": 20,
"totalElements": 2,
"totalPages": 1,
"number": 1,
"offset": 0
}
}
Input
Output
The command output contains property names and values based on the command input parameters.
Create a Package for Export Example
POST /api/packages creates a package for export use.
Creating a Package with Content
n
For import or export purposes you must create a package to contain the desired content.
n
The package is a logical unit that enables you to piece together different content elements.
n
You can add multiple content IDs to the package.
n
Provide the input as an array with comma-separated content IDs.
n
To obtain the IDs of content that is available for export, you use GET /api/contents. See List
Available Content Example.
A package represents an entity that you can export or import via the content management service. A set
of references to the content instances can be bundled together as a package.
curl Command
The following command creates a package named Demo Package with a single content ID of
9b348c29-88ff-4fa8-b93e-f80bc7c3e723.
$curl --insecure -s -H "Content-Type: application/json" -H "Authorization: Bearer $token"
https://$vRA/content-management-service/api/packages -d'{"name" : "Demo Package", "description" :
"Package for demo purposes", "contents" : ["9b348c29-88ff-4fa8-b93e-f80bc7c3e723" ]}'
JSON Output
The JSON output is a URL for the created package.
Programming Guide
VMware, Inc. 355