nono commented on a change in pull request #263: Add the POST _bulk_get endpoint
URL:
https://github.com/apache/couchdb-documentation/pull/263#discussion_r175514891
##########
File path: src/api/database/bulk-api.rst
##########
@@ -456,6 +456,139 @@ Sending multiple queries to a database
The multiple queries are also supported in /db/_local_docs/queries and
/db/_design_docs/queries (similar to /db/_all_docs/queries).
+.. _api/db/bulk_get:
+
+==================
+``/db/_bulk_get``
+==================
+
+.. http:post:: /{db}/_bulk_get
+ :synopsis: Fetches several documents at the given revision
+
+ This method is used by PouchDB and other client to improve the pull
+ replications, by allowing the client to request multiple documents in one
+ request.
+
+ The usual CouchDB API for bulk gets -- a POST to _all_docs with an array of
+ docIDs in the body -- isn't suitable for the replicator because:
+
+ - there's no way to specify which specific revisions are needed (it always
+ returns the default revision),
+ - the response doesn't contain the revision history,
+ - there's no way to specify that only recently changed attachments should
+ be included (a la ``atts_since``),
+ - and attachment bodies can only be encoded inline (base64) not as MIME
+ multipart bodies.
Review comment:
To be honest, I don't understand why it was a new endpoint and not just some
options for `POST _all_docs`. It looks like they both do the same, except one
supports some options and the other some other options. I don't understand the
internal of CouchDB, it probably make senses. But I have some difficulties to
describe this endpoint.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services