JKDingwall opened a new issue, #5236:
URL: https://github.com/apache/couchdb/issues/5236

   [NOTE]: # ( ^^ Provide a general summary of the issue in the title above. ^^ 
)
   
   ## Description
   
   I've been using /{db}/_bulk_get and I wanted to get the document attachments 
in the response instead of just the stubs.  I checked the documentation to see 
if it was a supported query parameter but there is no mention:
   
   https://docs.couchdb.org/en/stable/api/database/bulk-api.html#db-bulk-get
   
   Just as a test I tried "?attachments=true" and was pleased that I got them 
in the response.
   
   ```
   $ curl -k --cert cert --key key -X GET https://couchdb.example.com/
   
{"couchdb":"Welcome","version":"3.3.3","git_sha":"40afbcfc7","uuid":"c87ee6744ddc3efea74edfe25da5d7b3","features":["access-ready","partitioned","pluggable-storage-engines","reshard","scheduler"],"vendor":{"name":"The
 Apache Software Foundation"}}
   
   $ curl -H "Content-type: application/json" --cert cert --key key -k -X POST 
https://couchdb.example.com/database/_bulk_get --data-binary @- << EOF
   {"docs" : [ { "id":"docid" } ] }
   EOF
   { ...response with attachment stubs ...}
   
   $ curl -H "Content-type: application/json" --cert cert --key key -k -X POST 
https://couchdb.example.com/database/_bulk_get?attachments=true --data-binary 
@- << EOF
   {"docs" : [ { "id":"docid" } ] }
   EOF
   { ...response with inline attachments...}
   ```
   
   Perhaps other parameters supported when fetching individual documents are 
also available for _bulk_get but not noted.
   
   [NOTE]: # ( Describe the problem you're encountering. )
   [TIP]:  # ( Do NOT give us access or passwords to your actual CouchDB! )
   
   ## Steps to Reproduce
   
   n/a
   
   [NOTE]: # ( Include commands to reproduce, if possible. curl is preferred. )
   
   ## Expected Behaviour
   
   n/a
   
   [NOTE]: # ( Tell us what you expected to happen. )
   
   ## Your Environment
   
   [TIP]:  # ( Include as many relevant details about your environment as 
possible. )
   [TIP]:  # ( You can paste the output of curl http://YOUR-COUCHDB:5984/ here. 
)
   
   * CouchDB version used: noted above
   * Browser name and version: not relevant
   * Operating system and version:  not relevant
   
   ## Additional Context
   
   [TIP]:  # ( Add any other context about the problem here. )
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscr...@couchdb.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to