Search code examples
couchdbcouchappcouchrest

List all CouchApps in a CouchDB?


Is there a way to list all CouchApps in one CouchDB?

I would like to do something like:

couchapp list http://domain.tld:5984/content

And get back a list of all couchapp names.


Solution

  • The trick is to use the _all_docs and then select the ones that you are interested in out of that list with the startkey and endkey.

    Since all design documents _id starts with _design/ we can select all docs between _design/ and the following character which is 0, giving _design0.

    http://www.couch.db:5984/database/_all_docs?startkey="_design/"&endkey="_design0"
    

    Best of luck!