Webhook expected response time and format

webhooks
(William Dias De Sousa) #1

I have setup a Custom Incident Action button and I’m listening to the data sent by the webhook, but some times my script takes more than 5 seconds to parse the data, so my response to the webhook is delayed. Apparently this causes the webhook to send multiple POST requests, probably assuming that I didn’t receive the data since I didn’t reply accordingly. In some tests I have received up to 12 repeated POST before I decided to shutdown the listener.
What is the expected response time for your webhooks?
And is there a expected format? Do I need to include a particular JSON response, or just reply with a 200 OK?

0 Likes

(John Baldo) #2

Hi William,

We do timeout the webhook request after a certain period of time and then attempt to resend it.

To avoid this problem, we recommend asynchronously processing the webhook by responding right away to acknowledge the request rather than waiting until the webhook is processed.

Thanks for raising this question. We’re looking to fine tune our timeout lengths / retry schemes for webhooks. The Custom Incident Action webhook is special in that it is sent only when a button is pressed.

- John

1 Like

(William Dias De Sousa) #3

Ok, thank you John. What about the expected response, is a 200 OK enough, or do I need to reply with JSON or something else?

0 Likes

(Jade Paoletta) #4

Hi William,

A 200 response should work perfectly.

Let us know if you have any other questions!

1 Like

(system) closed #5

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.

0 Likes