PATCH semantics

4,693 views
Skip to first unread message

David Biesack

unread,
May 3, 2012, 2:44:56 PM5/3/12
to api-...@googlegroups.com
Some of the Google REST APIs use PATCH and declare

For example the new Google Drive API has

 PATCH  /files/id

and declares "This method supports patch semantics."; see https://developers.google.com/drive/v1/reference/

Is there a more general (industry-wide) definition of PATCH semantics wrt RESTful web services?

mca

unread,
May 3, 2012, 2:51:27 PM5/3/12
to api-...@googlegroups.com
the PATCH semantics are here:
http://tools.ietf.org/html/rfc5789

an XML PATCH format has been registered here:
http://tools.ietf.org/html/rfc5261

a JSON version is working it's way through the process now:
http://tools.ietf.org/html/draft-ietf-appsawg-json-patch-01

the key take-away here is that, while PATCH does not define a media
type to be used (none of the HTTP methods do that), the RFC states:
"The PATCH method requests that a set of changes described in the
request entity be applied to the resource identified by the Request-
URI. The set of changes is represented in a format called a "patch
document" identified by a media type"

and both the XML and JSON designs are basically "diff" style representations.

mca
http://amundsen.com/blog/
http://twitter.com@mamund
http://mamund.com/foaf.rdf#me

David Biesack

unread,
May 3, 2012, 3:01:41 PM5/3/12
to api-...@googlegroups.com
Thanks, Mike!


On Thursday, May 3, 2012 2:51:27 PM UTC-4, Mike Amundsen wrote:
the PATCH semantics are here:
http://tools.ietf.org/html/rfc5789

an XML PATCH format has been registered here:
http://tools.ietf.org/html/rfc5261

a JSON version is working it's way through the process now:
http://tools.ietf.org/html/draft-ietf-appsawg-json-patch-01
...
Reply all
Reply to author
Forward
0 new messages