{ "_id": "49c8b92961f5fbf9bc13fbcc00000484", "_rev": "2-bc797d9090695d916a89d6166d125581", "some": "json", "an": ["array", "of", "things"], "and": {"child": "objects"}, "numbers": 42 }
GET $HOST {"couchdb":"Welcome","version":"1.2.0a-c856916-git"} GET $HOST/demo {"error":"not_found","reason":"no_db_file"} PUT $HOST/demo {"ok":true} GET $HOST/demo {"db_name":"demo","doc_count":0 ... }
PUT $HOST/demo/doc {"foo":"bar"} {"ok":true,"id":"doc","rev":"1-4c6114c65e295552ab1019e2b046b10e"} GET $HOST/demo/doc {"_id":"doc","_rev":"4-42dd533bd9d3e47403c1914ad663ab8b","foo":"bar"} POST $HOST/demo '{"foo":"bar"}' {"ok":true,"id":"49c8b92961f5fbf9bc13fbcc0000128a", \ "rev":"1-4c6114c65e295552ab1019e2b046b10e"}
PUT $HOST/demo/doc {"_rev":"1-4c6114c65e295552ab1019e2b046b10e", "new":"content"} {"ok":true,"id":"doc","rev":"2-c8b28721ed96f3dc039a1ab3f85b0dba"} DELETE $HOST/demo/doc?rev=2-c8b28721ed96f3dc039a1ab3f85b0dba {"ok":true,"id":"doc","rev":"3-8d9fecfc76473aa0d412ca228468c8cc"} PUT $HOST/demo/newdoc/test.html --data-binary @test.html {"ok":true,"id":"newdoc","rev":"1-a2833f8c791e5ce692f2210ef3249d89"}
function(doc) { if (doc.type && doc.type === 'task' && doc.status === "complete") { emit([doc.index || 0], null); } }
_count
kill -9
$ curl $HOST/demo/_changes {"results":[ {"seq":2,"id":"49c8b92961f5fbf9bc13fbcc0000128a","changes": [{"rev":"1-4c6114c65e295552ab1019e2b046b10e"}]}, {"seq":7,"id":"newdoc","changes": [{"rev":"1-a2833f8c791e5ce692f2210ef3249d89"}]}, {"seq":8,"id":"doc","changes": [{"rev":"4-42dd533bd9d3e47403c1914ad663ab8b"}]} ], "last_seq":8}
curl "$HOST/demo/_changes?since=8&feed=longpoll"
POST /_replicate {"source": "mydatabase", "target":"backup"}
function (doc, req) { if (doc._id.match("_design")) { return true; } return doc.type && doc.type === "task"; }
GET $HOST/places/_design/main/_spatial/points?bbox=0,0,180,90
Canonical have built a file sync into Ubuntu itself, based on CouchDB it lets users access their files and program settings wherever they are.
Meebo, one of the most popular online chat applications, uses CouchDB to store its users logs for future access and analysis.
Dimagi uses CouchDB to provide healthcare data to remote clinics with no reliable internet.
Radical Dynamic built Group Complete, a mobile app for offline data collection on Android