8.1. GET /db/_design/design-doc

MethodGET /db/_design/design-doc
Request None
Response JSON of the existing design document
Admin Privileges Requiredno
Query ArgumentsArgumentrev
 Description Specify the revision to return
 Optionalyes
 Typestring
   
 Argumentrevs
 Description Return a list of the revisions for the document
 Optionalyes
 Typeboolean
 Supported Values 
 trueIncludes the revisions
   
 Argumentrevs_info
 Description Return a list of detailed revision information for the document
 Optionalyes
 Typeboolean
 Supported Values 
 trueIncludes the revisions

Returns the specified design document, design-doc from the specified db. For example, to retrieve the design document recipes you would send the following request:

GET http://couchdb:5984/recipes/_design/recipes
Content-Type: application/json

The returned string will be the JSON of the design document:

{
   "_id" : "_design/recipes",
   "_rev" : "5-39f56a392b86bbee57e2138921346406"
   "language" : "javascript",
   "views" : {
      "by_recipe" : {
         "map" : "function(doc) { if (doc.title != null) emit(doc.title, doc) }"
      },
   },
}

A list of the revisions can be obtained by using the revs query argument, or an extended list of revisions using the revs_info query argument. This operates in the same way as for other documents. Fur further examples, see Section 6.2, “GET /db/doc.