Differences between revisions 40 and 41
Revision 40 as of 2012-03-02 14:57:01
Size: 9615
Comment: Add reference to new document
Revision 41 as of 2013-06-05 21:34:01
Size: 9727
Comment: official docs link
Deletions are marked like this. Additions are marked like this.
Line 4: Line 4:

See also the [[http://docs.couchdb.org/en/latest/api/reference.html|official documentation]] for this topic.

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

HttpGetRoot

GET

/favicon.ico

Special path for providing a site icon

HttpGetFavicon

GET

/_all_dbs

Returns a list of all databases on this server

HttpGetAllDbs

GET

/_active_tasks

Returns a list of running tasks

HttpGetActiveTasks

POST

/_replicate

Start or cancel replications

Replication

*

/_replicator

The database that controls replication at startup

GET

/_uuids

Returns a list of generated UUIDs

HttpGetUuids

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

HttpGetLog

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

Session

POST

/_session

Do cookie based user login

Session

DELETE

/_session

Logout cookie based user

Session

GET

/_oauth/access_token

XXX

GET

/_oauth/authorize

XXX

POST

/_oauth/authorize

XXX

*

/_oauth/request_token

XXX

*

/_users

The authentication and authorization database

Database methods

GET

/db

Returns database information

Database Information

PUT

/db

Create a new database

Create New Database

DELETE

/db

Delete an existing database

Delete a Database

GET

/db/_changes

Returns changes for the given database

Changes

POST

/db/_compact

Starts a compaction for the database, requires admin privileges

Database Compaction

POST

/db/_compact/design-doc

Starts a compaction for all the views in the selected design document, requires admin privileges

View Compaction

POST

/db/_view_cleanup

Removes view files that are not used by any design document, requires admin privileges

View Cleanup

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

Modify Multiple Documents With a Single Request

POST

/db/_purge

Purge some historical documents entirely from database history

Purge Documents

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

Fetch Multiple Documents With a Single Request

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

HttpPostRevsDiff

GET

/db/_security

Returns the special security object for the database

Authorization

PUT

/db/_security

Sets the special security object for the database

Authorization

GET

/db/_revs_limit

Sets the limit of historical revisions to store for a single document in the database

Accessing Database-specific options

PUT

/db/_revs_limit

Gets the limit of historical revisions to store for a single document in the database

Accessing Database-specific options

Database document methods

POST

/db

Inserts a new document with an automatically generated id

Create a new document

GET

/db/doc

Returns the latest revision of the document

Retrieve a document

HEAD

/db/doc

Returns basic information about the document

Document information

PUT

/db/doc

Inserts a new version of the document

Modify a document

DELETE

/db/doc

Deletes the document

Delete a document

COPY

/db/doc

Copies the document

Copy a document

GET

/db/doc/attachment

Gets an attachment of the document

Standalone Attachments

PUT

/db/doc/attachment

Inserts an attachment to the document

Standalone Attachments

DELETE

/db/doc/attachment

Deletes an attachment from the document

Standalone Attachments

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

View Info

GET

/db/_design/design-doc/_view/view-name

Returns results of the view

Query

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

Showing Documents

?

/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

Listing Views (0.10+)

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

Document Update Handlers

?

/db/_design/design-doc/_update/update-name/doc

Invokes the update handler for the given document

Document Update Handlers

*

/db/_design/design-doc/_rewrite/rewrite-name/anything

Invokes the URL rewrite handler and processes the request after rewriting

Rewriting URLs

Complete_HTTP_API_Reference (last edited 2013-06-05 21:34:01 by NathanVanderWilt)