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 "BreakingChanges" by ChristopherLenz
Date Mon, 26 May 2008 15:13:17 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 ChristopherLenz:
http://wiki.apache.org/couchdb/BreakingChanges

The comment on the change is:
Document bulk update API change

------------------------------------------------------------------------------
  
  === HTTP API Changes ===
  
+ ==== Bulk Updates ====
+ 
+ The JSON structure for bulk updates has been changed slightly for both requests and responses.
+ 
+ For requests, you previously posted a JSON array of document rows. Now, you post a JSON
object with a `docs` member containing that array:
+ 
+ {{{
+   {
+     "docs": [
+       {"_id": "foo", "_rev": "123456", "title": "Foo"},
+       {"_id": "bar", "_rev": "234567", "title": "Bar"}
+     ]
+   }
+ }}}
+ 
+ Responses used to have a JSON object with a `results` member. Now, the response JSON structure
looks as follows:
+ 
+ {{{
+   {
+     "ok": true,
+     "new_revs": [
+       {"_id": "foo", "rev": "345678"},
+       {"_id": "bar", "rev": "456789"}
+     ]
+   }
+ }}}
+ 
+ ''Note that bulk updates are now transactional: either all updates succeed or all fail.
That's why the `ok` member moved to the top-level of the response.''
+ 

Mime
View raw message