Introduction
Welcome to day 4 of Convoy Launch week! We are thrilled to unveil On-The-Fly events and Meta events, these features will enrich your webhook experience with Convoy.
In this article, we will delve into how we’ve simplified the integration process with Convoy providing just a single API endpoint to help you get started with sending events. We also added Meta events, a feature that provides you with Webhook notifications for specific events happening within your Convoy project.
Meta Events
Meta events are operational events generated by Convoy for specific activities happening within your Convoy project. This allows you to subscribe and listen for events and perform any action based on these events within your own internal systems, providing a seamless headless experience. Convoy uses webhooks to notify you of these events.
Types of event
At the moment, these are the events we currently support with plans to add some more later in the future.
Event | Description |
---|---|
endpoint.created | An endpoint was created |
endpoint.updated | An endpoint was updated |
endpoint.deleted | An endpoint was deleted |
eventdelivery.success | An event delivery was successful |
eventdelivery.failed | An event delivery failed |
Here’s an example of the sample payload sent with an endpoint.created
event
{
event_type: "endpoint.created",
data: {
uid: "01H3FRSZYKNYWGPVV46RN98PM5",
title: "testes",
status: "active",
secrets: [
{
uid: "01H3FRSZYKNYWGPVV46T42NYA8",
value: "Vuk5LM0uujddIsqO5v_eSuz88",
created_at: "2023-06-21T21:02:19.73106+01:00",
deleted_at: null,
expires_at: null,
updated_at: "2023-06-21T21:02:19.73106+01:00"
}
],
owner_id: "582b0124-b0fe-45e0-9063-86877f797647",
created_at: "2023-06-21T21:02:19.73104+01:00",
deleted_at: null,
project_id: "01H28MWP1TQV5AC5QR54BSX8HJ",
rate_limit: 5000,
target_url: "https://dashboard.getconvoy.io/ingest/GzuS7KiIFPyyFrG5",
updated_at: "2023-06-21T21:02:19.73104+01:00",
description: "testing endpoint",
http_timeout: "10s",
authentication: null,
advanced_signatures: false,
rate_limit_duration: "1m0s"
}
}
Meta events are completely optional and can be turned on under the Project settings page. All you need to do is provide a webhook URL to receive these events, a secret for signing the payload (optional) and the events you would like to subscribe to.
You can also view a list of all your Meta events.
On-The-Fly Events
We received several requests in our community slack, asking if Convoy allowed endpoint information to be specified in the same API call as the event payload. The flow initially looked like this:
With the addition of the On-The-Fly Event API, you can now do all that in one call:
Convoy will implicitly create the endpoint, create the subscription and then dispatch the event. If an endpoint with the same target url already exists, then Convoy will update all other parameters and endpoint configuration with your provided data. This brings flexibility for use cases where endpoint data is expected to change frequently, allowing their workflow to be more efficient. For the subscription, if the subscription config is absent from the request body, default configuration will be applied when the subscription is created newly. If the subscription already exists, the supplied config in the request body will be used as if in an upsert
operation.
This feature enables developers to dynamically define and update endpoint information on the fly, providing greater adaptability in their applications. In a dynamic environment or rapidly evolving system, this feature becomes invaluable. Developers can easily modify endpoint information as needed through a single call, ensuring that the endpoint data in Convoy remains up to date.
What’s Next?
We plan on taking your feedback and improving on all of these features. For example, a future iteration on Meta events is to enable delivery via other channels asides from HTTP such as Pub/Sub platforms like Google Pub/Sub and Amazon SQS.
Stay tuned for more updates. Interested in giving Convoy a go? Join our community slack here and give us feedback!