---
title: "Get the drain status for a node, including migration progress."
method: GET
path: "/internal/nodes/{node_id}/drain"
tags: ["Nodes"]
---

# Get the drain status for a node, including migration progress.

`GET /internal/nodes/{node_id}/drain`

## 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}/drain`
- Auth: HTTP bearer

Returns container counts and whether the drain is complete.
Can be polled to track drain progress.

## Path parameters

- `node_id` integer, required

## Response `200`

Drain status

- DrainStatusResponse: Progress of a node drain operation.
  - `can_remove` boolean, required: Can the node be safely removed?
  - `drain_complete` boolean, required: Whether the source node is empty and safe to remove. Replacement deployments may still be converging asynchronously on other nodes.
  - `message` string, required
  - `node_id` integer, required
  - `node_name` string, required
  - `remaining_containers` integer, required: Number of containers still on this node
  - `remaining_sandboxes` integer, required: Sandboxes (any owner) still on this node. Draining does not move sandboxes; evict them before removing the node (ADR-048).
  - `replica_shortfall` integer: Replicas taken off this node with no other node to run them, not restored yet. Undraining the node restores them.
  - `status` string, required

## Other responses

- `401`: Unauthorized
- `404`: Node not found
- `500`: Internal server error

## Changes

- **2026-11-03** `0add2fdd114a`: 1 info
  - added the optional property `replica_shortfall` to the response with the `200` status
- **2026-11-03** `fcfcfae25744`: 1 warning
  - removed the optional property `replica_shortfall` from the response with the `200` status
- **2026-11-03** `af07888c38c0`: 1 info
  - added the optional property `replica_shortfall` to the response with the `200` status
- **2026-10-05** `4b228ebed583`: 1 info
  - added the required property `remaining_sandboxes` to the response with the `200` status
- **2026-10-05** `63a80791dc58`: 1 breaking
  - removed the required property `remaining_sandboxes` from the response with the `200` status

[Operation history](https://skmtc.dev/gotempsh/apis/temps/changes/internal/nodes/:node_id/drain/get.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)
