Update contents of a content library media file
Use this interface to update the contents of a content library media file.
REQUEST NOTE: Because the payload accepts binary content, the entire content of the existing media file will be replaced with the content provided in the request payload.
Service URL:
/rest/api/v1.3/clItems/{itemPath}
Required Path Parameter:
itemPath
Request Method:
POST
Request Header:
Authorization=<AUTH_TOKEN>
Content-Type=application/json
Sample Request JSON Body:
{
"itemPath": "/contentlibrary/abn/testcreate.png",
"itemData": "<base64 encoded binary string>"
}
REQUEST NOTE: Ensure that the itemData value is a base64-encoded binary string with no extraneous hidden characters. When the itemData value contains hidden characters, such as such as carriage returns or line feeds, the response returns an HTTP code of 500 and the error details return only an ID number.
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/testcreate_50.png",
"itemData": null,
"links": [
{
"rel": "self",
"href": "/rest/api/v1.3/clItems/contentlibrary/abn/testcreate_50.png",
"method": "POST"
},
{
"rel": "getContentLibraryItem",
"href": "/rest/api/v1.3/clItems/contentlibrary/abn/testcreate_50.png",
"method": "GET"
},
{
"rel": "deleteContentLibraryItem",
"href": "/rest/api/v1.3/clItems/contentlibrary/abn/testcreate_50.png",
"method": "DELETE"
},
{
"rel": "createContentLibraryItem",
"href": "/rest/api/v1.3/clItems",
"method": "POST"
}
]
}
Sample Response in case of failure:
{
"type": "",
"title": "Invalid request parameters",
"errorCode": "INVALID_PARAMETER",
"detail": "Item Path in the URI does not match Item Path in the request payload",
"errorDetails": []
}