You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@couchdb.apache.org by GitBox <gi...@apache.org> on 2022/02/25 12:10:42 UTC

[GitHub] [couchdb] karanpreetsingh1990 opened a new issue #3943: Support Json Arrays or custom keys for _bulk_docs

karanpreetsingh1990 opened a new issue #3943:
URL: https://github.com/apache/couchdb/issues/3943


   Support Json Arrays or custom keys for _bulk_docs
   
   ## Summary
   
   The Bulk doc insert works well but only if the data is sent in a very specific format. The "docs" key needs to have the array that needs to be inserted. It would be great if we had a way to customize that a bit. 
   
   ## Desired Behaviour
   
   `POST /db/_bulk_docs?arrayKey=keyname`
   
   Accepts the data below and adds the multiple documents under <keyname> instead of "docs"
   ```
   {
       "<keyname>": [
           {
               "key1": "value1"
           },
           {
               "key2": "value2"
           }
       ]
   }
   ```
   
   Also, it would be great to have a way of also passing the array directly and indicate as such in the parameter
   
   `POST /db/_bulk_docs?arrayKey=null`
   
   Accepts the data below and adds the multiple documents present in the array.
   ```
   [
           {
               "key1": "value1"
           },
           {
               "key2": "value2"
           }
   ]
   
   ```
   ## Additional context
   
   I'm trying to send data to couchdb from a 3rd party tool that has limited capabilities for customization. I know of a few more tools that can send data to webhooks for reporting/audit/alerting etc. and couchdb would be perfect way to ingest,store, query and report on this data. 
   


-- 
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-unsubscribe@couchdb.apache.org

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



[GitHub] [couchdb] kocolosk commented on issue #3943: Support Json Arrays or custom keys for _bulk_docs

Posted by GitBox <gi...@apache.org>.
kocolosk commented on issue #3943:
URL: https://github.com/apache/couchdb/issues/3943#issuecomment-1051214828


   Years and years ago I believe this was the `_bulk_docs` API. We added the object wrapper for a reason that I vaguely recall as security-related, but I don't recall all the details offhand.


-- 
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-unsubscribe@couchdb.apache.org

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