We have a new wiki. The migration is not 100% complete. You can help out by moving pages across. This wiki will exist for as long as there are pages left. |
The official documentation has moved to http://docs.couchdb.org — The transition is not 100% complete, but http://docs.couchdb.org should be seen as having the latest info. In some cases, the wiki still has some more or older info on certain topics inside CouchDB. |
You need to be added to the ContributorsGroup to edit the wiki. But don't worry! Just email any Mailing List or grab us on IRC and let us know your user name. |
Complete HTTP API Reference
See also the official documentation for this topic.
Server-level miscellaneous methods
GET |
/ |
Returns MOTD and version |
|
GET |
/favicon.ico |
Special path for providing a site icon |
|
GET |
/_all_dbs |
Returns a list of all databases on this server |
|
GET |
/_active_tasks |
Returns a list of running tasks |
|
POST |
/_replicate |
Start or cancel replications |
|
* |
/_replicator |
||
GET |
/_uuids |
Returns a list of generated UUIDs |
|
POST |
/_restart |
Restart the server, requires admin privileges |
|
GET |
/_stats |
Returns server statistics |
|
GET |
/_log |
Returns the tail of the server's log file, requires admin privileges |
|
GET |
/_sleep |
Returns success after waiting for a given number of milliseconds (removed since 1.0.0) |
|
GET |
/_utils/file |
Return static web pages that contain the CouchDB administration interface |
Server configuration
GET |
/_config |
Returns the entire server configuration |
GET |
/_config/section |
Returns a single section from server configuration |
GET |
/_config/section/key |
Returns a single configuration value from given section in server configuration |
PUT |
/_config/section/key |
Set a single configuration value in a given section to server configuration |
DELETE |
/_config/section/key |
Delete a single configuration value from a given section in server configuration |
Authentication
GET |
/_session |
Returns cookie based login user information |
|
POST |
/_session |
Do cookie based user login |
|
DELETE |
/_session |
Logout cookie based user |
|
GET |
/_oauth/access_token |
XXX |
|
GET |
/_oauth/authorize |
XXX |
|
POST |
/_oauth/authorize |
XXX |
|
* |
/_oauth/request_token |
XXX |
|
* |
/_users |
Database methods
GET |
/db |
Returns database information |
|
PUT |
/db |
Create a new database |
|
DELETE |
/db |
Delete an existing database |
|
GET |
/db/_changes |
Returns changes for the given database |
|
POST |
/db/_compact |
Starts a compaction for the database, requires admin privileges |
|
POST |
/db/_compact/design-doc |
Starts a compaction for all the views in the selected design document, requires admin privileges |
|
POST |
/db/_view_cleanup |
Removes view files that are not used by any design document, requires admin privileges |
|
POST |
/db/_temp_view |
Execute a given view function for all documents and return the result, requires admin privileges |
|
POST |
/db/_ensure_full_commit |
Makes sure all uncommited changes are written and synchronized to the disk |
|
POST |
/db/_bulk_docs |
Insert multiple documents in to the database in a single request |
|
POST |
/db/_purge |
Purge some historical documents entirely from database history |
|
GET |
/db/_all_docs |
Returns a built-in view of all documents in this database |
|
POST |
/db/_all_docs |
Returns certain rows from the built-in view of all documents |
|
POST |
/db/_missing_revs |
Given a list of document revisions, returns the document revisions that do not exist in the database |
|
POST |
/db/_revs_diff |
Given a list of document revisions, returns differences between the given revisions and ones that are in the database |
|
GET |
/db/_security |
Returns the special security object for the database |
|
PUT |
/db/_security |
Sets the special security object for the database |
|
GET |
/db/_revs_limit |
Sets the limit of historical revisions to store for a single document in the database |
|
PUT |
/db/_revs_limit |
Gets the limit of historical revisions to store for a single document in the database |
Database document methods
POST |
/db |
Inserts a new document with an automatically generated id |
|
GET |
/db/doc |
Returns the latest revision of the document |
|
HEAD |
/db/doc |
Returns basic information about the document |
|
PUT |
/db/doc |
Inserts a new version of the document |
|
DELETE |
/db/doc |
Deletes the document |
|
COPY |
/db/doc |
Copies the document |
|
GET |
/db/doc/attachment |
Gets an attachment of the document |
|
PUT |
/db/doc/attachment |
Inserts an attachment to the document |
|
DELETE |
/db/doc/attachment |
Deletes an attachment from the document |
Special non-replicating documents
GET |
/db/_local/local-doc |
Returns the latest revision of the non-replicated document |
PUT |
/db/_local/local-doc |
Inserts a new version of the non-replicated document |
DELETE |
/db/_local/local-doc |
Deletes the non-replicated document |
COPY |
/db/_local/local-doc |
Copies the non-replicated document |
Special design documents
GET |
/db/_design/design-doc |
Returns the latest revision of the design document |
PUT |
/db/_design/design-doc |
Inserts a new version of the design document |
DELETE |
/db/_design/design-doc |
Deletes the design document |
COPY |
/db/_design/design-doc |
Copies the design document |
GET |
/db/_design/design-doc/attachment |
Gets an attachment of the design document |
PUT |
/db/_design/design-doc/attachment |
Inserts an attachment to the design document |
DELETE |
/db/_design/design-doc/attachment |
Deletes an attachment from the design document |
Special design document handlers
GET |
/db/_design/design-doc/_info |
Returns information about the design document |
|
GET |
/db/_design/design-doc/_view/view-name |
Returns results of the view |
|
POST |
/db/_design/design-doc/_view/view-name |
Returns certain rows from the view |
|
? |
/db/_design/design-doc/_show/show-name |
Invokes the show handler without a document |
|
? |
/db/_design/design-doc/_show/show-name/doc |
Invokes the show handler for the given document |
|
GET |
/db/_design/design-doc/_list/list-name/view-name |
Invokes the list handler to translate the given view results |
|
POST |
/db/_design/design-doc/_list/list-name/view-name |
Invokes the list handler to translate the given view results for certain documents |
|
GET |
/db/_design/design-doc/_list/list-name/other-design-doc/view-name |
Invokes the list handler to translate the given view results |
|
POST |
/db/_design/design-doc/_list/list-name/other-design-doc/view-name |
Invokes the list handler to translate the given view results for certain documents |
|
? |
/db/_design/design-doc/_update/update-name |
Invokes the update handler without a document |
|
? |
/db/_design/design-doc/_update/update-name/doc |
Invokes the update handler for the given document |
|
* |
/db/_design/design-doc/_rewrite/rewrite-name/anything |
Invokes the URL rewrite handler and processes the request after rewriting |

