You can use the REST API content management service to create a package that contains content for export use.

Creating a Package with Content

  • For import or export purposes you must create a package to contain the desired content.

  • The package is a logical unit that enables you to piece together different content elements.

  • You can add multiple content IDs to the package.

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.

Input

Parameter

Description

createdDate

The package creation date.

lastUpdated

The date when the package was last updated.

version

The package version identifier.

tenantId

The ID of the tenant associated with the package. Used to enforce ownership.

subTenantId

(Optional) The ID of the sub tenant or business group associated with the package

id

Specifies the unique identifier for the content. This is also used as a folder name to group similar content artifacts.

name

Specifies the name of a given content type provided in localized message key form.

description

Specifies additional information describing the package.

contents

Collection of references that form the contents of the package.

Output

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

Parameter

Description

createdDate

The package creation date.

lastUpdated

The date when the package was last updated.

version

The package version identifier.

tenantId

The ID of the tenant associated with the package. Used to enforce ownership.

subTenantId

(Optional) The ID of the sub tenant or business group associated with the package

id

Specifies the unique identifier for the content. This is also used as a folder name to group similar content artifacts.

name

Specifies the name of a given content type provided in localized message key form.

description

Specifies additional information describing the package.

contents

Collection of references that form the contents of the package.

Example Curl Command

The following command creates a package named "Demo Package" with a content ID of 9b348c29-88ff-4fa8-b93e-f80bc7c3e723.

$curl --insecure -s -H "Content-Type: application/json" -H "Authorization: Bearer $token" https://$host/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.