| Method | PUT /db/_design/design-doc | |
| Request | JSON of the design document | |
| Response | JSON status | |
| Admin Privileges Required | no | |
Upload the specified design document,
design-doc, to the specified database. The
design document should follow the definition of a design document,
as summarised in the following table.
Table 8.2. Design Document
| Field | Description |
_id | Design Document ID |
_rev | Design Document Revision |
views | View |
viewname | View Definition |
map | Map Function for View |
reduce (optional) | Reduce Function for View |
For more information on writing views, see ???.