Support for inbound/outbound Webhook API endpoints

Hi All,

From what I understand about Webhooks - they provides way to "call out" to external API's when certain events or triggers happen.

I know the implementation could be specific to the backend implementation i.e. if the backend is built using Java/Spring then it would require using HttpClient library. Or for .NET you can leverage ASP.NET WebHook Receivers [1].

For sending requests to external Webhooks - There are some developer specific configurations which need to be done. For example - which endpoint to call, what payload to send, call timeout, number of retries.

Has anyone exposed webhooks using Apigee?

Thanks!

[1] Scott Hanselman - Introducing ASP.NET WebHooks Receivers - WebHooks made easy - http://www.hanselman.com/blog/IntroducingASPNETWebHooksReceiversWebHooksMadeEasy.aspx

1 3 1,652
3 REPLIES 3

Not applicable

Hi @Vineet Bhatia, awesome question! Nothing official but me and a group of apigeeks experimented with augmenting APIs on a Hackday. Check out this API Proxy. https://github.com/apigee-webhooks/management-api-facade

CC - @Anant Jhingran, @Sanjeev, @Alan Ho, @Alex Koo, @Maruti Chand, @Vinit Mehta, @JennyB, @Sandeep Murusupalli

@Diego Zuluaga Thanks for sharing! Really neat stuff specially the Edge_UI_Mock.png to handle webhook registration.

For outbound webhooks - the backend application we have generates events which can be "hooked up" via publish-subscribe model. Although there is need for "app developer" specific stuff which makes more sense to be in exposed from dev-portal as well, so the developer can use dev-portal to change that.

Inbound webhooks should be easier except need to make sure backend handles idempotent requests.

Not applicable

Very compelling use case. Enabling webhooks when an event occurs and reporting it to specific developer subscribed to that event should be possible with some customization.

The example provided below only considers URL and Verb. However, the use case that I think you're suggesting may require the api key added as a filter:

https://github.com/apigee-webhooks/management-api-facade/blob/master/node/config/webhooks-subscriber...

{
"path" : "/v1/(?:organizations|o)/([A-Za-z0-9\\-\\_]+)/apis/([A-Za-z0-9\\-\\_]+)/revisions/\\d+/deployments",
"description" : "Get all deployment info of sample-api proxy",
"verb" : "GET",
"subscribers" : [
	{
	"filters" : [{ "key" : "YOUR_API_KEY_123456789"}], // <-- This is key to match dev apps to send the event to
	"name" : "Slack Apigee-Webhook",
	"desription" : "Incoming Webhook for apigee-webhook channel",
	"url" : "https://hooks.slack.com/services/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",
	"verb" : "POST",
	"headers" : { "Content-Type" : "application/x-www-form-urlencoded" },
	"qs" : null
	}
]
}
...
}

Therefore, sending webhooks by filtering subscribers with API key should be doable. Managing the webhooks through a management API from Dev Portal too. However, it doesn't exist right now. It'd be a nice feature though.