1.3.2. /{db}/_all_docs

GET /{db}/_all_docs

Executes the built-in _all_docs view, returning all of the documents in the database. With the exception of the URL parameters (described below), this endpoint works identically to any other view. Refer to the view endpoint documentation for a complete description of the available query parameters and the format of the returned data.

Parameters:
  • db – Database name
Request Headers:
 
Response Headers:
 
Status Codes:

Request:

  1. GET /db/_all_docs HTTP/1.1
  2. Accept: application/json
  3. Host: localhost:5984

Response:

  1. HTTP/1.1 200 OK
  2. Cache-Control: must-revalidate
  3. Content-Type: application/json
  4. Date: Sat, 10 Aug 2013 16:22:56 GMT
  5. ETag: "1W2DJUZFZSZD9K78UFA3GZWB4"
  6. Server: CouchDB (Erlang/OTP)
  7. Transfer-Encoding: chunked
  8. {
  9. "offset": 0,
  10. "rows": [
  11. {
  12. "id": "16e458537602f5ef2a710089dffd9453",
  13. "key": "16e458537602f5ef2a710089dffd9453",
  14. "value": {
  15. "rev": "1-967a00dff5e02add41819138abb3284d"
  16. }
  17. },
  18. {
  19. "id": "a4c51cdfa2069f3e905c431114001aff",
  20. "key": "a4c51cdfa2069f3e905c431114001aff",
  21. "value": {
  22. "rev": "1-967a00dff5e02add41819138abb3284d"
  23. }
  24. },
  25. {
  26. "id": "a4c51cdfa2069f3e905c4311140034aa",
  27. "key": "a4c51cdfa2069f3e905c4311140034aa",
  28. "value": {
  29. "rev": "5-6182c9c954200ab5e3c6bd5e76a1549f"
  30. }
  31. },
  32. {
  33. "id": "a4c51cdfa2069f3e905c431114003597",
  34. "key": "a4c51cdfa2069f3e905c431114003597",
  35. "value": {
  36. "rev": "2-7051cbe5c8faecd085a3fa619e6e6337"
  37. }
  38. },
  39. {
  40. "id": "f4ca7773ddea715afebc4b4b15d4f0b3",
  41. "key": "f4ca7773ddea715afebc4b4b15d4f0b3",
  42. "value": {
  43. "rev": "2-7051cbe5c8faecd085a3fa619e6e6337"
  44. }
  45. }
  46. ],
  47. "total_rows": 5
  48. }

POST /{db}/_all_docs

POST _all_docs functionality supports identical parameters and behavior as specified in the GET /{db}/_all_docs API but allows for the query string parameters to be supplied as keys in a JSON object in the body of the POST request.

Request:

  1. POST /db/_all_docs HTTP/1.1
  2. Accept: application/json
  3. Content-Length: 70
  4. Content-Type: application/json
  5. Host: localhost:5984
  6. {
  7. "keys" : [
  8. "Zingylemontart",
  9. "Yogurtraita"
  10. ]
  11. }

Response:

  1. {
  2. "total_rows" : 2666,
  3. "rows" : [
  4. {
  5. "value" : {
  6. "rev" : "1-a3544d296de19e6f5b932ea77d886942"
  7. },
  8. "id" : "Zingylemontart",
  9. "key" : "Zingylemontart"
  10. },
  11. {
  12. "value" : {
  13. "rev" : "1-91635098bfe7d40197a1b98d7ee085fc"
  14. },
  15. "id" : "Yogurtraita",
  16. "key" : "Yogurtraita"
  17. }
  18. ],
  19. "offset" : 0
  20. }

1.3.3. /{db}/_design_docs

New in version 2.2.

GET /{db}/_design_docs

Returns a JSON structure of all of the design documents in a given database. The information is returned as a JSON structure containing meta information about the return structure, including a list of all design documents and basic contents, consisting the ID, revision and key. The key is the design document’s _id.

Parameters:
  • db – Database name
Request Headers:
 
  • Accept
    • application/json
    • text/plain
