Infrahub support two different types of webhooks:
Standard Webhook
sends event information to an external endpoint.Custom Webhook
allows the ability to tie events to a transformation to configure the payload being sent to an external endpoint.
Managing webhooks
- Via the Web Interface
- Via the GraphQL Interface
- Login to Infrahub's web interface as an administrator.
- Select
Integrations
->Webhooks
. - Click + Add Webhook.
- Fill in the details and click Save.
Creating a new Webhook
In the GraphQL sandbox, execute the following mutation, edit values to be appropriate for your use case:
mutation {
CoreStandardWebhookCreate(
data: {
name: {value: "Ansible EDA"},
description: {value: "Ansible Webhook Reciever"},
branch_scope: {value: "all_branches"},
url: {value: "http://ansible-eda:8080"},
shared_key: {value: "supersecret"}
}) {
object {
display_label
}
}
}