---
title: "PATCH /network-policy/nodes/{node_id}"
method: PATCH
path: "/network-policy/nodes/{node_id}"
tags: ["Network Policy"]
---

# PATCH /network-policy/nodes/{node_id}

`PATCH /network-policy/nodes/{node_id}`

## Request

- Base URL: `/api` (relative, and the document was published on a file host, not at the API’s origin)
- URL: `/api/network-policy/nodes/{node_id}`
- Auth: HTTP bearer

## Path parameters

- `node_id` integer, required

## Request body

- SetNodeNetworkPolicyModeRequest
  - `mode` string, required

## Response `200`

The node's mode now

- NodeNetworkPolicyModeResponse
  - `enforcement_unavailable_reason` string, nullable: Why `shadow`/`enforce` is unavailable, when `supports_enforcement` is false.
  - `mode` string, required: `legacy` (today's behaviour), `shadow` (computed and logged, not applied) or `enforce`.
  - `name` string, required
  - `node_id` integer, required: 0 is the control plane.
  - `role` string, required
  - `status` string, required
  - `supports_enforcement` boolean, required: Whether this node can run `shadow` or `enforce`: always on the control plane, on a worker while its agent reports an enforcer. A stored non-legacy mode on a node without one is never counted as enforcing.

## Other responses

- `400`: Unknown mode
- `401`: Unauthorized
- `403`: Instance administrators only
- `404`: No such node
- `500`: Internal server error

## Changes

- **2026-11-09** `12896146b193`: 5 breaking
  - removed the required property `extensions` from the response with the `400` status
  - removed the required property `extensions` from the response with the `401` status
  - removed the required property `extensions` from the response with the `403` status
  - removed the required property `extensions` from the response with the `404` status
  - …1 more
- **2026-10-28** `b8d51a990805`: 1 info
  - endpoint added

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