Best practice for partial updates in a RESTful service
- by magiconair
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