couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Apache Wiki <wikidi...@apache.org>
Subject [Couchdb Wiki] Update of "HttpDocumentApi" by JasonMoiron
Date Wed, 23 Apr 2008 02:52:21 GMT
Dear Wiki user,

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

The following page has been changed by JasonMoiron:
http://wiki.apache.org/couchdb/HttpDocumentApi

The comment on the change is:
_bulk_docs API change

------------------------------------------------------------------------------
  
  === Modify Multiple Documents With a Single Request ===
  
- CouchDB provides a bulk insert/update feature. To use this, you make a ''POST'' request
to the URI ''/{dbname}/_bulk_docs'', with the request body being a JSON document containing
an array of documents.
+ CouchDB provides a bulk insert/update feature. To use this, you make a ''POST'' request
to the URI ''/{dbname}/_bulk_docs'', with the request body being a JSON document with "docs"
containing an array of documents.
  
  {{{
- [
+ {"docs": [
    {"_id": "0", "integer": 0, "string": "0"},
    {"_id": "1", "integer": 1, "string": "1"},
    {"_id": "2", "integer": 2, "string": "2"}
- ]
+  ]
+ }
  }}}
  
  If you omit the per-document ''_id'' specification, CouchDB will generate unique IDs for
you, as it does for regular ''POST'' requests to the database URI.

Mime
View raw message