Hi, I have a webhook created in Heretto and want to recieve and process that in AEM, How can I achieve this?
I think I have to create a API in AEM to listen to the Webhook created in Heretto but Do we have any documentation on how to write and where to write a API in AEM that can listen for the payload from Heretto.
Thanks,
Tarini
Solved! Go to Solution.
Views
Replies
Total Likes
That would be a custom implementation but you can refer this to understand how the callabacks can be implemented for a webhook in general- [0]. But if you want scalable solution go for Adobe I/O based implementation - [1]. Sample code - [2].
[0]- https://help.smartling.com/hc/en-us/articles/1260805504109-Webhooks-and-Callbacks
[2]- https://github.com/AdobeDocs/adobeio-codelabs-custom-events
Depending upon what operations your webhook doing, you need to a design a singleton controller for all incoming Heretto requests (a filter class would be best, but you can opt servlet as well). Now coming to the communication contract- your webhook may need a context identifier say request id which the AEM controller must pass back to Heretto while replying along with other response data (e.g status). For AEM operations try to use OOTB endpoints and other APIs like Assets API as much as possible than creating custom servlets. You also need to decide on the Authentication mechanism between requests e.g. OAuth2, Token etc.
But if you want scalable solution go for Adobe I/O based implementation - [0]. Sample code - [1].
[1]- https://github.com/AdobeDocs/adobeio-codelabs-custom-events
Do we have any documentation or some notes I am new to AEM
Thanks for the help
That would be a custom implementation but you can refer this to understand how the callabacks can be implemented for a webhook in general- [0]. But if you want scalable solution go for Adobe I/O based implementation - [1]. Sample code - [2].
[0]- https://help.smartling.com/hc/en-us/articles/1260805504109-Webhooks-and-Callbacks
[2]- https://github.com/AdobeDocs/adobeio-codelabs-custom-events
you can check the Adobe IO.
https://developer.adobe.com/events/docs/guides/using/custom_events/
Not sure if this helps or not.