Visual RFC.
ALL RFCs / RFC 5789
Read the RFC ↗

RFC 5789 / START HERE

HTTP PATCH, before the details

HTTP PATCH

PATCH is an HTTP method for applying a set of changes to a resource. It differs from replacing the entire resource with a new representation.

The idea in one picture

  1. A client describes edits

  2. The server applies the patch

  3. The resource is updated

A simplified picture of the idea; the chapters explain the actual mechanisms.

Why it exists

Sometimes a client needs to change part of an object without sending a complete replacement. The patch format defines the actual edits.

A familiar example

An app sends a patch to change one setting in a profile rather than replacing the whole profile document.

Helpful background

You can start here without reading another RFC. If these ideas are unfamiliar, these short introductions may help.

What you’ll learn next

Begin with chapter one, or choose a topic.

  1. Patch versus replacementPATCH submits modification instructions rather than a complete replacement representation.
  2. Atomic modificationA server must apply the entire set of changes atomically or apply none.
  3. Conditional PATCHA strong ETag precondition prevents applying a base-dependent patch to the wrong version.
  4. Discover patch formatsAccept-Patch lists the patch media types accepted for the target resource.
  5. Failure and verificationInvalid syntax, unsupported formats, conflicts, and failed preconditions have different responses.
Start with chapter one →

This introduction explains RFC 5789 (2010). Read the original RFC ↗