POST /api/system/apps/{app}/systemhooks

As of Versionproduct version 2022 Summer
Request MethodPOST
Response FormatJSON
Required Permission

available if listed in authorization.accesses in authentication-prod.yml and the specified access condition is matched.

>> AUTHENTICATION Service
Description

Updates the app-specific system hook configuration for the app specified in the request URL.

The content of the app-specific systemHookConfiguration.json configuration file is replaced by the configuration specified in the request body. Its structure is validated and has to match the structure described here. Especially, the type of each defined AMQP hook and webhook has to be valid.
Note: It is not allowed to configure an app-specific webhook with the user.info type.

The configured system hooks are available only for the specified app.
Note: The app-specific system hooks are available only in tenants in which the corresponding app is enabled.

If the specified app does not exist, it is created.

The changes are applied immediately after a successful update of the configuration.

Request HeadersContent-Type: [application/json]
Request Example

/api/system/apps/myapp/systemhooks

{
    "systemhooks": {
        "amqp": [],
        "webhooks": [
            {
                "enable": true,
                "predicate": "spel:T(java.util.List).of(300).contains(options['action'])",
                "type": "dms.request.objects.upsert.storage-before",
                "url": "http://examplewebhook/api/dms/request/objects/update/metadata",
                "useDiscovery": true
            }
        ]
    }
}
Response Example

200 OK