You should use the bulk API documented here.
It could look something like below.
- Pass in the keys as part of the body via a POST
- Pass in the name of the db (in the example below, it's
demodb
) - in the url, use the
_all_docs
for the view - if you want the entire documents returned (and not just the
rev
), be sure to passinclude_docs=true
curl -d '{"keys":["docId1","docId2","docId3"]}' -X POST http://127.0.0.1:5984/demodb/_all_docs?include_docs=true