Query Parameters:
 
  • conflicts (boolean) – Includes conflicts information in response. Ignored if include_docs isn’t true. Default is false.
  • descending (boolean) – Return the design documents in descending by key order. Default is false.
  • endkey (string) – Stop returning records when the specified key is reached. Optional.
  • end_key (string) – Alias for endkey param.
  • endkey_docid (string) – Stop returning records when the specified design document ID is reached. Optional.
  • end_key_doc_id (string) – Alias for endkey_docid param.
  • include_docs (boolean) – Include the full content of the design documents in the return. Default is false.
  • inclusive_end (boolean) – Specifies whether the specified end key should be included in the result. Default is true.
  • key (string) – Return only design documents that match the specified key. Optional.
  • keys (string) – Return only design documents that match the specified keys. Optional.
  • limit (number) – Limit the number of the returned design documents to the specified number. Optional.
  • skip (number) – Skip this number of records before starting to return the results. Default is 0.
  • startkey (string) – Return records starting with the specified key. Optional.
  • start_key (string) – Alias for startkey param.
  • startkey_docid (string) – Return records starting with the specified design document ID. Optional.
  • start_key_doc_id (string) – Alias for startkey_docid param.
  • update_seq (boolean) – Response includes an update_seq value indicating which sequence id of the underlying database the view reflects. Default is false.
Response Headers:
 
  • Content-Type
    • application/json
    • text/plain; charset=utf-8
  • ETag – Response signature
Response JSON Object:
 
  • offset (number) – Offset where the design document list started
  • rows (array) – Array of view row objects. By default the information returned contains only the design document ID and revision.
  • total_rows (number) – Number of design documents in the database. Note that this is not the number of rows returned in the actual query.
  • update_seq (number) – Current update sequence for the database
Status Codes:

Request:

  1. GET /db/_design_docs HTTP/1.1
  2. Accept: application/json
  3. Host: localhost:5984

Response:

  1. HTTP/1.1 200 OK
  2. Cache-Control: must-revalidate
  3. Content-Type: application/json
  4. Date: Sat, 23 Dec 2017 16:22:56 GMT
  5. ETag: "1W2DJUZFZSZD9K78UFA3GZWB4"
  6. Server: CouchDB (Erlang/OTP)
  7. Transfer-Encoding: chunked
  8. {
  9. "offset": 0,
  10. "rows": [
  11. {
  12. "id": "_design/ddoc01",
  13. "key": "_design/ddoc01",
  14. "value": {
  15. "rev": "1-7407569d54af5bc94c266e70cbf8a180"
  16. }
  17. },
  18. {
  19. "id": "_design/ddoc02",
  20. "key": "_design/ddoc02",
  21. "value": {
  22. "rev": "1-d942f0ce01647aa0f46518b213b5628e"
  23. }
  24. },
  25. {
  26. "id": "_design/ddoc03",
  27. "key": "_design/ddoc03",
  28. "value": {
  29. "rev": "1-721fead6e6c8d811a225d5a62d08dfd0"
  30. }
  31. },
  32. {
  33. "id": "_design/ddoc04",
  34. "key": "_design/ddoc04",
  35. "value": {
  36. "rev": "1-32c76b46ca61351c75a84fbcbceece2f"
  37. }
  38. },
  39. {
  40. "id": "_design/ddoc05",
  41. "key": "_design/ddoc05",
  42. "value": {
  43. "rev": "1-af856babf9cf746b48ae999645f9541e"
  44. }
  45. }
  46. ],
  47. "total_rows": 5
  48. }

POST /{db}/_design_docs

POST _design_docs functionality supports identical parameters and behavior as specified in the GET /{db}/_design_docs API but allows for the query string parameters to be supplied as keys in a JSON object in the body of the POST request.

Request:

  1. POST /db/_design_docs HTTP/1.1
  2. Accept: application/json
  3. Content-Length: 70
  4. Content-Type: application/json
  5. Host: localhost:5984
  6. {
  7. "keys" : [
  8. "_design/ddoc02",
  9. "_design/ddoc05"
  10. ]
  11. }

The returned JSON is the all documents structure, but with only the selected keys in the output:

  1. {
  2. "total_rows" : 5,
  3. "rows" : [
  4. {
  5. "value" : {
  6. "rev" : "1-d942f0ce01647aa0f46518b213b5628e"
  7. },
  8. "id" : "_design/ddoc02",
  9. "key" : "_design/ddoc02"
  10. },
  11. {
  12. "value" : {
  13. "rev" : "1-af856babf9cf746b48ae999645f9541e"
  14. },
  15. "id" : "_design/ddoc05",
  16. "key" : "_design/ddoc05"
  17. }
  18. ],
  19. "offset" : 0
  20. }

