Best practice for partial updates in a RESTful service
Posted
by magiconair
on Stack Overflow
See other posts from Stack Overflow
or by magiconair
Published on 2010-03-14T18:57:18Z
Indexed on
2010/03/14
19:05 UTC
Read the original article
Hit count: 273
I am writing a RESTful service for a customer management system and I am trying to find the best practice for updating records partially. For example, I want the caller to be able to read the full record with a GET request. But for updating it only certain operations on the record are allowed, like change the status from ENABLED to DISABLED. (I have more complex scenarios than this)
I don't want the caller to submit the entire record with just the updated field for security reasons (it also feels like overkill).
Is there a recommended way of constructing the URIs? Do I use GET, POST, PUT or is there no agreed way of doing these kind of things? When reading the REST books RPC style calls seem to be frowned upon.
Thanks Frank
© Stack Overflow or respective owner