ConceptsLogs & events
The change feed
The change feed is one stream that tells each change on the server.
The change feed reports each change to services, deploys, datastores, env groups and job runs. It sends one event for each change. The dashboard uses it to stay up to date. You can use it for your own automation.
Listen to the feed
Terminal
$ curl -N http://127.0.0.1:7878/api/v1/events -H "Authorization: Bearer $FERRY_TOKEN"event: readydata: {} event: changedata: {"kind":"service","id":"srv-6da2006dc52b4c6ca25f","service_id":"srv-6da2006dc52b4c6ca25f","action":"updated"} event: changedata: {"kind":"deploy","id":"dep-0d89a8b1d3ab43dc997f","service_id":"srv-7e321e187891447bb187","action":"created"}The events
| Event | Meaning |
|---|---|
ready | The feed is on. Get your data after it: the feed reports each later change. |
change | Something changed. The event tells what changed, not the new value. Get the resource to read its new state. |
Field of change | Values |
|---|---|
kind | service, deploy, datastore, env_group or job |
action | created, updated or deleted |
service_id | Set for services, deploys and jobs |
A client that is too far behind gets {"kind":"all","id":"*","service_id":null,"action":"resync"}. Then get all your data again.
- The feed reports a change from the API, from a webhook and from Ferry.
- The changes from Ferry are the progress of a deploy, the creation of a datastore and cron runs.
- While a client listens, the server compares its database each second. It also compares after each write from the API or a webhook. Thus a change arrives in about one second.
See Change feed (SSE).