1.3.3.1. Sending multiple queries to a database

New in version 2.2.

POST /{db}/_all_docs/queries

Executes multiple specified built-in view queries of all documents in this database. This enables you to request multiple queries in a single request, in place of multiple POST /{db}/_all_docs requests.

Parameters:
  • db – Database name
Request Headers:
 
Request JSON Object:
 
  • queries – An array of query objects with fields for the parameters of each individual view query to be executed. The field names and their meaning are the same as the query parameters of a regular _all_docs request.
Response Headers:
 
Response JSON Object:
 
  • results (array) – An array of result objects - one for each query. Each result object contains the same fields as the response to a regular _all_docs request.
Status Codes:

Request:

  1. POST /db/_all_docs/queries HTTP/1.1
  2. Content-Type: application/json
  3. Accept: application/json
  4. Host: localhost:5984
  5. {
  6. "queries": [
  7. {
  8. "keys": [
  9. "meatballs",
  10. "spaghetti"
  11. ]
  12. },
  13. {
  14. "limit": 3,
  15. "skip": 2
  16. }
  17. ]
  18. }

Response:

  1. HTTP/1.1 200 OK
  2. Cache-Control: must-revalidate
  3. Content-Type: application/json
  4. Date: Wed, 20 Dec 2017 11:17:07 GMT
  5. ETag: "1H8RGBCK3ABY6ACDM7ZSC30QK"
  6. Server: CouchDB (Erlang/OTP)
  7. Transfer-Encoding: chunked
  8. {
  9. "results" : [
  10. {
  11. "rows": [
  12. {
  13. "id": "meatballs",
  14. "key": "meatballs",
  15. "value": 1
  16. },
  17. {
  18. "id": "spaghetti",
  19. "key": "spaghetti",
  20. "value": 1
  21. }
  22. ],
  23. "total_rows": 3
  24. },
  25. {
  26. "offset" : 2,
  27. "rows" : [
  28. {
  29. "id" : "Adukiandorangecasserole-microwave",
  30. "key" : "Aduki and orange casserole - microwave",
  31. "value" : [
  32. null,
  33. "Aduki and orange casserole - microwave"
  34. ]
  35. },
  36. {
  37. "id" : "Aioli-garlicmayonnaise",
  38. "key" : "Aioli - garlic mayonnaise",
  39. "value" : [
  40. null,
  41. "Aioli - garlic mayonnaise"
  42. ]
  43. },
  44. {
  45. "id" : "Alabamapeanutchicken",
  46. "key" : "Alabama peanut chicken",
  47. "value" : [
  48. null,
  49. "Alabama peanut chicken"
  50. ]
  51. }
  52. ],
  53. "total_rows" : 2667
  54. }
  55. ]
  56. }

1.3.4. /{db}/_bulk_get

POST /{db}/_bulk_get

This method can be called to query several documents in bulk. It is well suited for fetching a specific revision of documents, as replicators do for example, or for getting revision history.

Parameters:
  • db – Database name
Request Headers:
 
  • Accept
    • application/json
    • multipart/related
    • multipart/mixed
  • Content-Typeapplication/json
Query Parameters:
 
  • revs (boolean) – Give the revisions history
Request JSON Object:
 
  • docs (array) – List of document objects, with id, and optionally rev and atts_since
Response Headers:
 
Response JSON Object:
 
  • results (object) – an array of results for each requested document/rev pair. id key lists the requested document ID, docs contains a single-item array of objects, each of which has either an error key and value describing the error, or ok key and associated value of the requested document, with the additional _revisions property that lists the parent revisions if revs=true.
Status Codes:

Request:

  1. POST /db/_bulk_get HTTP/1.1
  2. Accept: application/json
  3. Content-Type:application/json
  4. Host: localhost:5984
  5. {
  6. "docs": [
  7. {
  8. "id": "foo"
  9. "rev": "4-753875d51501a6b1883a9d62b4d33f91",
  10. },
  11. {
  12. "id": "foo"
  13. "rev": "1-4a7e4ae49c4366eaed8edeaea8f784ad",
  14. },
  15. {
  16. "id": "bar",
  17. }
  18. {
  19. "id": "baz",
  20. }
  21. ]
  22. }

