Versions Compared

Key

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


Page Properties
hiddentrue
idDONE

Product Version
Report Note
AssigneeAntje

Resources & Remarks

Modification History

NameDateProduct VersionAction
Antje22 NOV 20222022 Winterpage created


...

As of Version2022 Winter
HTTP MethodPOST
Response FormatJSON
Description


Excerpt

A webhook of this type can be triggered by a request for retrieval of a binary content file or a rendition.


The original body that is available at the webhook entry point is an object list containing the object for which the content/rendition should be retrieved and the corresponding options properties should be retrieved.

Requirements for External Endpoint

The target URL must be a POST endpoint accepting and returning a list of objects. The following responses are expected:

  • Return HTTP status code 200 to continue with the content/rendition retrieval. Changes in the body introduced within the webhook are ignored.
  • Return any HTTP status code 404 indicating an error (400...599) and a properly formatted error message structure in the body to prohibit the content/rendition retrieval. This HTTP status code and your custom error message Your error structure will finally be presented as response of the originally called endpoint with HTTP status code 404.
  • If your webhook returns any other HTTP status code or if the error message an error structure that does not match the expected format, the content retrieval fails with HTTP status code 422. The webhook error message provided by the webhook is wrapped to match our formatas plain text.

>> Error handling

Affected API Requests and Action Codes/History Codes



Called by Service

REPOSITORY serviceAPI Gateway service

HeaderAuthorization-Header
Example Request Body


Code Block
languageyml
{
    "objects": [
        {
            "properties": {
                "system:objectId": {
                    "value": "27602f73-7e3f-4013-babb-10a4dc042ff0"
                },
                "system:baseTypeId": {
                    "value": "system:document"
                },
                "system:objectTypeId": {
                    "value": "document"
                },
                "system:createdBy": {
                    "value": "275c826c-6a61-4e89-9512-8d935a1631e5"
                },
                "system:creationDate": {
                    "value": "object"2021-05-22T00:09:05.400Z"
                },
      "label          "system:lastModifiedBy": {
                    "value": "Label"275c826c-6a61-4e89-9512-8d935a1631e5"
                },
           "subentitaet     "system:lastModificationDate": {
                    "value": "Sub"
2021-05-22T00:09:05.400Z"
                },
                "system:versionNumber": {
                    "value": 1
                },
         "idn       "system:tenant": {
                    "value": "6754"default"
                },
      "titel          "system:traceId": {
                    "value": "Titelf08d5290e5a81753"
                },
                "medientyptestString": {
                    "value": "Cooltest filename"import"
                }
            },
            "contentStreams": [
                {
                    "contentStreamId": "EBC1760B-BA91-11EB-8277-D1DE73C78E3D",
        "cid            "archivePath": "cid_63apple",default/DOCUMENT/BC/17/6/",
                    "length": 431397,
                    "mimeType": "applicationmessage/pdfrfc822",
                    "fileName": "content.eml",
                    "digest": "11857B6FAD61E41AFB3E7398BA1BA4BFB6B0A5422762FF41A0907BC0BFF7748F",
                    "repositoryId": "document01.pdfrepo242"
                }
            ],
            "options": {
                "action": 400,
                "detail": "DOCUMENT_ACCESSED",
                "tenant": "default",
                "system:hook:type": "dms.request.objects.contents",
                "system:request:method": "tenant1GET"
            }
        }
    ]
}


Example Predicate

The configured webhook will be triggered for each retrieval of a PDF rendition.

spel:options!=null && options['action']>402 && "2".equals(''+options['subaction'])