---
title: "Receive a heartbeat from a worker node"
method: POST
path: "/internal/nodes/{node_id}/heartbeat"
tags: ["Nodes"]
---

# Receive a heartbeat from a worker node

`POST /internal/nodes/{node_id}/heartbeat`

## Request

- Base URL: `/api` (relative, and the document was published on a file host, not at the API’s origin)
- URL: `/api/internal/nodes/{node_id}/heartbeat`
- Auth: none declared

## Path parameters

- `node_id` integer, required

## Request body

- HeartbeatApiRequest
  - `architecture` string, nullable: Container platform of this node's Docker daemon (`linux/amd64`, `linux/arm64`), read from `docker info` by the agent. Absent from pre-multi-arch agents; the stored value is then left untouched.
  - `capacity` unknown
  - `containers` ContainerInventoryItem[], nullable: Container inventory for reconciliation (sent on first heartbeat after agent startup). Each entry has `container_id` and `container_name` of temps-managed containers.
    - `container_id` string, required: Docker container ID
    - `container_name` string, required: Docker container name
  - `deployments_without_resolver` integer[], nullable: Deployment ids with a container on this node created without the node's cluster resolver, so it cannot resolve `*.temps.local` until redeployed. Empty while cluster DNS is off; absent from older agents, which leaves the stored value untouched.
  - `disk_health` object, nullable: Software RAID and drive SMART health read by the agent (`temps_metrics::collector::disk_health::DiskHealthReport`). Kept as raw JSON here and parsed after the heartbeat is recorded, so a malformed report from a mismatched agent version costs only the disk metrics, never the heartbeat that keeps the node online.
  - `dns_resolver` DnsResolverHeartbeat, nullable: Wire DTO for [`HeartbeatApiRequest::dns_resolver`]. Mirrors `temps_node_agent::network_sync::DnsResolverHeartbeat` field-for-field, but declared separately rather than shared: the agent and control-plane crates don't depend on each other (the agent avoids pulling in `temps-deployments`' sea-orm dependency tree), matching the existing `WirePeerListResponse` pattern in `temps-node-agent::network_sync`.
    - `consecutive_sync_failures` integer
    - `last_sync_error` string, nullable: Most recent resolver-related error: a sync tick failure, or (when the resolver never started at all) the startup error itself.
    - `last_sync_success_at` string, date-time, nullable
    - `record_count` integer
    - `running` boolean: `false` when cluster DNS is disabled on the control plane, the resolver failed to start, or it was shut down. `true` only while a resolver handle currently exists and cluster DNS is enabled.
    - `tasks_alive` boolean: `false` means the resolver's sync or DNS server task crashed. Only meaningful when `running`.
  - `docker_socket_projects` string[], nullable: Project slugs this node grants host Docker access to (ADR 045), read by the agent from its own `TEMPS_DOCKER_SOCKET_PROJECTS`. Advisory only: it tells the scheduler where a granted project *may* be placed. It can never cause a socket to be mounted — that decision is made by the executing process against its own environment. `None` from a pre-ADR-045 agent leaves the stored value untouched; an empty array clears it.
  - `instances` object[], nullable: What the node runtime observed of the workload instances assigned to this node (ADR-055 §7), only those that changed since its last accepted heartbeat. Sent by agents that advertise the `state_stream` capability; absent from older agents. A report this control plane cannot read is dropped (and logged), never the heartbeat.
  - `labels` unknown
  - `occupied_ranges` OccupiedRangeReport[], nullable: The node's occupied IPv4 ranges (ADR 056), sent when they change.
    - `cidr` string, required: IPv4 network, e.g. `172.20.0.0/16`.
    - `name` string, required: Device name for a route, network name for a Docker network.
    - `source` string, required: `route` (a host route) or `docker` (a Docker network's subnet).
  - `overlay` OverlayHeartbeat, nullable: Cross-node overlay state reported by the agent (ADR 056).
    - `compute_cidr` string, nullable: The allocation the agent applied (when `ready`) or tried to.
    - `last_error` string, nullable: Why the overlay is unavailable, with the fix.
    - `status` string, required: `ready` or `unavailable`.
  - `overlay_addresses` OverlayAddressReport[], nullable: The overlay address of each running Temps container on the node, sent when the set changes. Absent from older agents.
    - `container_name` string, required
    - `ip` string, required
  - `overlay_vxlan_vni` integer, nullable: The VXLAN network ID this node's overlay follows (ADR 062): that of the last peer list it acted on. Absent from older agents, which run every overlay on 42.
  - `public_ingress` PublicIngressHeartbeat, nullable
    - `certificate_count` integer, required
    - `last_error` string, nullable
    - `route_count` integer, required
    - `running` boolean, required
    - `unsupported_reasons` string[]
    - `unsupported_route_count` integer, required

## Response `200`

Heartbeat received

- HeartbeatResponse
  - `instances_accepted` boolean, required: Whether the instance reports in this heartbeat (ADR-055 §7) were recorded. `false` when it carried none, when recording them failed, or when this process runs no node state stream: the node must keep resending them until a heartbeat answers `true`. The heartbeat itself still succeeds, so a failed ingest never costs the node its liveness. Absent from older servers, which agents read as `false`.
  - `message` string, required
  - `status` string, required

## Other responses

- `400`: Invalid heartbeat payload
- `401`: Unauthorized
- `404`: Node not found
- `500`: Internal server error

## Changes

- **2026-11-12** `e052e98bb073`: 1 info
  - added the new optional request property `overlay_vxlan_vni`
- **2026-10-28** `b8d51a990805`: 4 info
  - added the new optional request property `deployments_without_resolver`
  - added the new optional request property `instances`
  - added the new optional request property `overlay_addresses`
  - added the required property `instances_accepted` to the response with the `200` status
- **2026-10-26** `6882080cc5b5`: 1 info
  - added the new optional request property `disk_health`
- **2026-10-26** `198448ae2ca3`: 1 warning
  - removed the request property `disk_health`
- **2026-10-26** `a086d94641be`: 1 info
  - added the new optional request property `disk_health`

[Operation history](https://skmtc.dev/gotempsh/apis/temps/changes/internal/nodes/:node_id/heartbeat/post.md)

---

[API](https://skmtc.dev/gotempsh/apis/temps.md) - [All operations](https://skmtc.dev/gotempsh/apis/temps/llms.txt) - [OpenAPI document](https://skmtc.dev/gotempsh/apis/temps/revisions/3b040526eb43?raw)