Response:

  1. HTTP/1.1 200 OK
  2. Cache-Control: must-revalidate
  3. Content-Type: application/json
  4. Date: Mon, 19 Mar 2018 15:27:34 GMT
  5. Server: CouchDB (Erlang/OTP)
  6. {
  7. "results": [
  8. {
  9. "id": "foo",
  10. "docs": [
  11. {
  12. "ok": {
  13. "_id": "foo",
  14. "_rev": "4-753875d51501a6b1883a9d62b4d33f91",
  15. "value": "this is foo",
  16. "_revisions": {
  17. "start": 4,
  18. "ids": [
  19. "753875d51501a6b1883a9d62b4d33f91",
  20. "efc54218773c6acd910e2e97fea2a608",
  21. "2ee767305024673cfb3f5af037cd2729",
  22. "4a7e4ae49c4366eaed8edeaea8f784ad"
  23. ]
  24. }
  25. }
  26. }
  27. ]
  28. },
  29. {
  30. "id": "foo",
  31. "docs": [
  32. {
  33. "ok": {
  34. "_id": "foo",
  35. "_rev": "1-4a7e4ae49c4366eaed8edeaea8f784ad",
  36. "value": "this is the first revision of foo",
  37. "_revisions": {
  38. "start": 1,
  39. "ids": [
  40. "4a7e4ae49c4366eaed8edeaea8f784ad"
  41. ]
  42. }
  43. }
  44. }
  45. ]
  46. },
  47. {
  48. "id": "bar",
  49. "docs": [
  50. {
  51. "ok": {
  52. "_id": "bar",
  53. "_rev": "2-9b71d36dfdd9b4815388eb91cc8fb61d",
  54. "baz": true,
  55. "_revisions": {
  56. "start": 2,
  57. "ids": [
  58. "9b71d36dfdd9b4815388eb91cc8fb61d",
  59. "309651b95df56d52658650fb64257b97"
  60. ]
  61. }
  62. }
  63. }
  64. ]
  65. },
  66. {
  67. "id": "baz",
  68. "docs": [
  69. {
  70. "error": {
  71. "id": "baz",
  72. "rev": "undefined",
  73. "error": "not_found",
  74. "reason": "missing"
  75. }
  76. }
  77. ]
  78. }
  79. ]
  80. }

Example response with a conflicted document:

Request:

  1. POST /db/_bulk_get HTTP/1.1
  2. Accept: application/json
  3. Content-Type:application/json
  4. Host: localhost:5984
  5. {
  6. "docs": [
  7. {
  8. "id": "a"
  9. }
  10. ]
  11. }

Response:

  1. HTTP/1.1 200 OK
  2. Cache-Control: must-revalidate
  3. Content-Type: application/json
  4. Date: Mon, 19 Mar 2018 15:27:34 GMT
  5. Server: CouchDB (Erlang/OTP)
  6. {
  7. "results": [
  8. {
  9. "id": "a",
  10. "docs": [
  11. {
  12. "ok": {
  13. "_id": "a",
  14. "_rev": "1-23202479633c2b380f79507a776743d5",
  15. "a": 1
  16. }
  17. },
  18. {
  19. "ok": {
  20. "_id": "a",
  21. "_rev": "1-967a00dff5e02add41819138abb3284d"
  22. }
  23. }
  24. ]
  25. }
  26. ]
  27. }

1.3.5. /{db}/_bulk_docs

POST /{db}/_bulk_docs

The bulk document API allows you to create and update multiple documents at the same time within a single request. The basic operation is similar to creating or updating a single document, except that you batch the document structure and information.

When creating new documents the document ID (_id) is optional.

For updating existing documents, you must provide the document ID, revision information (_rev), and new document values.

In case of batch deleting documents all fields as document ID, revision information and deletion status (_deleted) are required.

Parameters:
  • db – Database name
Request Headers:
 
Request JSON Object:
 
  • docs (array) – List of documents objects
  • new_edits (boolean) – If false, prevents the database from assigning them new revision IDs. Default is true. Optional
Response Headers:
 
Response JSON Array of Objects:
 
  • id (string) – Document ID
  • rev (string) – New document revision token. Available if document has saved without errors. Optional
  • error (string) – Error type. Optional
  • reason (string) – Error reason. Optional
Status Codes:

