New report type: webhook #29928
Replies: 2 comments 2 replies
-
Hi @kistoth90 I hope you're doing well. I came across your contribution on GitHub regarding the webhook notification feature within the Superset alerting system. It aligns perfectly with a requirement I'm currently working on, where I need to implement REST API-based alerts in Superset. Specifically, I'm looking for a way to trigger notifications using webhooks when alerts are raised. If it's not too much trouble, could you kindly share the code or provide some guidance on how you implemented this feature? I would really appreciate any advice or example code you could share, as it would be incredibly helpful for my project. Thank you for your time, and I look forward to hearing from you. Regards, |
Beta Was this translation helpful? Give feedback.
-
Seems like a generic webhook approach would enable people to send the reports to whatever final destination they choose. I'd love to see this included in the main branch. |
Beta Was this translation helpful? Give feedback.
-
Hi,
I made some upgrade on the Superset: I add webhook as selectable report type.
By the use of webhook the user can post csv/png/pdf to any endpoint, with some informative parameters as:
For security reasons I made a new optional parameter: WEBHOOK_SECRET. It's a secret string between the Superset and the webhook endpoint. In the case where WEBHOOK_SECRET is filled, Superset adds an "X-Webhook-Signature" parameter to the header of the post call, which hashes the json data to be sent. The receiving party can verify that the party sending the webhook is the real sender by hashing the received json data and comparing it with the sending party's "X-Webhook-Signature" parameter. If the two parameters do not match, the receiving party may reject the call because the sender is not the supposed host.
On the report log, we can get feedback about the successful, and not successful requests as well.
I'm happy to share my code with you guys!
Beta Was this translation helpful? Give feedback.
All reactions