Query
Search indexed binlog changes by server, table, event type, and time range
Search the indexed binlog changes for a specific server. Requires the query:execute permission.
Endpoint
| Method | Endpoint | Permission | Description |
|---|---|---|---|
POST | /query | query:execute | Search indexed binlog changes |
Request body
{
"server_id": "uuid",
"schema": "mydb",
"table": "orders",
"event_type": "DELETE",
"since": "2026-03-01T00:00:00Z",
"until": "2026-03-02T00:00:00Z",
"limit": 100
}| Field | Required | Description |
|---|---|---|
server_id | yes | Server to query |
schema | yes | Database schema name |
table | yes | Table name |
event_type | no | INSERT, UPDATE, or DELETE |
since / until | no | Time range (ISO 8601) |
limit | no | Max results (1–1000, default: 100) |
Response
{
"success": true,
"events": [
{
"event_id": "12345",
"binlog_file": "mysql-bin.000042",
"timestamp": "2026-03-01 13:15:42",
"event_type": "DELETE",
"schema": "mydb",
"table": "orders",
"primary_key": {"id": 12345},
"before": {"id": 12345, "status": "active", "amount": 99.99},
"after": null
}
],
"total_count": 1,
"has_more": false
}Access rule redaction
Query results are subject to access rules. If the requesting user's role has column restrictions for the queried table, unauthorized columns are stripped from before and after images. If the role has no access to the table, the request returns 403.
Before/after images
Before/after row images are captured by the bintrail CLI as it parses MySQL binary log row events in real-time.
| Event type | before | after |
|---|---|---|
| INSERT | null | Inserted row |
| UPDATE | Old values | New values |
| DELETE | Deleted row | null |