Request:

  1. POST /db/_bulk_docs HTTP/1.1
  2. Accept: application/json
  3. Content-Length: 109
  4. Content-Type:application/json
  5. Host: localhost:5984
  6. {
  7. "docs": [
  8. {
  9. "_id": "FishStew"
  10. },
  11. {
  12. "_id": "LambStew",
  13. "_rev": "2-0786321986194c92dd3b57dfbfc741ce",
  14. "_deleted": true
  15. }
  16. ]
  17. }

Response:

  1. HTTP/1.1 201 Created
  2. Cache-Control: must-revalidate
  3. Content-Length: 144
  4. Content-Type: application/json
  5. Date: Mon, 12 Aug 2013 00:15:05 GMT
  6. Server: CouchDB (Erlang/OTP)
  7. [
  8. {
  9. "ok": true,
  10. "id": "FishStew",
  11. "rev":" 1-967a00dff5e02add41819138abb3284d"
  12. },
  13. {
  14. "ok": true,
  15. "id": "LambStew",
  16. "rev": "3-f9c62b2169d0999103e9f41949090807"
  17. }
  18. ]

1.3.5.1. Inserting Documents in Bulk

Each time a document is stored or updated in CouchDB, the internal B-tree is updated. Bulk insertion provides efficiency gains in both storage space, and time, by consolidating many of the updates to intermediate B-tree nodes.

It is not intended as a way to perform ACID-like transactions in CouchDB, the only transaction boundary within CouchDB is a single update to a single database. The constraints are detailed in Bulk Documents Transaction Semantics.

To insert documents in bulk into a database you need to supply a JSON structure with the array of documents that you want to add to the database. You can either include a document ID, or allow the document ID to be automatically generated.

For example, the following update inserts three new documents, two with the supplied document IDs, and one which will have a document ID generated:

  1. POST /source/_bulk_docs HTTP/1.1
  2. Accept: application/json
  3. Content-Length: 323
  4. Content-Type: application/json
  5. Host: localhost:5984
  6. {
  7. "docs": [
  8. {
  9. "_id": "FishStew",
  10. "servings": 4,
  11. "subtitle": "Delicious with freshly baked bread",
  12. "title": "FishStew"
  13. },
  14. {
  15. "_id": "LambStew",
  16. "servings": 6,
  17. "subtitle": "Serve with a whole meal scone topping",
  18. "title": "LambStew"
  19. },
  20. {
  21. "servings": 8,
  22. "subtitle": "Hand-made dumplings make a great accompaniment",
  23. "title": "BeefStew"
  24. }
  25. ]
  26. }

The return type from a bulk insertion will be 201 Created, with the content of the returned structure indicating specific success or otherwise messages on a per-document basis.

The return structure from the example above contains a list of the documents created, here with the combination and their revision IDs:

  1. HTTP/1.1 201 Created
  2. Cache-Control: must-revalidate
  3. Content-Length: 215
  4. Content-Type: application/json
  5. Date: Sat, 26 Oct 2013 00:10:39 GMT
  6. Server: CouchDB (Erlang OTP)
  7. [
  8. {
  9. "id": "FishStew",
  10. "ok": true,
  11. "rev": "1-6a466d5dfda05e613ba97bd737829d67"
  12. },
  13. {
  14. "id": "LambStew",
  15. "ok": true,
  16. "rev": "1-648f1b989d52b8e43f05aa877092cc7c"
  17. },
  18. {
  19. "id": "00a271787f89c0ef2e10e88a0c0003f0",
  20. "ok": true,
  21. "rev": "1-e4602845fc4c99674f50b1d5a804fdfa"
  22. }
  23. ]

For details of the semantic content and structure of the returned JSON see Bulk Documents Transaction Semantics. Conflicts and validation errors when updating documents in bulk must be handled separately; see Bulk Document Validation and Conflict Errors.

1.3.5.2. Updating Documents in Bulk

The bulk document update procedure is similar to the insertion procedure, except that you must specify the document ID and current revision for every document in the bulk update JSON string.

