POST dms.request.objects.upsert.database-before (Webhook)
As of Version | 2021 Autumn | ||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
HTTP Method | POST | ||||||||||||||||||
Response Format | JSON | ||||||||||||||||||
Description | This webhook can be triggered by The webhook receives the completed objects just before they are indexed. This means that the objects are already enriched with system properties and default values (wherever necessary), normalized and validated. In version 2021 Autumn, if there are invalid objects, the entry point of this webhook type is not reached. A validation exception is thrown before. As of version 2021 Winter, the following behavior is implemented:
As of version 2021 Winter: example validation errors that will be included in the 'options' of an invalid object { ... "options": { "action": 300, "detail": "OBJECT_METADATA_CHANGED", "validationErrors": [ { "message": "Illegal property. An object of type 'appEmail:email' cannot have a property named 'decSingle'.", "serviceErrorCode": 2607 }, { "message": "A required property is missing. property='appEmail:from'", "serviceErrorCode": 2300 } ] ... } } The The objects returned by the webhook are normalized and validated again before the interrupted processing chain will be continued. Hence, by means of this webhook, it is not possible to introduce invalid objects into the system. Furthermore, the object list in the original request body cannot be completely overwritten. The following rules apply:
Considering the action code, the webhook might be allowed to change tags. In the audit trail, the tagging-related entry will be the same if the tag modification was specified in the original request or by means of the webhook, e.g.:
| ||||||||||||||||||
Requirements for External Endpoint | The target URL must be a POST endpoint accepting and returning a list of objects. | ||||||||||||||||||
Affected API Requests and Action Codes/History Codes |
| ||||||||||||||||||
Called by Service | REGISTRY service | ||||||||||||||||||
Header | Authorization-Header | ||||||||||||||||||
Example Request Body | { "objects" : [ { "properties" : { "system:objectId" : { "value" : "cdc7095f-a5ce-486d-92a7-6d0955d969ee" }, "system:baseTypeId" : { "value" : "system:document" }, "system:objectTypeId" : { "value" : "smallDocument" }, "system:createdBy" : { "value" : "0d7fd0be-6a0b-4d3b-933c-25e0c4c5d794" }, "system:creationDate" : { "value" : "2021-07-22T15:30:05.020Z" }, "system:lastModifiedBy" : { "value" : "0d7fd0be-6a0b-4d3b-933c-25e0c4c5d794" }, "system:lastModificationDate" : { "value" : "2021-07-22T15:30:21.520Z" }, "system:versionNumber" : { "value" : 2 }, "system:tenant" : { "value" : "tenant1" }, "system:traceId" : { "value" : "97a35859dbb4c435" }, "Name" : { "value" : "exampledocument-without-content after update" } }, "options" : { "action" : 300, "detail" : "OBJECT_METADATA_CHANGED", "tenant" : "tenant1", "user" : "root", "authorities" : [ "YUUVIS_SYSTEM_INTEGRATOR", "YUUVIS_TENANT_ADMIN" ], "inputVersion" : { "properties" : { "system:objectId" : { "value" : "cdc7095f-a5ce-486d-92a7-6d0955d969ee" }, "system:objectTypeId" : { "value" : "smallDocument" }, "Name" : { "value" : "exampledocument-without-content after update" } } }, "currentVersion" : { "properties" : { "system:objectId" : { "value" : "cdc7095f-a5ce-486d-92a7-6d0955d969ee" }, "system:baseTypeId" : { "value" : "system:document" }, "system:objectTypeId" : { "value" : "smallDocument" }, "system:createdBy" : { "value" : "0d7fd0be-6a0b-4d3b-933c-25e0c4c5d794" }, "system:creationDate" : { "value" : "2021-07-22T15:30:05.020Z" }, "system:lastModifiedBy" : { "value" : "0d7fd0be-6a0b-4d3b-933c-25e0c4c5d794" }, "system:lastModificationDate" : { "value" : "2021-07-22T15:30:21.520Z" }, "system:versionNumber" : { "value" : 1 }, "system:tenant" : { "value" : "tenant1" }, "system:traceId" : { "value" : "672c49b7070ebd21" }, "Name" : { "value" : "exampledocument-without-content" } } } } } ] } | ||||||||||||||||||
Example Predicate | Check if the object type is
|