30

How can I get a list of all design documents in CouchDB? Using a http query, not futon.

user89021
  • 14,784
  • 16
  • 53
  • 65
  • 4
    Futon just makes queries against CouchDB over HTTP, it doesn't use any special reserved interfaces :) – mikeal May 12 '10 at 01:36

3 Answers3

48

This is the exact query Futon does internally:

GET /dbname/_all_docs?startkey="_design/"&endkey="_design0"&include_docs=true
JasonSmith
  • 72,674
  • 22
  • 123
  • 149
mikeal
  • 4,037
  • 2
  • 27
  • 22
8

New answer for an old question. From v2.2, you can query the _design_docs endpoint for a database: See the docs for deatils, but as a simple example:

GET /dbname/_design_docs

Parameters to the endpoint are consistent with other bulk APIs, like _all_docs.

Daniel Paull
  • 6,797
  • 3
  • 32
  • 41
-2

Exists for powershell a module than simply all operation with CouchDB: PSCouchDB

With this command retrieve all design docs in a specific database. To view full request, use -Verbose parameter:

Get-CouchDBDatabaseDesignDocument -Database test
Community
  • 1
  • 1