POST dms.response.objects.delete (Webhook)

Please replace the previous denomination (dms.response.delete) with the current denomination (dms.response.objects.delete). The old denomination is deprecated as of version 2021 Summer.

As of Version2020 Autumn
HTTP MethodPOST
Response FormatJSON
Description

This webhook is triggered directly after the successful deletion of a document and after the equivalent AMQP hook, and can for instance inform other systems.

The predicate is applied to every single object in the list. The webhook is triggered for the whole object list as soon as one object satisfies the predicate.

Requirements for External EndpointThe target URL must be a POST endpoint accepting and returning a list of objects.
Affected API Requests and Action Codes/History Codes
DELETE /api/dms/objects/{objectId}

200 - OBJECT_DELETED (the delete request was successful)

201 - OBJECT_CONTENT_DELETED (the object is flagged for delete and the content and the object in the SQL database is deleted, but the deletion in Elasticsearch failed)

202 - OBJECT_FLAGGED_FOR_DELETE (the object is flagged for deletion, which makes it invisible, but it is not actually deleted. If asynchronous deletion is activated in the service configuration, this is the only possible action.)

DELETE /api/dms/objects

200 - OBJECT_DELETED (the delete request was successful. all deletable objects in the batch are deleted)

201 - OBJECT_CONTENT_DELETED (the deletable objects in the batch are flagged for deletion, their contents are deleted and their representations in the SQL database are deleted, but the deletion in Elasticsearch failed)

202 - OBJECT_FLAGGED_FOR_DELETE (the deletable objects in the batch are flagged for deletion, which makes them invisible, but they are not actually deleted. If asynchronous deletion is activated in the service configuration, this is the only possible action.)

Note:

  • In a batch deletion, it is possible that some objects are deletable and others are not due to different reasons (see option system:deletionResult described in the endpoint DELETE /api/dms/objects).
  • During the deletion processing, objects always have the same action value, no matter if they are deletable or not. Consider the action value to decide what should be done with the objects.
  • Successful and failed deletion processing can be distinguished by the option system:deletionResult of each individual DMS object in the batch.
DELETE /api/dms/objects/{objectId}/versions/{versionNr}220 - VERSION_DELETED (since 2021 Summer)
Called by ServiceAPI-gateway service
HeaderAuthorization-Header
Example Request Body
Example Code
{
    "properties": {
        "system:traceId": {
            "value": "0000000000000000"
        },
        "system:objectTypeId": {
            "value": "appTable:order"
        },
        "appTable:ordernumber": {
            "value": 1
        },
        "system:versionNumber": {
            "value": 1
        },
        "appTable:items": {
            "value": [
                [
                    "fruits",
                    10
                ],
                [
                    "milk",
                    1
                ],
                [
                    "sweeties",
                    5
                ]
            ]
        },
        "system:creationDate": {
            "value": "2020-09-17T14:17:31.480Z"
        },
        "system:lastModificationDate": {
            "value": "2020-09-17T14:17:31.480Z"
        },
        "system:baseTypeId": {
            "value": "system:document"
        },
        "system:tenant": {
            "value": "default"
        },
        "appTable:customername": {
            "value": "customer1"
        },
        "system:createdBy": {
            "value": "111c226c-3a44-5e66-7777-8d999a0000e1"
        },
        "system:lastModifiedBy": {
            "value": "222c222c-2c22-2e22-2222-2d222d2222e2"
        },
        "system:objectId": {
            "value": "f4efc4e4-1234-4321-4f74-4de4ff34f744"
        }
    },
    "contentStreams": [
        {
            "contentStreamId": "0AB98765-CDEF-4321-ABCD-098EF76AB543",
            "archivePath": "default/DOCUMENT/12/34/5/",
            "length": 9000003,
            "mimeType": "image/jpg",
            "digest": "1234567812345678123456781234567812345678123456781234567812345678",
            "repositoryId": "repo002"
        }
    ],
    "options": {
        "action": 200,
        "detail": "OBJECT_DELETED"
    }
}
Example PredicateCheck if the object type is appTable:order:

spel:'appTable:order'.equals(options['currentVersion']['properties']['system:objectTypeId']['value'])