/db/_design/design-doc¶HEAD /{db}/_design/{ddoc}¶Returns the HTTP Headers containing a minimal amount of information about the specified design document.
Siehe auch
GET /{db}/_design/{ddoc}¶Returns the contents of the design document specified with the name of the design document and from the specified database from the URL. Unless you request a specific revision, the latest revision of the document will always be returned.
Siehe auch
PUT /{db}/_design/{ddoc}¶The PUT method creates a new named design document, or creates a new revision of the existing design document.
The design documents have some agreement upon their fields and structure. Currently it is the following:
key to process design document
functionsNote, that for filters, lists, shows and updates fields
objects are mapping of function name to string function source code. For
views mapping is the same except that values are objects with map
and reduce (optional) keys which also contains functions source code.
Siehe auch
DELETE /{db}/_design/{ddoc}¶Deletes the specified document from the database. You must supply the
current (latest) revision, either by using the rev parameter to
specify the revision.
Siehe auch
COPY /{db}/_design/{ddoc}¶The COPY (which is non-standard HTTP) copies an existing design document to a new or existing one.
Bemerkung
Copying a design document does automatically reconstruct the view indexes. These will be recreated, as with other views, the first time the new view is accessed.
Siehe auch
/db/_design/design-doc/attachment¶HEAD /{db}/_design/{ddoc}/{attname}¶Returns the HTTP headers containing a minimal amount of information about the specified attachment.
Siehe auch
GET /{db}/_design/{ddoc}/{attname}¶Returns the file attachment associated with the design document. The raw data of the associated attachment is returned (just as if you were accessing a static file.
Siehe auch
PUT /{db}/_design/{ddoc}/{attname}¶Uploads the supplied content as an attachment to the specified design document. The attachment name provided must be a URL encoded string.
Siehe auch
DELETE /{db}/_design/{ddoc}/{attname}¶Deletes the attachment of the specified design document.
Siehe auch
/db/_design/design-doc/_info¶GET /{db}/_design/{ddoc}/_info¶Obtains information about the specified design document, including the index, index size and current status of the design document and associated index information.
| Parameters: |
|
|---|---|
| Request Headers: | |
|
|
| Response Headers: | |
|
|
| Response JSON Object: | |
|
|
| Status Codes: |
|
Request:
GET /recipes/_design/recipe/_info HTTP/1.1
Accept: application/json
Host: localhost:5984
Response:
HTTP/1.1 200 OK
Cache-Control: must-revalidate
Content-Length: 263
Content-Type: application/json
Date: Sat, 17 Aug 2013 12:54:17 GMT
Server: CouchDB (Erlang/OTP)
{
"name": "recipe",
"view_index": {
"compact_running": false,
"data_size": 926691,
"disk_size": 1982704,
"language": "python",
"purge_seq": 0,
"signature": "a59a1bb13fdf8a8a584bc477919c97ac",
"update_seq": 12397,
"updater_running": false,
"waiting_clients": 0,
"waiting_commit": false
}
}
The response from GET /{db}/_design/{ddoc}/_info contains
view_index (object) field with the next structure: