Versions Compared

Key

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

...

As of Version2020 Spring
HTTP MethodPOST
Response FormatJSON
Description


Excerpt

This webhook can be triggered by 

  • an object import,
  • an update of the content,
  • an update or the metadata,
  • or a tag update.


The original body is an object list with the metadata of the import. The metadata are not yet enriched with the system properties that are automatically set by the system. To refer to those properties in a webhook, use POST dms.request.objects.upsert.database-before (Webhook).

The body is modified by the webhook and returned for the resumption of the original process.

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


POST /api/dms/objects/{objectId}100 - OBJECT_CREATED
101 - OBJECT_CREATED_WITH_CONTENT (since 2021 Summer)
POST /api/dms/objects/{objectId}
PATCH /api/dms/objects/{objectId}
300 - OBJECT_METADATA_CHANGED
POST /api/dms/objects/{objectId}/contents/file301 - OBJECT_DOCUMENT_CHANGED
POST /api/dms/objects/tags/{name}/state/{state}?query=<SQL>110 - OBJECT_TAG_CREATED (since 2021 Summer)
310 - OBJECT_TAG_UPDATED (since 2021 Summer)
DELETE /api/dms/objects/{objectId}/tags/{name}210 - OBJECT_TAG_DELETED (since 2021 Summer)
POST /api/dms/objects/{objectId}/tags/{name}/state/{state}110 - OBJECT_TAG_CREATED (since 2021 Summer)
POST /api/dms/objects/{objectId}/tags/{name}/state/{state}?overwrite=true310 - OBJECT_TAG_UPDATED (since 2021 Summer)


Restart Service

Repository service

HeaderAuthorization-Header
Example Request Body


Code Block
languageyml
{
  "objects": [{
    "properties": {
      "system:objectTypeId": {
        "value": "object"
      },
      "label": {
        "value": "Label"
      },
      "subentitaet": {
        "value": "Sub"
      },
      "idn": {
        "value": "6754"
      },
      "titel": {
        "value": "Titel"
      },
      "medientyp": {
        "value": "Cool filename"
      }
  
    },
    "contentStreams": [{
      "cid": "cid_63apple",
      "mimeType": "application/pdf",
      "fileName" : "document01.pdf"
    }]
  }]
}


Example Predicate

Check if there is an object without a contentStream:

spel:contentStreams!=null

...