Webhook Notifications

When quiesce mode or a migration action is completed, a webhook event with the migration status is sent to the registered webhook clients. The following webhook 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 the core Elasticsearch indices.
migration:reindex:​analyticsandlogs:completed This event is started after re-indexing the logs and events Elasticsearch indices.
migration:transform:​assets:competed This event is started after all the migration handlers for asset transformation is finished running.

The create, read, update, and delete (CRUD) operations on webhooks, can be performed using the API Gateway webhook API. The operations of the webhook APIs are as follows:

Create Webhook

You can use the following request 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 request 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 registered for.
active Specifies whether this webhook is active or not. The default value is false.

Update Webhook

You can use the following request 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 request to retrieve the webhook with a specific id.
GET /rest/apigateway/wehooks/{id}

You can use the following request to retrieve all the defined webhooks from API Gateway.

GET /rest/apigateway/wehooks

Delete Webhook

You can use the following request to delete the webhook with a specific id.
DELETE /rest/apigateway/wehooks/{id}