[PATCH] /{objectId}

[PATCH] /{objectId}

/api/dms/objects/{objectId}

Description

Update Indexdata

To update a specific DMS object with the given {objectId}, send the request with the metadata fields. With this endpoint, only metadata can be changed.
Changes are only possible to properties that occur in the request body. Properties that are missing from the request body are not changed by the update. A property value can be removed by sending null as the new value.
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 (since Version 3.1.0):

To move a DMS object from one location to another this endpoint next to the Multipart/POST-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.

Moving a object from the user tray to a fix location (since 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 fixed object type. Updating a typeless object to a fixed type and moving it to a new location can be done in one request if system:parentId and system:objectTypeId are combined.

Updating a typeless object to a typed object (since 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.

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 Multipart/POST-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).

Request
Method

PATCH

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: application/json

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
Update a
object

{ "objects": [{ "properties": { "subject": { "value": null }, "Name": { "value": "Update Email" } } }] }

Request
Example
Moving a
object from a
Register to
a new
location

{ "objects": [{ "properties": { "system:objectTypeId": { "value": "6488100" // Optional: The object type id of the object to move }, "system:parentId": { "value": "83652" // The osId of the new parent object }, "system:parentObjectTypeId": { "value": "6488100" // Optional: The object type id of the new parent object }, "system:REGISTERID": { "value": "83665" // The osId of the current parent } } }] }

Request
Example
Moving a
object from a
Folder to
a new
location

{ "objects": [{ "properties": { "system:objectTypeId": { "value": "6488100" // Optional: The object type id of the object to move }, "system:parentId": { "value": "83652" // The osId of the new parent object }, "system:parentObjectTypeId": { "value": "14" // Optional: The object type id of the new parent object }, "system:FOLDERID": { "value": "83665" // The osId of the current parent } } }] }

Request
Example
Moving a
User- or
Workflowtray
typed object
to a new
location

{ "objects": [{ "properties": { "system:parentId": { "value": "83652" // The osId of the new parent object }, "system:parentObjectTypeId": { "value": "14" // Optional: The object type id of the new parent object } } }] }

Request
Example
Typeless to
Typed

{ "objects": [{ "properties": { "system:objectTypeId": { "value": "196647" }, "Name": { "value": "Update Image" // This is for example a mandatory field of the new object type } } }] }

Request
Example
setting
Retention
Date

{ "objects": [{ "properties": { "system:OBJECT_RETENTION_PLANNED": { "value": "2020-12-31" } } }] }

Request
Example
JSON
setting a
document object
archivable

{ "objects": [{ "options": { "ARCHIVABLE": "1" } }] }

Request
Example
Copying an object to a specified location

{   "objects": [{             "properties": {                 "system:parentId": {                     "value": "40385"                 }             },             "options": {                 "COPYCASCADING": "1"             }   }] }

Result
Example

See 1.3 Result Format