Preview

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

LineMeaning
retry: 3000Sent once, first. A browser waits three seconds before it reconnects.
: connectedA comment sent once, so you know the stream is open.
: heartbeatA 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" }
}
FieldMeaning
typeWhat happened, such as deployment.apply.
occurredAtWhen it was recorded, in UTC.
resource.kindThe kind of object it touched: cluster, deployment, app, environment, pipeline, team and so on.
resource.idThe 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 sendYou get
No Last-Event-IDOnly changes made from now on. A new client does not receive history.
Last-Event-ID: 4182Every change after 4182 that you may see, oldest first, and then new ones as they happen.
An id higher than any Wardn hasChanges from now on. This happens if the data was reset since your last connection.
Something that is not a non-negative integer400 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.

typeresourceMeaning
cluster.inventory.updatethe clusterThe cluster's inventory changed: nodes, pods or the resources an operator reported. Read the cluster's inventory again.
cluster.timeline.updatethe clusterA new entry is on the cluster's timeline.
deployment.timeline.updatethe deploymentA new entry is on the deployment's timeline.
cluster.import.updatecluster_import, the cluster's idA 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.updatethe deploymentThe 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.kindtypeMeaning
deploymentdeployment.create, deployment.update, deployment.deleteA deployment was created, changed or deleted.
deploymentdeployment.applyA snapshot was applied to the cluster.
deploymentdeployment.promoteA snapshot was promoted to the deployment.
deploymentdeployment.restore, deployment.auto_rollbackAn earlier snapshot was applied again, by a person or automatically.
deploymentsnapshot.heldA new snapshot was held for review instead of applied (held snapshots).
deploymentdeployment.prune_held, deployment.prune_approved, deployment.prune_rejectedA prune above the limit was held, then approved or rejected.
deploymentdeployment.settings, deployment.delivery_settings_changed, deployment.delivery_settings_signed, deployment.secret_refs.update, deployment.previews_updatedThe deployment's settings, delivery rules, secret references or preview settings changed.
deploymentdeployment.pod_restartedA pod was restarted from Wardn.
deploymentdeployment.workload_scaled, deployment.workload_scale_checkedA workload's replica count was set from Wardn, or a dry run checked it could be.
deploymentdrift.adopt, drift.revert, drift.ignore, drift.ignore_removedA person acted on drift.
deploymentexec.started, exec.ended, exec.terminatedA terminal session started, ended or was ended by an administrator.
deploymentimport.importedAn app Argo CD or Flux manages was imported as this deployment, which observes until it cuts over. details name the tool and its object.
deploymentimport.observedA 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.
deploymentimport.difference_acceptedA person accepted one difference before cutover. details name the object, the paths that differ and the reason, never the values.
deploymentimport.ignore_rules_addedArgo CD's or Flux's ignore rules became the deployment's drift ignore rules for the objects of a new render. details count them.
deploymentimport.cutover_requested, import.cutover_awaiting_approvalA 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.
deploymentimport.cutover_approved, import.cutover_declinedThe approvals a cutover waited for were given, or an approver declined it, which cancels it.
deploymentimport.cutover_started, import.cutover_step_completedStep 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.
deploymentimport.cutover_waitingThe 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.
deploymentimport.cutover_interrupted, import.cutover_retriedArgo CD or Flux, or a person, changed what Wardn took over, so the cutover stopped for a person; then someone cut it over again.
deploymentimport.release_requested, import.releasedA 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.
deploymentimport.cutover_source_removed, import.cutover_completed, deployment.cut_overArgo CD's Application or Flux's Kustomization was removed with every object kept (the point of no return), and the deployment became Wardn's.
deploymentimport.cutover_cancelled, import.cutover_review_changed, import.cutover_failed, import.cutover_reappliedThe 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.
clustercluster.create, cluster.update, cluster.settings.updateA cluster was registered or changed.
clustercluster.join, cluster.join_token_create, cluster.credentials_revokeA cluster joined, a join token was made, or credentials were revoked.
clustercluster.disconnect, cluster.reconnectA cluster was disconnected or reconnected from Wardn.
clusterimport.scan_requested, import.scanA 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, sourceapp.create, app.update, app.delete, source.create, source.update, source.deleteAn app or source changed.
environmentenvironment.create, environment.update, environment.settings.updateAn environment changed.
pipelinepipeline.create, pipeline.update, pipeline.archive, pipeline.apps_add, pipeline.apps_removeA pipeline or its apps changed.
guardrail, freezeguardrail.archive, guardrail.bypassed, guardrail.branch_updatedA guardrail changed, or one was bypassed for a release.
team, group, roleteam.create, team.role.set, group.create, group.update, group.delete, role.create, role.update, role.deleteTeams, groups and roles changed.
api_tokenapi_token.create, api_token.rotate, api_token.revokeAn API token was made, rotated or revoked.
integrationintegration.github.pause, integration.github.resumeThe 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:read across 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.

Next

On this page