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 "HTTP_Document_API" by RobertNewson
Date Mon, 24 Dec 2012 18:40:12 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 RobertNewson:
http://wiki.apache.org/couchdb/HTTP_Document_API?action=diff&rev1=93&rev2=94

Comment:
fix moar

  The query string parameters ''startkey'', ''endkey'' and ''limit'' may also be used to limit
the result set. For example:
  
  {{{
- GET somedatabase/_all_docs?startkey="doc2"&limit=2 HTTP/1.0
+ GET /somedatabase/_all_docs?startkey="doc2"&limit=2 HTTP/1.0
  }}}
  Will return:
  
@@ -404, +404 @@

  Use ''endkey'' if you are interested  in a specific range of documents:
  
  {{{
- GET somedatabase/_all_docs?startkey="doc2"&endkey="doc3" HTTP/1.0
+ GET /somedatabase/_all_docs?startkey="doc2"&endkey="doc3" HTTP/1.0
  }}}
  This will get keys inbetween and including doc2 and doc3; e.g. ''doc2-b'' and ''doc234''.
  
  Both approaches can be combined with ''descending'':
  
  {{{
- GET somedatabase/_all_docs?startkey="doc2"&limit=2&descending=true HTTP/1.0
+ GET /somedatabase/_all_docs?startkey="doc2"&limit=2&descending=true HTTP/1.0
  }}}
  Will return:
  
@@ -435, +435 @@

  This allows you to see all the documents that were updated and deleted, in the order these
actions are done:
  
  {{{
- GET somedatabase/_changes HTTP/1.0
+ GET /somedatabase/_changes HTTP/1.0
  }}}
  Will return something of the form:
  
@@ -512, +512 @@

  To retrieve an attachment:
  
  {{{
- GET somedatabase/document/attachment HTTP/1.0
+ GET /somedatabase/document/attachment HTTP/1.0
  }}}
  CouchDB replies
  

Mime
View raw message