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
A client describes edits
The server applies the patch
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.
- Patch versus replacementPATCH submits modification instructions rather than a complete replacement representation.→
- Atomic modificationA server must apply the entire set of changes atomically or apply none.→
- Conditional PATCHA strong ETag precondition prevents applying a base-dependent patch to the wrong version.→
- Discover patch formatsAccept-Patch lists the patch media types accepted for the target resource.→
- Failure and verificationInvalid syntax, unsupported formats, conflicts, and failed preconditions have different responses.→
This introduction explains RFC 5789 (2010). Read the original RFC ↗