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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]