You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by Apache Wiki <wi...@apache.org> on 2009/04/28 18:28:42 UTC
[Couchdb Wiki] Update of "HTTP Document API" by PaulDavis
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: