# The change feed as Server-Sent Events (id = sequence number). Resumes from Last-Event-ID or `since`.

`GET /datanotes/changes/stream` (operation `changes_stream`)

Same filters as list_changes (`tables`, `kinds`, `columns`: comma-separated; `exclude_actor`; `where`: JSON). A comment line every 25 s keeps proxies from closing the connection; `event: gap` tells the client events were pruned.

## Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `since` | query | `string` | no |  |
| `tables` | query | `string` | no |  |
| `kinds` | query | `string` | no |  |
| `columns` | query | `string` | no |  |
| `exclude_actor` | query | `string` | no |  |
| `where` | query | `string` | no |  |
| `Last-Event-ID` | header | `string` | no |  |

## Responses

| Status | Description | Body |
| --- | --- | --- |
| 200 | The events, one `data:` line (JSON) each. | `string` (text/event-stream) |
| 400 | `where` is not a JSON object. | `Error` (application/json) |
| 401 | Missing or wrong bearer token. | `Error` (application/json) |
| 503 | The change feed is not running. | `Error` (application/json) |

The schemas named here are in [openapi.json](https://datanotes.dev/openapi.json) (`components.schemas`).