For example, you could send the following request:

  1. POST /recipes/_bulk_docs HTTP/1.1
  2. Accept: application/json
  3. Content-Length: 464
  4. Content-Type: application/json
  5. Host: localhost:5984
  6. {
  7. "docs": [
  8. {
  9. "_id": "FishStew",
  10. "_rev": "1-6a466d5dfda05e613ba97bd737829d67",
  11. "servings": 4,
  12. "subtitle": "Delicious with freshly baked bread",
  13. "title": "FishStew"
  14. },
  15. {
  16. "_id": "LambStew",
  17. "_rev": "1-648f1b989d52b8e43f05aa877092cc7c",
  18. "servings": 6,
  19. "subtitle": "Serve with a whole meal scone topping",
  20. "title": "LambStew"
  21. },
  22. {
  23. "_id": "BeefStew",
  24. "_rev": "1-e4602845fc4c99674f50b1d5a804fdfa",
  25. "servings": 8,
  26. "subtitle": "Hand-made dumplings make a great accompaniment",
  27. "title": "BeefStew"
  28. }
  29. ]
  30. }

The return structure is the JSON of the updated documents, with the new revision and ID information:

  1. HTTP/1.1 201 Created
  2. Cache-Control: must-revalidate
  3. Content-Length: 215
  4. Content-Type: application/json
  5. Date: Sat, 26 Oct 2013 00:10:39 GMT
  6. Server: CouchDB (Erlang OTP)
  7. [
  8. {
  9. "id": "FishStew",
  10. "ok": true,
  11. "rev": "2-2bff94179917f1dec7cd7f0209066fb8"
  12. },
  13. {
  14. "id": "LambStew",
  15. "ok": true,
  16. "rev": "2-6a7aae7ac481aa98a2042718d09843c4"
  17. },
  18. {
  19. "id": "BeefStew",
  20. "ok": true,
  21. "rev": "2-9801936a42f06a16f16c30027980d96f"
  22. }
  23. ]

You can optionally delete documents during a bulk update by adding the _deleted field with a value of true to each document ID/revision combination within the submitted JSON structure.

The return type from a bulk insertion will be 201 Created, with the content of the returned structure indicating specific success or otherwise messages on a per-document basis.

The content and structure of the returned JSON will depend on the transaction semantics being used for the bulk update; see Bulk Documents Transaction Semantics for more information. Conflicts and validation errors when updating documents in bulk must be handled separately; see Bulk Document Validation and Conflict Errors.

1.3.5.3. Bulk Documents Transaction Semantics

Bulk document operations are non-atomic. This means that CouchDB does not guarantee that any individual document included in the bulk update (or insert) will be saved when you send the request. The response will contain the list of documents successfully inserted or updated during the process. In the event of a crash, some of the documents may have been successfully saved, while others lost.

The response structure will indicate whether the document was updated by supplying the new _rev parameter indicating a new document revision was created. If the update failed, you will get an error of type conflict. For example:

  1. [
  2. {
  3. "id" : "FishStew",
  4. "error" : "conflict",
  5. "reason" : "Document update conflict."
  6. },
  7. {
  8. "id" : "LambStew",
  9. "error" : "conflict",
  10. "reason" : "Document update conflict."
  11. },
  12. {
  13. "id" : "BeefStew",
  14. "error" : "conflict",
  15. "reason" : "Document update conflict."
  16. }
  17. ]

In this case no new revision has been created and you will need to submit the document update, with the correct revision tag, to update the document.

Replication of documents is independent of the type of insert or update. The documents and revisions created during a bulk insert or update are replicated in the same way as any other document.

1.3.5.4. Bulk Document Validation and Conflict Errors

The JSON returned by the _bulk_docs operation consists of an array of JSON structures, one for each document in the original submission. The returned JSON structure should be examined to ensure that all of the documents submitted in the original request were successfully added to the database.

When a document (or document revision) is not correctly committed to the database because of an error, you should check the error field to determine error type and course of action. Errors will be one of the following type:

  • conflict

    The document as submitted is in conflict. The new revision will not have been created and you will need to re-submit the document to the database.

    Conflict resolution of documents added using the bulk docs interface is identical to the resolution procedures used when resolving conflict errors during replication.

  • forbidden

    Entries with this error type indicate that the validation routine applied to the document during submission has returned an error.

    For example, if your validation routine includes the following:

    1. throw({forbidden: 'invalid recipe ingredient'});

    The error response returned will be:

    1. HTTP/1.1 201 Created
    2. Cache-Control: must-revalidate
    3. Content-Length: 80
    4. Content-Type: application/json
    5. Date: Sat, 26 Oct 2013 00:05:17 GMT
    6. Server: CouchDB (Erlang OTP)
    7. [
    8. {
    9. "id": "LambStew",
    10. "error": "forbidden",
    11. "reason": "invalid recipe ingredient"
    12. }
    13. ]