A similar question was asked here Getting full list of revisions on document level using CouchDB-Python?, but what I want to do is also to retrieve the bodies of each revision of the same document in one request. I want to effectively build a revision list also showing the past document bodies.
According to the HTTP API: http://wiki.apache.org/couchdb/HTTP_Document_API,
"You can fetch the bodies of multiple revisions at once using the parameter open_revs=["rev1","rev2",...], or you can fetch all leaf revisions using open_revs=all (see Replication_and_conflicts). The JSON returns an array of objects with an "ok" key pointing to the document, or a "missing" key pointing to the rev string"
However, when I run my query with the AJAX option open_revs: ["3-9e93308666d43721e80580acaedd149b","2-6a3187f50d51756820f1908eab7fcf3f","1-e9a0482bf9a120bd03fb5ff03cdd2d3d"] , I get an invalid_json request returned from the Erlang server.
I have checked my revision numbers which I retrieved from an array revs_info parameter, and still no success.
I was thinking that another possible method is to iterate over the rev_info array and requery the server for each revision body, but this seems too inefficient.
What is the correct method to execute this?