Webhooks
Learn about how you can utilize Hop webhooks in your applications to be notified of events in your project.
Webhook Basics
Creating Webhooks
You can create a webhook within our console or through our SDK
Editing a Webhook
After creating a webhook, you can edit the events and endpoint that the webhook is associated with. Please refer to the Events section for more information on the events that you can listen to.
Regenerating Webhook Secret
You can regenerate the secret associated with a webhook. This will invalidate the previous secret, and you will need to update your application to use the new secret in order to correctly verify the webhook payload.
Deleting a Webhook
After creating a webhook, you can delete it at any time. This will instantly invalidate the webhook, and Hop will no longer send any requests to the endpoint associated with the webhook.
Webhook Payload
Request Headers
With every webhook request sent to your endpoint, Hop will include a signature header. This will help you verify that the request is coming from Hop, and not a malicious/third-party source.
Header Example:
Request Body
When an event occurrs that the webhook is listening to, Hop will send a POST request to the endpoint you specified when creating the webhook. The request body will contain a JSON object.
Body Example:
Verify Webhook Payload
To verify the webhook payload to ensure that it is coming from Hop, we provide a utility function in the @onehop/js SDK.
Similar to the Stripe SDK, you can also construct an event to get type safe access to the webhook payload.
Example
For a full example using express - see here
Events
Ignite
ID | Name |
---|---|
ignite.deployment.created | Deployment Created |
ignite.deployment.updated | Deployment Updated |
ignite.deployment.deleted | Deployment Deleted |
ignite.deployment.build.created | Build Created |
ignite.deployment.build.started | Build Started |
ignite.deployment.build.updated | Build Updated |
ignite.deployment.rollout.created | Rollout Created |
ignite.deployment.rollout.updated | Rollout Updated |
ignite.deployment.container.created | Container Created |
ignite.deployment.container.updated | Container Updated |
ignite.deployment.container.metrics_update | Container Metrics Update |
ignite.deployment.container.deleted | Container Deleted |
ignite.deployment.healthcheck.created | Healthcheck Created |
ignite.deployment.healthcheck.updated | Healthcheck Updated |
ignite.deployment.healthcheck.deleted | Healthcheck Deleted |
ignite.deployment.healthcheck.events.failed | Healthcheck Events Failed |
ignite.deployment.healthcheck.events.succeeded | Healthcheck Events Succeeded |
ignite.deployment.gateway.created | Gateway Created |
ignite.deployment.gateway.updated | Gateway Updated |
ignite.deployment.gateway.deleted | Gateway Deleted |
Project
ID | Name |
---|---|
project.updated | Updated |
project.member.created | Member Created |
project.member.updated | Member Updated |
project.member.deleted | Member Deleted |
project.tokens.created | Token Created |
project.tokens.deleted | Token Deleted |
project.secrets.created | Secret Created |
project.secrets.updated | Secret Updated |
project.secrets.deleted | Secret Deleted |
project.finance.transaction | Finance Transaction |