Software AG Products 10.11 | Integrate Software AG Products Using Digital Event Services | webMethods API Gateway Documentation | Upgrading API Gateway | Upgrading | Upgrading API Gateway in Zero Downtime | Webhook Notifications
 
Webhook Notifications
You must perform the operations of the Webhook notifications capability in the old and new instances of API Gateway.
When quiesce mode or a migration action is completed, a webhook event with the status is sent to the subscribed webhook clients. The following events are supported.
Webhook Event
Action
apigateway:API Gateway server:started
This event is started after API Gateway server is up.
migration:clean:
API Datastore:completed
This event is started after the Clean action is completed.
migration:quiesce:
all:completed
This event is started after the quiesce mode for all the requests are completed.
migration:quiesce:
designtime:completed
This event is started after the quiesce mode for designtime requests are completed.
migration:reindex:
core:completed
This event is started after re-indexing of core Elasticsearch indices is completed.
migration:reindex:
logsevents:completed
This event is started after re-indexing of logs and events Elasticsearch indices is completed.
migration:transform:
assets:competed
This event is started after all the migration handlers for asset transformation is completed.
The following REST APIs help to do the CRUD of webhooks in API Gateway.
Create Webhook
You can use the following API to create a webhook.
POST /rest/apigateway/wehooks

{
"config": {
"url": "http://apigatewaymig.free.beeceptor.com/my/api/path/test",
"headers": {"type": "core"},
"username": null,
"password": null,
"truststoreAlias": null
},
"events": [
"migration:reindex:core:completed"
],
"active": true
}
The parameters used in the API are described in the following table:
Parameter
Description
config
Specifies webhook client endpoint configuration details like URL, headers, and so on.
events
Specifies the list of interested events the webhook is subscribed for.
active
Specifies whether this webhook is active or not. Default value is false.
Update Webhook
You can use the following API to update a webhook.
PUT /rest/apigateway/wehooks/{id}

{
"config": {
"url": "http://apigatewaymig.free.beeceptor.com/my/api/path/test",
"headers": {"type": "core"},
"username": null,
"password": null,
"truststoreAlias": null
},
"events": [
"migration:reindex:core:completed"
],
"active": true
}
Retrieve Webhook
You can use the following API to retrieve the webhook for a specific id.
GET /rest/apigateway/wehooks/{id}
You can use the following API to retrieve all the webhooks in the system.
GET /rest/apigateway/wehooks
Delete Webhook
You can use the following API to delete the webhook for a specific id.
DELETE /rest/apigateway/wehooks/{id}