0

The public port of sync-gateway returns meta-data of documents in the bucket.

Using the id field from meta data it would take a one GET request per document to fetch all documents by using the URL http://host:port/bucket-gateway/{document-id}

I wanted to know if there is any efficient way to do this

marc_s
  • 732,580
  • 175
  • 1,330
  • 1,459
Anuj
  • 994
  • 11
  • 21

1 Answers1

0

The sync gateway also provide a "bulk get" API to retrieve any number of documents as individual bodies in a MIME multipart response. The API details are available here.

Each enclosed body contains one requested document. While the bodies appear in the same order as in the request, they can also be identified by their X-Doc-ID and X-Rev-ID headers.