Sr. Director, Product Research, Epicor Software

Software Architecture

This blog is not associated with my employer.

Friday, August 04, 2006

Are GET and PUT Symmetrical in REST?

Does REST require symmetry? In other words, must the payload schema for messages I GET be the same as the schema for messages I PUT? I hope not, because (in my world) what I PUT is rarely a new, complete authoritative version of the data. In the work I've done, the PUT (or POST) payload explicitly indicates whether the item is new (in which case it is authoritative) or if I am changing an item that already exists.

The REST idea – in my mind – is that (a) you can address instances of data unambiguously and completely and (b) that what you GET and what you PUT (for a given URL) are semantically related -- but not necessarily exact copies.

1 comment:

Erik J. said...

Thanks Paul. I'm currently reading the REST dissertation and the RFCs (tedious, but informative) so I can discuss this stuff, um, more informed.

Archive