A Catalog object includes links that implement copy and move operations for the catalog items it contains.
To copy or move a catalog item from a source catalog to a target catalog, POST a CopyOrMoveCatalogItemParams element that contains a reference to the catalog item to move to the copy or move link of the target catalog.
Prerequisites
-
This operation requires the rights included in the predefined Catalog Author role or an equivalent set of rights.
-
Verify that the target catalog does not have an external subscription.
Procedure
Example: Copy a Catalog Item
This request copies the catalog item shown in Retrieve a Catalog Item to another catalog. The response is a Task.
Request:
POST https://vcloud.example.com/api/catalog/44/action/copy Content-Type: application/vnd.vmware.vcloud.copyOrMoveCatalogItemParams+xml ... <?xml version="1.0" encoding="UTF-8"?> <CopyOrMoveCatalogItemParams xmlns="http://www.vmware.com/vcloud/v1.5" name="Ubuntu 10.04 Template"> <Description>Reference copy of Ubuntu FTP Server</Description> <Source href="https://vcloud.example.com/api/catalogItem/221" /> </CopyOrMoveCatalogItemParams>
Response:
202 Accepted Content-Type: application/vnd.vmware.vcloud.task+xml ... <Task ... operation="Copying Virtual Application Template Ubuntu 10.04 Template" ...> ... </Task>