POST /api/dms/objects/{objectId}/contents/file
As of Version | product version 1.0 | component version 1.0 |
---|---|
Request Method | POST |
Response Format | JSON |
Required Permission | action write >> Roles and Role Sets |
Description | To update the content file of a DMS object, send the request with the new content file as binary in the request body and the ID of the DMS object as objectId. A new object version will be created. The The new binary content file is stored in the repository specified in the X-OS-REPOSITORY-ID request header. If the header is missing, the default repository is used that is configured in the application-storage.yml configuration file. If tags are assigned to the object, they will be reassigned to the new object version only if they are specified as resistant tags. |
Request Header |
|
Request Example | The new content file is passed as binary in the request body. |
Result Example | The result is a JSON structure containing the the updated metadata of the object identified by objectId. { "objects": [ { "properties": { "system:objectId": { "value": "6200fcc9-d6b4-43c0-82e7-ac1ed2fa8350" }, "system:baseTypeId": { "value": "system:document" }, "system:objectTypeId": { "value": "document" }, "system:secondaryObjectTypeIds": { "value": [ "system:rmDestructionRetention" ] }, "system:createdBy": { "value": "root" }, "system:creationDate": { "value": "2018-09-10T14:35:36.657Z" }, "system:lastModifiedBy": { "value": "root" }, "system:lastModificationDate": { "value": "2018-09-10T15:03:17.099Z" }, "system:versionNumber": { "value": 3 }, "system:tenant": { "value": "default" }, "system:traceId": { "value": "-7589750308987031207" }, "system:contentStreamLength": { "value": 3726 }, "enaio:contentStreamMimeType": { "value": "message/rfc822" }, "system:contentStreamFileName": { "value": "upload.bin" }, "system:contentStreamId": { "value": "A5CC29D5-B50A-11E8-882D-F90E0E895BD7" }, "system:contentStreamRepositoryId": { "value": "repo242" }, "system:digest": { "value": "4163C826122B64A199D270998C11176F7B8CF3FD71CD4B7C234448740F360CF0" }, "Name": { "value": "Menschenskinder" } }, "contentStreams": [ { "length": 3726, "mimeType": "message/rfc822", "fileName": "upload.bin", "digest": "4163C826122B64A199D270998C11176F7B8CF3FD71CD4B7C234448740F360CF0", "contentStreamId": "A5CC29D5-B50A-11E8-882D-F90E0E895BD7", "repositoryId": "repo242" } ], "renditions": [ { "mimeType": "text/plain", "kind": "text", "contentStream": { "length": 445, "mimeType": "text/plain", "fileName": "content.txt" } } ] } ] } |