Feature Requests Top-level JSON object in webhook payload

Closed

Currently, the webhook payload is a JSON array at the top level, for reasonable reasons. Unfortunately, for example Grafana OnCall doesn't support that and will fail to parse any webhook that isn't an object at the top level. This is trivial to translate in some sort of middleware service, of course, but then that needs to run somewhere and runs into issues with what infrastructure it should be on in order to work when the shit hits the fan, etc.

So it would be nice to be able to say that the top level payload should be an object. It is still fine if there are multiple events in it, just that instead of [ev1, ev2] we could have something like {"events": [ev1, ev2]} and it could be parsed.

Jakob Borg
Created on May 06, 2024 · Last update on August 17, 2024
2 Comments
Adrien Rey-Jarthon

Thanks for the suggestion, but these are updown-specific webhooks so there's no reason they should be changed (or customizable) to please some tools. That being said if you want to get a document-first JSON webhook structure to hack around this OnCall limitation, without having to proxy it, you may try our Slack compatible integration instead, which will provide Slack format JSON payloads (looks like this https://api.slack.com/messaging/webhooks).

Like   May 06, 2024 21:32
Adrien Rey-Jarthon
Changed status to Closed
Like   Aug 17, 2024 09:43