Versions Compared

Key

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

...

As of Version2019 Winter
HTTP MethodPOST
Response FormatJSON
Description


Excerpt

Delivers a list of predicate-matching objects to a secondary recipient.

Any request returning an object list triggers this webhook directly before the return. Applies whenever object lists are part of the HTTP response:

  • Search queries
  • Object Iiports
  • Object GETs
  • Object metadata updates
  • Moving content


Thus, for example, properties can be extracted in order to hide them for individual users.

The body contains the object list that will be returned. In most cases, this list is of length 1. Only for the search endpoint, there are also numItemshasMoreItems and totalNumItems. The body is modified by the webhook and returned afterwards.

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

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 (since 2021 Summer)
POST /api/dms/objects/{objectId}/versions/{versionNr}/actions/restore (as of 2022 Spring)325 - OBJECT_RESTORED_FROM_VERSION
POST /api/dms/objects/tags/{name}/state/{state}?query=<SQL>110 - OBJECT_TAG_CREATED
310 - OBJECT_TAG_UPDATED
DELETE /api/dms/objects/{objectId}/tags/{name}210 - OBJECT_TAG_DELETED
POST /api/dms/objects/{objectId}/tags/{name}/state/{state}110 - OBJECT_TAG_CREATED
POST /api/dms/objects/{objectId}/tags/{name}/state/{state}?overwrite=true310 - OBJECT_TAG_UPDATED
POST /api/dms/objects/{objectId}/actions/move/contents/repositories/{repositoryId}
POST /api/dms/objects/{objectId}/versions/{versionNr}/actions/move/contents/repositories/{repositoryId}
303 - OBJECT_UPDATE_CONTENT_MOVED
POST /api/dms/objects/search-
GET /api/dms/objects/{objectId}-
GET /api/dms/objects/{objectId}/versions-
GET /api/dms/objects/{objectId}/versions/{versionNr}-
DELETE /api/dms/objects/{objectId} (since 2021 summer)

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)

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


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


Code Block
languageyml
{
  "objects" : [ {
    "properties" : {
      "appEmail:subject" : {
        "value" : "any subject"
      },
      "appEmail:to" : {
        "value" : [ "user1@example.de" ]
      }
    }
  }, {
    "properties" : {
      "appEmail:subject" : {
        "value" : "another subject"
      },
      "appEmail:to" : {
        "value" : [ "user2@example.de" ]
      }
    }
  } ],
  "numItems" : 2,
  "hasMoreItems" : true,
  "totalNumItems" : 356
}


Example PredicateCheck if the object type is appEmail:email.

spel:'appEmail:email'.equals(options['currentVersion']['properties']['system:objectTypeId']['value'])

...