On Tue, Aug 5, 2008 at 9:02 AM, Troy Kruthoff <[EMAIL PROTECTED]> wrote: > +1 for the bulk_docs api, specifically being able to perform multiple > REST-type operations in a single request should be "bulk_docs" by > definition. >
Part of the complexity comes from the fact that _bulk_docs is already used in replication, so it has some options that aren't normally used in a standard POST from an application. Currently with _bulk_docs you can do the equivalent of PUT (create/update with _id), POST (create without _id), and DELETE (update set _deleted=true). So most of the RESTful options are available, they just aren't segregated by verb. You can't do GET yet - to me it just seems confusing to allow both modification of documents and fetching of documents in the same http request. If I'm wrong, and we really should include document fetches in _bulk_docs, it won't be impossible to code, but we should make sure the feature is clear. The POST body can certainly accommodate both "docs" and "ids" members, its just a matter of how to structure the response so that it's clear which parts of the response come from which CouchDB actions. (Not to mention all the edge-cases around documents that are both updated by the "docs" member, and requested by the "ids" member, or maybe the update phase succeeds but one of the request docs is 404.) -- Chris Anderson http://jchris.mfdz.com
