couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Apache Wiki <>
Subject [Couchdb Wiki] Update of "HTTP_Document_API" by JensAlfke
Date Wed, 07 Dec 2011 23:17:23 GMT
Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Couchdb Wiki" for change notification.

The "HTTP_Document_API" page has been changed by JensAlfke:

Added documentation of _revisions field.

  ||''_rev'' ||The current MVCC-token/revision of this document ('''mandatory''' and '''immutable''')
  ||''_attachments'' ||If the document has attachments, _attachments holds a (meta-)data structure
(see section on [[HTTP_Document_API#Attachments]]) ||
  ||''_deleted'' ||Indicates that this document has been deleted and previous revisions will
be removed on next compaction run ||
+ ||''_revisions'' ||Revision history of the document ||
  ||''_revs_info'' ||A list of revisions of the document, and their availability ||
  ||''_conflicts'' ||Information about conflicts ||
  ||''_deleted_conflicts'' ||Information about conflicts ||
@@ -123, +124 @@

    "_revs_info": [
-     {"rev": "123456", "status": "available"},
+     {"rev": "3-ffffff", "status": "available"},
-     {"rev": "234567", "status": "missing"},
+     {"rev": "2-eeeeee", "status": "missing"},
-     {"rev": "345678", "status": "deleted"},
+     {"rev": "1-dddddd", "status": "deleted"},
  Here, ''available'' means the revision content is stored in the database and can still be
retrieved. The other values indicate that the content of that revision is not available.
+ Alternatively, the {{{_revisions}}} field, used by the replicator, can return an array of
revision IDs more efficiently. The numeric prefixes are removed, with a "start" value indicating
the prefix for the first (most recent) ID:
+ {{{
+ {
+   "_revisions": {
+     "start": 3,
+     "ids": ["fffff", "eeeee", "ddddd"]
+   }
+ }
+ }}}
  You can fetch the bodies of multiple revisions at once using the parameter `open_revs=["rev1","rev2",...]`,
or you can fetch all leaf revisions using `open_revs=all` (see [[Replication_and_conflicts]]).
The JSON returns an array of objects with an "ok" key pointing to the document, or a "missing"
key pointing to the rev string.

View raw message