[POST] /{objectId}

[POST] /{objectId}

/api/dms/objects/{objectId}

Description

Update Indexdata and Content

To update a specific DMS object with the given {objectId}, send the request with metadata and optional content as multipart request body.
To change the object's content, add a contentStreams section to its json. The cid property of a contentStreams json object must then be equal to a multipart section of the HTTP request.
The response is a JSON structure containing the entire updated DMS object.
Since Version 4.1.0 it is possible to send enaio server job options within a insert / update request for each dms object to process. With this enaio server job options it is possible to set a object ready for archiving as a example.
Since Version 5.3.0 it is possible to send the internal name as objectTypeId within this endpoint. This make the usage of the endpoint easier within multiple installations.
Since Version 6.5.4 the endpoint return only objectId and objectTypeId in case a DMS object is no longer visible (due to e.g. clauses) after a insert/update.

Moving a object to a new parent (min Version 3.1.0):

To move a DMS object from one location to another this endpoint next to the PATCH-Endpoint can be used. The example "Request Example Moving... to a new location" show which system properties must be set. In system:parentId the object id of the new parent (folder or register) must be inserted. Depending if the currently direct parent is a folder or a register it's object id must be inserted into system:FOLDERID or system:REGISTERID like shown in the example below. For JSON-Structure and Examples please look at the PATCH-Endpoint. It's identical except that here a Multipart request must be used.

Moving a object from the user tray to a fix location (min Version 3.1.0):

Objects from the user tray can be moved to a fix location by only settings the system:parentId to the object id of the new parent (folder or register). It is not possible to move typeless objects to a fix location. This kind of objects must be updated to a fix type in before or in the same request. For JSON-Structure and Examples please look at the PATCH-Endpoint. It's identical except that here a Multipart request must be used.

Updating a typeless object to a typed object (min Version 3.1.0):

The update endpoint can be used to set the type for typeless objects. For this the system property system:objectTypeId must be set to the id of the new object type. Also all required fields must be set within the update request. It is also possible to move the object in the same request to a fix location. In this case the typeless object is first updated to the new type and afterwards moved to the new location. For JSON-Structure and Examples please look at the PATCH-Endpoint. It's identical except that here a Multipart request must be used.

Updating retention date of a document object (since Version 3.1.0):

The retention date can be set / adjusted on document objects by adding the property system:OBJECT_RETENTION_PLANNED with a ISO date without time part (e.g. 2020-12-13).

Moving and Updating a object in one call (since Version 6.5.1):

Moving and updating a DMS object in one call can be made if index data fields, which should be updated, are included in the JSON next to the mandatory informations for moving the DMS object (see section for moving).

It is not possible to move a document that is located in multiple locations and simultaneously update its index data. When a document has multiple locations, either the REGISTERID or the FOLDERID must be provided to specify which location the document is to be moved from. In this case, due to the presence of multiple locations, it is not feasible to update the index data at the same time as the move operation. If the document has only a single location, there is no need to specify either the REGISTERID or FOLDERID, and in this case, both the move and the update of the index data can be performed simultaneously.

Copying an object to a specified location:

To copy a DMS object to a specific location this endpoint next to the PATCH-Endpoint can be used. The example "Request Example Copying an object..." show which system properties must be set. In system:parentId the object id of the parent (folder or register where the copy of the object will be made) must be inserted. If a register or folder is copied, with 'COPYCASCADING' specifies whether objects are copied in a cascading way if they contain sub objects (1) or not (0). For JSON-Structure and Examples please look at the PATCH-Endpoint.

Request
Method

POST

Request optional Query Parameter

  • minimalResponse (Boolean): The response contain for each object only the two properties "system:objectId", "system:objectTypeId". This speed up the endpoint by 30%

Request
Header

Content-Type: multipart/form data

Response
Format

JSON

Minimum Version

3.0.0

Changelog

  • 3.1.0: Insert into UserTray, Moving objects to a new location, typless object to typed objects, setting retention time.

  • 3.2.0: New Query Parameter "minimalResponse".

  • 4.0.2: Server-Option REPLACETABLEFIELDS=1 will be default now like in the enaio AppConnector. This result in replacing all old table fields on update with the new send one instead of appending them.

  • 5.0.0: enaio server job options are available.

  • 5.3.0: Internal name is accepted within the system property "system:objectTypeId"

  • 6.5.4: The endpoint return only objectId and objectTypeId in case a DMS object is no longer visible (due to e.g. clauses) after a insert/update.

Request
Example

The request example represents the complete multipart for the import of an e-mail. In addition to the metadata and the e-mail content, a text rendition is also imported.

POST /api/dms/objects/123546 HTTP/1.1 Accept: application/json, application/*+json Content-Type: multipart/form-data;boundary=Jn3QCX9rHAFQaofW6vsdoz5CsD5_P0PZhH User-Agent: Java/1.8.0_60 Connection: keep-alive Content-Length: 83258 Host: 127.0.0.1:7400 --Jn3QCX9rHAFQaofW6vsdoz5CsD5_P0PZhH Content-Disposition: form-data; name="data" Content-Type: application/json;charset=UTF-8 { "objects": [{ "properties": { "system:objectTypeId": { "value": "262208" }, "from": { "value": "Garco Meissler <garco@example.de>" }, "to": { "value": "Dudreas Annkel <dudreas@example.de>" }, "cc": { "value": "Kruedeas Anger <kruedeas@example.de>" }, "subject": { "value": "Bewerbungsunterlagen" } }, "contentStreams": [{ "mimeType": "message/rfc822", "fileName": "upload.eml", "cid": "cid_63apple" }] }] } --Jn3QCX9rHAFQaofW6vsdoz5CsD5_P0PZhH Content-Disposition: form-data; name="cid_63apple"; filename="upload.eml" Content-ID: cid_63apple Content-Type: message/rfc822 From: Garco Meissler <garco@example.de> To: Dudreas Annkel <dudreas@example.de> Cc: Kruedeas Anger <kruedeas@example.de> Message-ID: <12716821.1.1500391295036.JavaMail.meissler@APGMEISSLER> Subject: =?UTF-8?Q?Bewerbungsunterlagen?= MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_Part_0_16468615.1500391295024" ------=_Part_0_16468615.1500391295024 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy ei= rmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam volu= ptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita k= asd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lore= ... en, no sea takimata sanctus est Lore ------=_Part_0_16468615.1500391295024--

More request
Examples

More request examples can be found in the PATCH-Endpoint documentation. There only the JSON-Payload is mentioned for the request. The JSON-Payload must be inserted into the multipart and is then identical.

Result
Example

See 1.3 Result Format