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

Commit f22a2f0

Browse files
committed
feat: add example response for _bulk_get with two conflicts
1 parent 1433b3c commit f22a2f0

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
@@ -604,6 +604,58 @@ Sending multiple queries to a database
604604
]
605605
}
606606
607+
Example response with a conflicted document:
608+
609+
**Request**:
610+
611+
.. code-block:: http
612+
613+
POST /db/_bulk_get HTTP/1.1
614+
Accept: application/json
615+
Content-Type:application/json
616+
Host: localhost:5984
617+
618+
{
619+
"docs": [
620+
{
621+
"id": "a"
622+
}
623+
]
624+
}
625+
626+
**Response**:
627+
628+
.. code-block:: http
629+
630+
HTTP/1.1 200 OK
631+
Cache-Control: must-revalidate
632+
Content-Type: application/json
633+
Date: Mon, 19 Mar 2018 15:27:34 GMT
634+
Server: CouchDB (Erlang/OTP)
635+
636+
{
637+
"results": [
638+
{
639+
"id": "a",
640+
"docs": [
641+
{
642+
"ok": {
643+
"_id": "a",
644+
"_rev": "1-23202479633c2b380f79507a776743d5",
645+
"a": 1
646+
}
647+
},
648+
{
649+
"ok": {
650+
"_id": "a",
651+
"_rev": "1-967a00dff5e02add41819138abb3284d"
652+
}
653+
}
654+
]
655+
}
656+
]
657+
}
658+
607659
.. _api/db/bulk_docs:
608660

609661
==================

0 commit comments

Comments
 (0)