Event Hooks are outbound calls from Kong Gateway.
With Event Hooks, Kong Gateway can communicate with target services or resources, letting the target know that an event was triggered.
For the OAS Validation plugin, Event Hook events can be enabled when a validation fails for:
- All request parameters, including: URI, header, query parameters, and request body
- The response body from the upstream service
To configure an Event Hook for the OAS Validation plugin, you’ll need to pass the following parameters:
|
Event Hook Parameter
|
Value
|
source
|
oas-validation
|
event
|
validation-failed
|
handler
|
webhook
|
on_change
|
true
|
config.url
|
Your webhook URL
|
If validation fails, the webhook URL receives a response with JSON payload, which includes the forwarded IP address, Gateway Service and Consumer information, and the error message.
See the Event Hooks reference for details on how to configure an Event Hook.