Page Properties | |||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| |||||||||||||||||||||||||||||||
RessourcesEvent = System Hooks What is the difference? RemarksThis tutorial should eventually replace the System Hooks page in this directory, as the content of that page will be moved to a concept page. Information on Configuration in On-Premise systems that should be moved to a different article: Run ConfigurationRunning the Java application to register the service must include a number of parameters to communicate the services' existance and contact information to the Discovery Service. Find the full list of required parameters below:
|
Excerpt |
---|
An example Webhook consumer service set up using Java and Spring Boot. |
...
Code Block | ||
---|---|---|
| ||
@RestController @RequestMapping("/api/dms/request") public class ExampleRestController { @PostMapping(value = "/update/metadata", produces = {"application/json"}) public Map<String, Object> updateDmsObjectMetadata(@RequestBody Map<String, Object> dmsApiObjectList, @RequestHeader(value = "Authorization", required = true) String authorization) { doSomething(dmsApiObjectList, authorization); return dmsApiObjectList; } private void doSomething(Map<String, Object> dmsApiObjectList, String authorization) { // do something with the metadata } } |
Run Configuration
Running the Java application to register the service must include a number of parameters to communicate the services' existance and contact information to the Discovery Service. Find the full list of required parameters below:
...
Configuring the Webhook
To use the webhook service for the intended purpose of intercepting metadata when updating objects, we need to create a new entry in the Webhook list within our systems' SystemHookConfiguration.json file. The url attribute must refer to the webhook service identifier (derived from the artifact ID in the services' maven file) and direct to one of the endpoints declared in the service.
...