Copy Item Deprecated
Copies a library item. Copying a library item allows a duplicate to be made within the same or different library. The copy occurs by first creating a new library item, whose identifier is returned. The content of the library item is then copied asynchronously. This copy can be tracked as a task.
If the copy fails, Content Library Service will roll back the copy by deleting any content that was already copied, and removing the new library item. A failure during rollback may require manual cleanup by an administrator.
A library item cannot be copied into a subscribed library.
if you do not have all of the privileges described as follows: - The resource com.vmware.content.library.Item referenced by the parameter sourceLibraryItemId requires System.Read. - The resource com.vmware.content.Library referenced by the attribute ItemModel.library-id requires ContentLibrary.AddLibraryItem.
Request
URLURL
Path Parameters
Path Parameters
Identifier of the existing library item from which the content will be copied. The parameter must be an identifier for the resource type: com.vmware.content.library.Item.
Header Parameters
Header Parameters
Required session ID, acquired from Create Session API under CIS product
vmware-api-session-id example
"b00db39f948d13ea1e59b4d6fce56389"
Request Body
This is a request body class for an operation.
{
"destination_create_spec": {}
}
Specification for the new library item to be created.
A unique token generated on the client for each copy request. The token should be a universally unique identifier (UUID), for example: b8a2a2e3-2314-43cd-a871-6ede0f429751. This token can be used to guarantee idempotent copy. If not specified copy is not idempotent.
Authentication
Response
Response BodyResponse Body
The identifier of the new library item into which the content is being copied. The result will be an identifier for the resource type: com.vmware.content.library.Item.
{
"value": "string"
}
The identifier of the new library item into which the content is being copied. The result will be an identifier for the resource type: com.vmware.content.library.Item.
Errors
com.vmware.vapi.std.errors.invalid_argument : if one of the following is true for the new library item: - name is empty - name exceeds 80 characters - description exceeds 2000 characters
if the clientToken does not conform to the UUID format. | com.vmware.vapi.std.errors.invalid_element_type : if the ItemModel.library-id property of destinationCreateSpec refers to a subscribed library. | com.vmware.vapi.std.errors.not_allowed_in_current_state : if the content of the source library item specified by sourceLibraryItemId, or the content of the target library specified by the library ID (see ItemModel.library-id) property of destinationCreateSpec has been deleted from the storage backings (see LibraryModel#storageBackings) associated with it.
com.vmware.vapi.std.errors.not_found : if the library item with sourceLibraryItemId does not exist, or if the library referenced by the ItemModel.library-id property of destinationCreateSpec does not exist.
com.vmware.vapi.std.errors.resource_inaccessible : if the copy operation failed because the source or destination library item is not accessible.
‘Default’ means this response is used for all HTTP codes that are not covered individually for this operation.
Code Samples
cURL Command
Vendor Extensions
x-vmw-doc-new-method: post
x-vmw-doc-new-path: /api/content/library/item/{source_library_item_id}?action=copy
x-vmw-doc-operation: copy