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 PaulDavis
Date Tue, 28 Apr 2009 16:28:42 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 PaulDavis:
http://wiki.apache.org/couchdb/HTTP_Document_API

The comment on the change is:
Trivial change to add quotes for key parameters.

------------------------------------------------------------------------------
  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:
@@ -375, +375 @@

  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''.
@@ -383, +383 @@

  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:

Mime
View raw message