When you use Sequin, Postgres contains all your API data at rest. In contrast, events are your data in motion. You can subscribe to events in order to trigger workflows or upsert data into your application tables. You can even use events to sync data to MySQL or other destinations not yet supported by Sequin
sync_1a107d79
:
collection
: a unique slug assigned by Sequin. This is the name of the API object, like a Stripe subscription
or a Salesforce contact
.created_at
: The time the event was created (and inserted into the event stream).data
: All the fields of the API object. Fields are transformed to match their representation in your database. For example, if you’ve mapped the field LastName
to last_name
in your database, it will be last_name
in the event as well.event
: Either inserted
, updated
, or deleted
.id
: The ID of the record, as assigned by the API.task
: The name of the destination table for this collection in your database.data
in a deleted event contains the entire deleted record.
An updated event looks like this:
changes
property. changes
contains the prior values of all columns that were changed. In the example above, activity_date
was changed from "2023-08-30"
to "2023-09-12"
. Because description
was not changed, it does not appear in the changes
object.
GET
or POST
request to fetch a page of events.
There’s just one endpoint:
GET /fetch
GET /consume/{{consumer_group}}/{{instance_id}}/{{topic}}?timeout={{timeout}}
[GET | POST] /consume/{{consumer_group}}/${{instance_id}}
consumer_group
is the name of the consumer group while instance_id
is used to identify Kafka consumer instances in the same consumer group.
Here’s an example of consuming from a single topic: