Webhooks
Appranix provides options to configure webhooks for the three main events such as pre-recovery, post-recovery, and post-reset. Whenever any one of the above events occurs, the URL configured in the webhook is triggered. The webhook call is a post HTTP/HTTPS call. Appranix recommends using HTTPS endpoints to ensure secure communication.
Steps to configure the webhooks
- Choose the AWS Cloud Assembly and go to the “Resources” tab
- Select “WEBHOOKS” under the “CONFIGURE” option
- Select “ADD WEBHOOK” and provide the Webhook URL and select the type
-
Select the events you want to be notified about. Three types of event triggers are supported by Appranix,
- “Pre-recovery”
- “Post-recovery”
- “Post-reset”
- The webhook configuration can be edited or deleted
- Edit the “Pre-recovery” webhook configuration to choose the “Fail On Error” option to avoid retries for a failed recovery
- If the “Pre-recovery” webhook event fails after three retries, the recovery will be marked as a failure
- In case of an event failure, that particular webhook is re-triggered for a maximum count of three retries, with a one-minute interval
NOTE:
Appranix now supports only the POST method.
For AWS, currently we provide only the following resource types in the JSON payload,
- COMPUTE
- RDS INSTANCE
- RDS CLUSTER
- EIP
- NETWORK INTERFACE
- SUBNET
- VPC
- APPLICATION LOAD BALANCER
- CLASSIC LOAD BALANCER
- NETWORK LOAD BALANCER
- EFS MOUNT TARGET
- NAT GATEWAY
Pre-recovery Webhook
Before a recovery is triggered, important details regarding the recovery will be sent as a json payload to the configured url using a POST method.
Request Method: POST
Request content-type: application/json
Expected Response Status Code: 200
Sample Pre-recovery Webhook Request Payload,
{ "recoveryId":"23712792:o23712792ac-xxxxxxx", "recoveryName":"test-recovery", "recoveryUser":"user@email.com", "cloudConnectionId":"23712792:o23712792cs-xxxxxx", "cloudConnectionName":"test-connection", "cloudAssemblyName":"test-assembly", "cloudAssemblyId":"23712792:o23712792ac-xxxxxx", "timelineDetails":{ "protectionTimelineId":"23712792:o23712792ci-xxxxxx", "protectionTimelineTime":"1615632951406", "protectionTimelineTimeZone":"US/Central", "protectionTimelinePolicyName":"test-policy", "protectionTimelinePolicyFrequency":"DAILY" } }
Post-recovery Webhook
After the completion of a recovery, important details regarding the recovery will be sent as a json payload to the configured url using a POST method.
Request Method: POST
Request content-type: application/json
Expected Response Status Code: 200
Sample Post-recovery Webhook Request Payload,
{ "recoveryId":"o23712792ac-xxxxxxx", "recoveryName":"test-recovery", "recoveryUser":"user@email.com", "cloudConnectionId":"23712792:o23712792cs-xxxxxx", "cloudConnectionName":"test-connection", "cloudAssemblyName":"test-assembly", "cloudAssemblyId":"23712792:o23712792ac-xxxxxx", "recoveryStatus":"RECOVERY_COMPLETED", "recoveryDuration":"462363", "recoveryStartTime":”1615632951406”, "recoveryEndTime":"161563998876", "timelineDetails": { "protectionTimelineId":"23712792:o23712792ci-xxxxxx", "protectionTimelineTime":"1615632951406", "protectionTimelineTimeZone":"US/Central", "protectionTimelinePolicyName":"test-policy", "protectionTimelinePolicyFrequency":"DAILY" }, "resourceMapping": { "primaryResourceMetadataPath": "Primary Resource Metadata url path", "recoveredMetadataPath": "Recovered Resource Metadata url path", "sourceRecoveryMappingPath": "Primary and Recovered resources Mapping url path" } }
Json Payload reference for,
Primary Resource Metadata
Recovered Resource Metadata
Primary and Recovered resources Mapping
Post-reset Webhook
After the completion of a reset, important details regarding the recovery and reset will be sent as a json payload to the configured url using a POST method.
Request Method: POST
Request content-type: application/json
Expected Response Status Code: 200
Sample Post-reset Webhook Request Payload,
{ "recoveryId":"o23712792ac-xxxxxxx", "recoveryName":"test-recovery", "cloudConnectionId":"23712792:o23712792cs-xxxxxx", "cloudConnectionName":"test-connection", "cloudAssemblyName":"test-assembly", "cloudAssemblyId":"23712792:o23712792ac-xxxxxx", "resetStatus":"RESET_COMPLETED", "resetUser":"user@email.org" }