Return-Path: X-Original-To: apmail-couchdb-commits-archive@www.apache.org Delivered-To: apmail-couchdb-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 4A60A7433 for ; Thu, 1 Dec 2011 23:39:07 +0000 (UTC) Received: (qmail 20534 invoked by uid 500); 1 Dec 2011 23:39:07 -0000 Delivered-To: apmail-couchdb-commits-archive@couchdb.apache.org Received: (qmail 20495 invoked by uid 500); 1 Dec 2011 23:39:07 -0000 Mailing-List: contact commits-help@couchdb.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@couchdb.apache.org Delivered-To: mailing list commits@couchdb.apache.org Received: (qmail 20488 invoked by uid 500); 1 Dec 2011 23:39:07 -0000 Delivered-To: apmail-incubator-couchdb-commits@incubator.apache.org Received: (qmail 20485 invoked by uid 99); 1 Dec 2011 23:39:07 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 01 Dec 2011 23:39:07 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.131] (HELO eos.apache.org) (140.211.11.131) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 01 Dec 2011 23:39:06 +0000 Received: from eos.apache.org (localhost [127.0.0.1]) by eos.apache.org (Postfix) with ESMTP id 1D8FBD52; Thu, 1 Dec 2011 23:38:46 +0000 (UTC) MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable From: Apache Wiki To: Apache Wiki Date: Thu, 01 Dec 2011 23:38:45 -0000 Message-ID: <20111201233845.46582.94004@eos.apache.org> Subject: =?utf-8?q?=5BCouchdb_Wiki=5D_Update_of_=22HTTP=5FDocument=5FAPI=22_by_Jen?= =?utf-8?q?sAlfke?= Auto-Submitted: auto-generated Dear Wiki user, You have subscribed to a wiki page or wiki category on "Couchdb Wiki" for c= hange notification. The "HTTP_Document_API" page has been changed by JensAlfke: http://wiki.apache.org/couchdb/HTTP_Document_API?action=3Ddiff&rev1=3D82&re= v2=3D83 {{{ GET somedatabase/_changes HTTP/1.0 }}} - Will return: + Will return something of the form: = {{{ HTTP/1.1 200 OK @@ -425, +425 @@ Content-Type: application/json Connection: close = + {"results":[ + {"seq":1,"id":"fresh","changes":[{"rev":"1-967a00dff5e02add41819138abb328= 4d"}]}, + {"seq":3,"id":"updated","changes":[{"rev":"2-7051cbe5c8faecd085a3fa619e6e= 6337"}]}, + {"seq":5,"id":"deleted","changes":[{"rev":"2-eec205a9d413992850a6e3267848= 5900"}],"deleted":true} + ], + "last_seq":5} - { - "total_rows": 4, "offset": 0, "rows": [ - {"id": "doc1", "key": "1", "value": {"rev":"1-4124667444"}}, - {"id": "doc2", "key": "2", "value": {"rev":"1-1815587255"}}, - {"id": "doc3", "key": "3", "value": {"rev":"1-1750227892"}}, - {"id": "doc4", "key": "4", "value": {"rev":"2-524044848", "deleted": = true}} - ] - } }}} All the view parameters work on _changes, such as startkey, include_docs = etc. However, note that the startkey is exclusive when applied to this view= . This allows for a usage pattern where the startkey is set to the sequence= id of the last doc returned by the previous query. As the startkey is excl= usive, the same document won't be processed twice. =20