API Cheatsheet

See HTTP_view_API for the view options that apply to many GET operations.

CouchDB Server Level

/InfoGETGet MOTD and version
/_all_dbsDatabasesGETGet a list of databases
/_configConfigGETGet configuration data
/_uuidsUUIDsGET /_uuids?count=1Get a number of UUIDs
/_replicateReplicationPOST /_replicate source=x&target=yReplicate, see Replication
/_statsStatisticsGET /_statsStatistics overview
/_active_tasksActive tasksGET /_active_tasksActive task list (compaction, replication, etc.)

Database Level

Note: Document names must always have embedded / translated to %2F. E.g. "GET /db/foo%2fbar" for the document named "foo/bar". Attachment names may have embedded slashes.

/dbCreationPUT /dbDatabase creation
/dbDeletionDELETE /dbDatabase deletion
/dbInfoGET /dbDatabase information
/dbChange feedGET /db/_changesFeed of changes in the database
/db/_compactCompactionPOST /db/_compactData compaction
/db/_bulk_docsBulk document updatePOST /db/_bulk_docs [{"foo": "bar"}]Update many documents at once
/db/_temp_viewTemporary viewPOST /db/_temp_view {view-code}Run an ad-hoc view
/db/_view_cleanupCleanup view dataPOST /db/_view_cleanupCleanup old view data (see Compaction)]])(in 0.9.x, this was /db/_view/design-doc/view)

See HTTP_database_API for more information.

Documents Level

||/db/_all_docs||Documents||GET /db/_all_docs||List of all documents|||| ||/db||Get document||GET /db/doc||Retrieve a document|||| ||/db||Create document||POST /db {"foo": "bar"}||Create new document|||| ||/db/doc||Update document||PUT /db/doc {"foo": "test"}||Save updated document|||| ||/db/doc||Delete document||DELETE /db/doc||Delete document||||