Method | GET /db | |
Request | None | |
Response | Information about the database in JSON format | |
Admin Privileges Required | no | |
Return Codes | ||
404 | The requested content could not be found. The returned content will include further information, as a JSON object, if available. |
Gets information about the specified database. For example, to
retrieve the information for the database
recipe
:
GET http://couchdb:5984/recipes Accept: application/json
The JSON response contains meta information about the database. A sample of the JSON returned for an empty database is provided below:
{ "compact_running" : false, "committed_update_seq" : 375048, "disk_format_version" : 5, "disk_size" : 33153123, "doc_count" : 18386, "doc_del_count" : 0, "db_name" : "recipes", "instance_start_time" : "1290700340925570", "purge_seq" : 10, "update_seq" : 375048 }
The elements of the returned structure are shown in the table below:
Table 5.2. CouchDB database information object
Field | Description |
committed_update_seq | The number of committed update. |
compact_running | Set to true if the database compaction routine is operating on this database. |
db_name | The name of the database. |
disk_format_version | The version of the physical format used for the data when it is stored on disk. |
disk_size | Size in bytes of the data as stored on the disk. Views indexes are not included in the calculation. |
doc_count | A count of the documents in the specified database. |
doc_del_count | Number of deleted documents |
instance_start_time | Timestamp of when the database was created, expressed in milliseconds since the epoch. |
purge_seq | The number of purge operations on the database. |
update_seq | The current number of updates to the database. |