couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject [couchdb-documentation] branch master updated: Clarify use of 'rev' query parameter in document PUT
Date Mon, 13 Mar 2017 18:23:04 GMT
This is an automated email from the ASF dual-hosted git repository.

vatamane pushed a commit to branch master
in repository

The following commit(s) were added to refs/heads/master by this push:
       new  0ecca85   Clarify use of 'rev' query parameter in document PUT
0ecca85 is described below

commit 0ecca859b423d21063e3bd10cc659a4c802a3b20
Author: Jonathan Hall <>
AuthorDate: Thu Mar 9 11:57:34 2017 +0100

    Clarify use of 'rev' query parameter in document PUT
    The previous version mentions 'If-Match' as an "alternative to rev query
    parameter", but doesn't mention the rev query parameter. This fixes that
    discrepency, and further elaborates on how the rev parameter is used and
    when it is necessary.
 src/api/document/common.rst | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/src/api/document/common.rst b/src/api/document/common.rst
index 117412d..92f6a70 100644
--- a/src/api/document/common.rst
+++ b/src/api/document/common.rst
@@ -174,16 +174,22 @@
     revision of the existing document. Unlike the :post:`/{db}`, you must
     specify the document ID in the request URL.
+    When updating an existing document, the current document revision must be
+    included in the document (i.e. the request body), as the `rev` query
+    parameter, or in the `If-Match` request header.
     :param db: Database name
     :param docid: Document ID
     :<header Accept: - :mimetype:`application/json`
                      - :mimetype:`text/plain`
     :<header Content-Type: :mimetype:`application/json`
     :<header If-Match: Document's revision. Alternative to `rev` query
-      parameter
+      parameter or document key. *Optional*
     :<header X-Couch-Full-Commit: Overrides server's
       :config:option:`commit policy <couchdb/delayed_commits>`. Possible values
       are: ``false`` and ``true``. *Optional*
+    :query string rev: Document's revision if updating an existing document.
+      Alternative to `If-Match` header or document key. *Optional*
     :query string batch: Stores document in :ref:`batch mode
       <api/doc/batch-writes>`. Possible values: ``ok``. *Optional*
     :query boolean new_edits: Prevents insertion of a :ref:`conflicting

To stop receiving notification emails like this one, please contact
['"" <>'].

View raw message