Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

As of Version2020 Autumn
HTTP MethodPOST
Response FormatJSON
Description


Excerpt
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 deletion 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)

DELETE /api/dms/objects/{objectId}/versions/{versionNr}220 - VERSION_DELETED (since 2021 Summer)


Restart Called by ServiceAPI-gateway service
HeaderAuthorization-Header
Example Request Body


Code Block
languageyml
titleExample Code
linenumberstrue
{
    "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'])

...