Create a copy of a content library media file
Use this interface to create a copy of a content library media file.
Service URL:
/rest/api/v1.3/clItems/{destinationItemPath}
Required Path Parameter:
destinationItemPath
Request Method:
PUT
Request Header:
Authorization=<AUTH_TOKEN>
Content-Type=application/json
Sample Request JSON Body:
{
"itemPath": "<sourceItemPath>"
}
Sample Response in case of success:
RESPONSE 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 in case of failure:
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 in case of failure - File type mismatch:
For a request to copy a file 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": []
}