Live events
Follow changes in your organization as they happen with a server-sent event stream, and resume after a dropped connection without missing any.
GET /api/v1/events is a server-sent events stream. The web app uses it to keep screens current without polling, and you can use it to react to changes: a deployment applied, a snapshot held, a cluster disconnected.
An event says what changed and which object it touched, never the object itself. When one arrives, read the object again through the normal API. That keeps the stream small and means a missed or repeated event does no harm.
Read the API overview first for the base URL and tokens.
Open the stream
Any signed-in caller can open the stream, and it carries only the changes that caller may see (who sees what).
export WARDN_API_URL=https://wardn.example.com
export WARDN_TOKEN=wrd_...
curl -fsSN -H "Authorization: Bearer $WARDN_TOKEN" \
-H 'Accept: text/event-stream' \
"$WARDN_API_URL/api/v1/events"-N turns off curl's buffering so events print as they arrive. What you see:
retry: 3000
: connected
id: 4182
data: {"type":"deployment.apply","occurredAt":"2026-11-11T09:14:02.511Z","resource":{"kind":"deployment","id":"7c1f0e1a-5b0e-4d0f-9d77-3c2b5a1d9e10"}}
: heartbeat
data: {"type":"cluster.inventory.update","occurredAt":"2026-11-11T09:14:20.004Z","resource":{"kind":"cluster","id":"2f6c8d44-1d3b-4ac0-8f6e-0a8e3f7c9b21"}}Browsers and tokens
A browser's EventSource cannot set an Authorization header. In a page on the same origin as Wardn it sends the session cookie, which is enough. From a script that holds an API token, read the response with fetch and a streaming reader, or use a client library that lets you set headers.
What arrives on the wire
| Line | Meaning |
|---|---|
retry: 3000 | Sent once, first. A browser waits three seconds before it reconnects. |
: connected | A comment sent once, so you know the stream is open. |
: heartbeat | A comment every 15 seconds while nothing else is sent, so proxies keep the connection open and a dead client is noticed. Ignore it. |
id: <number> | The id of a recorded change. Present on most events; see Resume. |
data: <json> | The event, on one line. |
Events are sent without an SSE event name, so a browser's EventSource delivers all of them to onmessage. There is no need to register a listener per type.
The stream ends by itself after one hour. Reconnect with the last id you saw and you receive what you missed. Each new connection checks your credentials again.
The response sets Cache-Control: no-cache and X-Accel-Buffering: no. If you put a proxy in front of Wardn, make sure it does not buffer text/event-stream responses.
The event
{
"type": "deployment.apply",
"occurredAt": "2026-11-11T09:14:02.511Z",
"resource": { "kind": "deployment", "id": "7c1f0e1a-5b0e-4d0f-9d77-3c2b5a1d9e10" }
}| Field | Meaning |
|---|---|
type | What happened, such as deployment.apply. |
occurredAt | When it was recorded, in UTC. |
resource.kind | The kind of object it touched: cluster, deployment, app, environment, pipeline, team and so on. |
resource.id | The object's id. For the kinds that have a read endpoint, use it to fetch the object. |
Resume after a drop
Each change recorded in Activity has an id on its event. It is a number that counts up from 1 within your organization with no gaps, so it is safe to resume from.
| You send | You get |
|---|---|
No Last-Event-ID | Only changes made from now on. A new client does not receive history. |
Last-Event-ID: 4182 | Every change after 4182 that you may see, oldest first, and then new ones as they happen. |
| An id higher than any Wardn has | Changes from now on. This happens if the data was reset since your last connection. |
| Something that is not a non-negative integer | 400 with the code events.last_event_id. |
A browser's EventSource remembers the last id and sends Last-Event-ID itself when it reconnects. If you write your own client, store the last id you handled, after you handled it, and send it on the next connection.
curl -fsSN -H "Authorization: Bearer $WARDN_TOKEN" \
-H 'Last-Event-ID: 4182' \
"$WARDN_API_URL/api/v1/events"Events without an id
A few events are announcements that something is worth reading again, not records of a decision. They have no id, are not kept for a client that was away, and do not change the id you resume from.
type | resource | Meaning |
|---|---|---|
cluster.inventory.update | the cluster | The cluster's inventory changed: nodes, pods or the resources an operator reported. Read the cluster's inventory again. |
cluster.timeline.update | the cluster | A new entry is on the cluster's timeline. |
deployment.timeline.update | the deployment | A new entry is on the deployment's timeline. |
cluster.import.update | cluster_import, the cluster's id | A scan for Argo CD and Flux was asked for or finished on the cluster, Wardn read the repositories of what it found, or an app was imported or its deployment deleted. Read the cluster's import scan and import candidates again. |
deployment.import.update | the deployment | The comparison of an imported deployment with what Argo CD or Flux applied changed (a check was asked for, sent or answered, the operator cannot compare, or a person accepted a difference), or its cutover moved: requested, approved, a step sent or answered, waiting, interrupted, released or ended. Read the deployment's import, live diff and cutover (GET /deployments/{id}/import/cutover) again. |
After a reconnect you do not receive the ones you missed. Read the object, or its timeline, once when you reconnect, and then rely on the stream. See Timelines and Activity for what the two record.
Event types
Every other event is a change recorded in Activity, and its type is that entry's action. Activity entries are the same ones you filter by action in GET /activity and see in the web app's Activity screen, so you can look up what one means there.
These are the types you are most likely to act on. The list is not closed: Wardn adds types as it records new kinds of change, so ignore a type you do not know instead of failing on it.
resource.kind | type | Meaning |
|---|---|---|
deployment | deployment.create, deployment.update, deployment.delete | A deployment was created, changed or deleted. |
deployment | deployment.apply | A snapshot was applied to the cluster. |
deployment | deployment.promote | A snapshot was promoted to the deployment. |
deployment | deployment.restore, deployment.auto_rollback | An earlier snapshot was applied again, by a person or automatically. |
deployment | snapshot.held | A new snapshot was held for review instead of applied (held snapshots). |
deployment | deployment.prune_held, deployment.prune_approved, deployment.prune_rejected | A prune above the limit was held, then approved or rejected. |
deployment | deployment.settings, deployment.delivery_settings_changed, deployment.delivery_settings_signed, deployment.secret_refs.update, deployment.previews_updated | The deployment's settings, delivery rules, secret references or preview settings changed. |
deployment | deployment.pod_restarted | A pod was restarted from Wardn. |
deployment | deployment.workload_scaled, deployment.workload_scale_checked | A workload's replica count was set from Wardn, or a dry run checked it could be. |
deployment | drift.adopt, drift.revert, drift.ignore, drift.ignore_removed | A person acted on drift. |
deployment | exec.started, exec.ended, exec.terminated | A terminal session started, ended or was ended by an administrator. |
deployment | import.imported | An app Argo CD or Flux manages was imported as this deployment, which observes until it cuts over. details name the tool and its object. |
deployment | import.observed | A comparison of the deployment's latest render with what Argo CD or Flux applied found a different set of differences to review: one appeared, went or opened again. details count them; they never hold values. |
deployment | import.difference_accepted | A person accepted one difference before cutover. details name the object, the paths that differ and the reason, never the values. |
deployment | import.ignore_rules_added | Argo CD's or Flux's ignore rules became the deployment's drift ignore rules for the objects of a new render. details count them. |
deployment | import.cutover_requested, import.cutover_awaiting_approval | A person, or Wardn's automatic rule (details.trigger automatic), asked for the deployment to be cut over from Argo CD or Flux; it waits for the approval request details.requestId names when the guardrails ask for one. details name the reviewed render and the cutover snapshot and count what was accepted and expected, never values. |
deployment | import.cutover_approved, import.cutover_declined | The approvals a cutover waited for were given, or an approver declined it, which cancels it. |
deployment | import.cutover_started, import.cutover_step_completed | Step 1 started (details.trigger says by a person or automatically), then each of the four steps finished (details.step, 1 to 4). Each command the cluster's operator ran stays on the cutover's own page, not in Activity. |
deployment | import.cutover_waiting | The cutover waits, for a reason it had not waited for before (details.reason: parent, permission, unproven_version, unknown_version, cluster_unreachable, cluster_paused, operator_cannot_cutover or removal_refused). A release back that waits for a paused or unreachable cluster records it too, and goes on by itself. |
deployment | import.cutover_interrupted, import.cutover_retried | Argo CD or Flux, or a person, changed what Wardn took over, so the cutover stopped for a person; then someone cut it over again. |
deployment | import.release_requested, import.released | A person asked to release the deployment back to its tool, and it was. details.content_not_resynced is set when the tool has its object back but won't apply its own content by itself until its next sync. |
deployment | import.cutover_source_removed, import.cutover_completed, deployment.cut_over | Argo CD's Application or Flux's Kustomization was removed with every object kept (the point of no return), and the deployment became Wardn's. |
deployment | import.cutover_cancelled, import.cutover_review_changed, import.cutover_failed, import.cutover_reapplied | The cutover ended unfinished. details.code says why, such as import.review_changed, import.cutover_refused, import.namespace_not_supported, import.cutover_inventory_truncated, import.cutover_released or import.removal_deleted_resources; for the last, the approved snapshot was applied again (import.cutover_reapplied) and the deployment's teams are notified. |
cluster | cluster.create, cluster.update, cluster.settings.update | A cluster was registered or changed. |
cluster | cluster.join, cluster.join_token_create, cluster.credentials_revoke | A cluster joined, a join token was made, or credentials were revoked. |
cluster | cluster.disconnect, cluster.reconnect | A cluster was disconnected or reconnected from Wardn. |
cluster | import.scan_requested, import.scan | A person asked the cluster's operator to scan for Argo CD and Flux, or a scan finished that someone asked for or that found something different from the one before. |
app, source | app.create, app.update, app.delete, source.create, source.update, source.delete | An app or source changed. |
environment | environment.create, environment.update, environment.settings.update | An environment changed. |
pipeline | pipeline.create, pipeline.update, pipeline.archive, pipeline.apps_add, pipeline.apps_remove | A pipeline or its apps changed. |
guardrail, freeze | guardrail.archive, guardrail.bypassed, guardrail.branch_updated | A guardrail changed, or one was bypassed for a release. |
team, group, role | team.create, team.role.set, group.create, group.update, group.delete, role.create, role.update, role.delete | Teams, groups and roles changed. |
api_token | api_token.create, api_token.rotate, api_token.revoke | An API token was made, rotated or revoked. |
integration | integration.github.pause, integration.github.resume | The GitHub integration was paused or resumed. |
Some families carry a suffix that names the outcome, for example freeze.<change> and guardrail.exception_<change>. Match them by prefix.
Who sees which events
The stream shows what the caller's Activity would show.
- A caller who can read the whole activity feed (
audit:readacross the organization, as an Owner or an Organization reader does) receives every event. - Anyone else receives events about the teams, apps, environments, clusters, pipelines and deployments they can read, and nothing about the rest. An event about something the organization holds as a whole, such as a role or an API token, goes only to callers with the whole feed.
Wardn checks again on every batch, so a grant that ends while the stream is open stops its events at once. See Permissions.
Handle events well
- Refetch, do not patch. Treat an event as a hint. Read the deployment or cluster it names rather than building state from event contents.
- Coalesce. A deploy produces several events for one deployment in a short time. Wait a moment, or refetch at most once a second per object.
- Be idempotent. After a reconnect you can see an event twice. Rereading the object makes that harmless.
- Reconnect on every end. A normal end after an hour looks like an error to some clients. Reconnect with the last id and back off if connecting fails.
- Do not hold many streams. One stream per process carries everything the caller may see.
Preview
The set of event types can grow before the first stable release. The envelope (type, occurredAt, resource) and the Last-Event-ID behaviour are what to rely on.