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



Restart 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'])

...