Create a copy of a Content Library Media file.

put

/rest/api/v1.3/clItems/{destinationItemPath}

This operation is used to create a copy of a Content Library Media file.

Request

Path Parameters
Body ()
Request Body
Root Schema : copy content document Request
Type: object
Title: copy content document Request
Show Source
Back to Top

Response

Supported Media Types

Default Response

Body ()
Root Schema : Content Library Media Files
Type: object
Title: Content Library Media Files
Show Source
Back to Top

Examples

This interface is used to create a copy of a content library media file.

A successful request requires the following headers:

FIELDS DESCRIPTION
Authorization <AUTH_TOKEN>

Sample Request Body:

{
	"itemPath" : <sourceItemPath>
}

Sample Response : Success

Note: The "itemData" attribute in the response is returned as null always. This is done to avoid returning large binary content in the response.

 {
"itemPath": "/contentlibrary/abn/copiedimage.png",
"itemData": null,
"links": [
{
"rel": "self",
"href": "/rest/api/v1.3/clItems/contentlibrary/abn/copiedimage.png",
"method": "PUT"
},
{
"rel": "getContentLibraryItem",
"href": "/rest/api/v1.3/clItems/contentlibrary/abn/copiedimage.png",
"method": "GET"
},
{
"rel": "deleteContentLibraryItem",
"href": "/rest/api/v1.3/clItems/contentlibrary/abn/copiedimage.png",
"method": "DELETE"
}
]
}
	

Sample Response: Failure - Document Not Found

The system sends the following response when it cannot find the source folder or file or the destination folder:

   {
"type": "",
"title": "Document not found",
"errorCode": "DOCUMENT_NOT_FOUND",
"detail": "Document not found:/contentlibrary/abn/testcreate_50.png",
"errorDetails": []
}
	

Sample Response: Failure - File Type Mismatch

For a request to copy a file named dinoSmall.jpg (source file type JPEG) to /contentlibrary/jmptest/testdocs/copyDinoSmall2.png (destination file type PNG), the system returns the following response:

{
	"type": "",
	"title": "Invalid request parameters",
	"errorCode": "INVALID_PARAMETER",
	"detail": "Invalid destination :/contentlibrary/jmptest/testdocs/copyDinoSmall2.png",
	"errorDetails": []
}
Back to Top