Hi Erick, On Feb 2, 2010, at 10:21 AM, Erick Fleming wrote:
> This is more of a REST question, but is anyone using Restlet to > handle batch operations? > > For example: given the following resource: /api/blog/1/posts. I > would like to make client-side changes, then update them on one call. > > I realize this is very SOAP like, but was wonder how Restlet users > are handling these sorts of Use Cases. If you want to update the whole collection of posts, it's RESTful to allow PUT to /api/blog/1/posts. PUT semantics are "I want the resource to reflect the representation I'm giving you here exactly." If you want to update only some of the posts (and you don't want to re- send the ones you aren't modifying to avoid, say, concurrent modification problems), one model is to define a subset resource. Something like: /api/blog/1/posts?subset=3,4,8,11 or maybe /api/blog/1/posts/subset/3;4;8;11 this resource would represent just the posts with IDs 3, 4, 8, and 11. GET would return a collection containing just those items and PUT would accept new representations for just those items, leaving the other posts alone. This kind of violates HATEOAS (since the client needs to know how to generate the subset URI), but I think it's an acceptable tradeoff. There's also the proposed HTTP PATCH method. I don't know the status of that. Rhett ------------------------------------------------------ http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=2444225

