6.2. GET /db/doc

6.2.1. Attachments
6.2.2. Getting a List of Revisions
6.2.3. Obtaining an Extended Revision History
6.2.4. Obtaining a Specific Revision
MethodGET /db/doc
Request None
Response Returns the JSON for the document
Admin Privileges Requiredno
Query ArgumentsArgumentconflicts
 Description Returns the conflict tree for the document.
 Optionalyes
 Typeboolean
 Defaultfalse
 Supported Values 
 trueIncludes the revisions
   
 Argumentrev
 Description Specify the revision to return
 Optionalyes
 Typestring
 Supported Values 
 trueIncludes the revisions
   
 Argumentrevs
 Description Return a list of the revisions for the document
 Optionalyes
 Typeboolean
   
 Argumentrevs_info
 Description Return a list of detailed revision information for the document
 Optionalyes
 Typeboolean
 Supported Values 
 trueIncludes the revisions
Return Codes
201 Document created
400 The format of the request or revision was invalid
404 The specified document or revision cannot be found, or has been deleted
409 Conflict - a document with the specified document ID already exists

Returns the specified doc from the specified db. For example, to retrieve the document with the id FishStew you would send the following request:

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

The returned JSON is the JSON of the document, including the document ID and revision number:

{
   "_id" : "FishStew",
   "_rev" : "3-a1a9b39ee3cc39181b796a69cb48521c",
   "servings" : 4,
   "subtitle" : "Delicious with a green salad",
   "title" : "Irish Fish Stew"
}

Unless you request a specific revision, the latest revision of the document will always be returned.