7.2

Table Of Contents
Example: JSON Output
The following example lists all packages within the content service.
{
"links": [
],
"content": [
{
"@type": "Package",
"createdDate": "2015-08-04T22:22:53.490Z",
"lastUpdated": "2015-08-04T22:22:53.490Z",
"version": 0,
"id": "54f627bb-2277-48af-9fa0-7d7366b498f3",
"name": "Demo Package",
"description": "Package for demo purposes",
"contents": [
"9b348c29-88ff-4fa8-b93e-f80bc7c3e723"
],
"tenantId": "qe",
"subTenantId": null
}
],
"metadata": {
"size": 20,
"totalElements": 1,
"totalPages": 1,
"number": 1,
"offset": 0
}
}
Syntax for Exporting a Package
You can use the REST API content management service to export a package containing content as a .zip le.
Input
The query URL for the export command must specify the ID of the package to export.
Table 317. Export Query URL Parameters
Name Description Type
id The identier of the package Path
secureValueFormat The format in which secure values should be sent. This
parameter is optional and defaults to "BLANKOUT".
Query
Output
The output of this command is a .zip le.
Example Curl Command
$curl --insecure -s -H "Accept: application/zip" -H "Authorization: Bearer $token"
https://$host/content-management-service/api/packages/54f627bb-2277-48af-9fa0-7d7366b498f3-o
package.zip
Chapter 3 REST API Use Cases
VMware, Inc. 347