LOGBOOK

HELP

Quiz Entry - updated: 2026.10.15

What is the difference between PUT and PATCH?

PUT replaces the whole target with what you send; PATCH changes or adds only the part you send and leaves the rest as it is.

PUT replaces the NTP list so only the new server remains; PATCH merges it so both servers remain

* Same body, different result: PUT replaces the whole setting, PATCH merges into it. *

Take a router with NTP server 10.0.0.1 configured:

  • PUT with ["10.0.0.2"] → the NTP setting is replaced. Afterwards only 10.0.0.2 is configured, and 10.0.0.1 is gone.
  • PATCH with ["10.0.0.2"] → the change is merged in. Afterwards both 10.0.0.1 and 10.0.0.2 are configured.

That is why the typical examples are "update the NTP server" for PUT and "add an NTP server" for PATCH.

The difference matters in automation. A PUT built from incomplete data silently deletes everything you didn't include, so use it only when you really mean "this is the complete new state".

Tip: PUT = put a new one in its place. PATCH = patch a hole, leaving the rest.

Go deeper:

From Quiz: ITIA / Network Programmability: CLI, REST APIs, YANG, NETCONF and RESTCONF | Updated: Oct 15, 2026