Skip to content
This repository was archived by the owner on Oct 17, 2022. It is now read-only.

Commit 3464349

Browse files
authored
Merge pull request #431 from apache/feat/bulk-get
feat: add example response for _bulk_get with two conflicts
2 parents 4978482 + cf5840d commit 3464349

File tree

1 file changed

+52
-0
lines changed

1 file changed

+52
-0
lines changed

src/api/database/bulk-api.rst

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -598,6 +598,58 @@ Sending multiple queries to a database
598598
]
599599
}
600600
601+
Example response with a conflicted document:
602+
603+
**Request**:
604+
605+
.. code-block:: http
606+
607+
POST /db/_bulk_get HTTP/1.1
608+
Accept: application/json
609+
Content-Type:application/json
610+
Host: localhost:5984
611+
612+
{
613+
"docs": [
614+
{
615+
"id": "a"
616+
}
617+
]
618+
}
619+
620+
**Response**:
621+
622+
.. code-block:: http
623+
624+
HTTP/1.1 200 OK
625+
Cache-Control: must-revalidate
626+
Content-Type: application/json
627+
Date: Mon, 19 Mar 2018 15:27:34 GMT
628+
Server: CouchDB (Erlang/OTP)
629+
630+
{
631+
"results": [
632+
{
633+
"id": "a",
634+
"docs": [
635+
{
636+
"ok": {
637+
"_id": "a",
638+
"_rev": "1-23202479633c2b380f79507a776743d5",
639+
"a": 1
640+
}
641+
},
642+
{
643+
"ok": {
644+
"_id": "a",
645+
"_rev": "1-967a00dff5e02add41819138abb3284d"
646+
}
647+
}
648+
]
649+
}
650+
]
651+
}
652+
601653
.. _api/db/bulk_docs:
602654

603655
==================

0 commit comments

Comments
 (0)