FAQs
Have more questions about using Webhooks? This page provides answers to some of the commonly asked questions related to Webhooks.
For how long are AppDirect webhooks retained?
AppDirect webhook events are retained for a maximum of 90 days after creation. Webhooks are stored in a dedicated database, which allows for features such as event logs and automated and manual retries.
What is the timeout for webhook endpoints?
Webhook endpoint listeners have a maximum of 30 seconds to reply with an HTTP 200 OK status.
What are some reasons why a webhook is considered to have failed?
A Webhooks is considered to have failed for any of the following reasons:
- The webhook endpoint returned an HTTP code that is not in the 2XX range.
- The webhook endpoint is configured with OAuth2 credentials, but the OAuth2 handshake resulted in an error.
- The webhook endpoint did not respond within the maximum timeout of 30 seconds.
About webhooks retry mechanism and policy
There are different reasons why a webhook may fail to be delivered to the configured endpoints. These can include network problems, bugs, an unavailable webhook listener, or misconfiguration. AppDirect webhooks are designed to handle such situations.If the delivery of a webhook fails for any reason, an automatic retry mechanism will take over and retry and follow our retry policy to resend the webhook.
The retry policy is based on an exponential backoff strategy. The automatic retry mechanism will continue until the webhook is delivered or the number of automatic retry attempts exceeds the limit specified in the policy. The policy specifies the frequency and timing of automatic attempts, with a total of 11 planned attempts including the original one.
Attempt | Time until next attempt | Time since first attempt |
---|---|---|
Initial attempt | 5 minutes | 0 minutes |
1st retry | 10 minutes | 5 minutes |
2nd retry | 20 minutes | 15 minutes |
3rd retry | 40 minutes | 35 minutes |
4th retry | 1 hour | 1 hour 15 minutes |
5th retry | 2 hours | 2 hours 15 minutes |
6th retry | 12 hours | 4 hours 15 minutes |
7th retry | 1 day | 16 hours 15 minutes |
8th retry | 1 day | 1 day 16 hours 15 minutes |
9th retry | 1 day | 2 days 16 hours 15 minutes |
10th retry | None | 3 days 16 hours 15 minutes |
You can also manually retry webhooks. In the event log table, click the retry button for the webhook you want to retry. Manual retries are not counted as part of the automatic retry mechanism. They will only impact the automatic retry schedule if the attempt is successful, in which case the automatic retries are stopped. To trigger a retry manually, the webhook must conform to our retention policy and should have failed previously.
How does the AppDirect platform ensure that dependent webhooks are delivered in the correct order?
The AppDirect platform ensures that webhooks are delivered in the correct order by leveraging capabilities of the internal event streaming platform and the explicit webhook dependency detection mechanism that is at the implementation's core.
A webhook is considered to depend on another webhook if it refers to the same resource (resource type and resource identifier) and is sent to the same endpoint. Dependencies are only considered if the original webhook has not been delivered. In this case, any dependent webhook is not sent until after the original webhook has been properly delivered or the original webhook exceeds the retention policy. For example, a USER changed notification is only sent after the notification for USER added for a particular user.
Dependencies can also be grouped. For instance, multiple USER-changed notifications are grouped in the order they were created. For the optimal use of dependencies, it is recommended to create a single webhook configuration for all the actions of a resource type.
What are some best practices for managing Webhooks?
Webhook endpoints should be configured in such a way that responses are received as quickly as possible with a 2XX status code. If more time is needed to process a request, it should be done asynchronously after a response has been returned.
Was this page helpful?
Tell us more…
Help us improve our content. Responses are anonymous.
Thanks
We appreciate your feedback!