POST /api/dms/objects/{objectId}/contents/file

As of Versionproduct version 1.0 | component version 1.0
Request MethodPOST
Response FormatJSON
Required Permissionaction 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.

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

Content-Type: application/octet-stream. Any content-type is accepted.

Content-Disposition: attachment; filename=<filename>filename*=<filename-encoded>. To set the filename of the new content file. The parameters "filename" and "filename*" differ only in that "filename*" uses the encoding defined in RFC 5987. When both "filename" and "filename*" are present in a single header field value, "filename*" is preferred over "filename".

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"
                    }
                }
            ]
        }
    ]
}