You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by Apache Wiki <wi...@apache.org> on 2009/12/09 10:22:05 UTC

[Couchdb Wiki] Update of "API_Cheatsheet" by DirkjanOchtman

Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Couchdb Wiki" for change notification.

The "API_Cheatsheet" page has been changed by DirkjanOchtman.
The comment on this change is: Summarize all API endpoints in condensed table format..
http://wiki.apache.org/couchdb/API_Cheatsheet?action=diff&rev1=8&rev2=9

--------------------------------------------------

- See [[HTTP_view_API]] for the view options that apply to most ''GET'' operations.
+ See [[HTTP_view_API]] for the view options that apply to many ''GET'' operations.
  
- = CouchDB Server Level Requests =
+ = CouchDB Server Level =
  
- == info ==
+ ||/||Info||GET||Get MOTD and version||||
+ ||/_all_dbs||Databases||GET||Get a list of databases||||
+ ||/_config||Config||GET||Get configuration data||||
+ ||/_uuids||UUIDs||GET /_uuids?count=1||Get a number of UUIDs||||
+ ||/_replicate||Replication||POST /_replicate source=x&target=y||Replicate, see [[Replication]]||||
+ ||/_active_tasks||Active tasks||GET /_active_tasks||Active task list (compaction, replication, etc.)||||
  
+ = Database level =
- GET /
- 
- == all_dbs ==
- 
- GET /_all_dbs
- 
- == config ==
- 
- GET /_config
- 
- == stats ==
- 
- GET /_stats
- 
- == UUIDs ==
- 
- GET /_uuids (takes a count parameter)
- 
- == replicate ==
- 
- POST /_replicate (see [[Replication]])
- 
- = CouchDB Database Level Requests =
  
  '''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.
  
- == compact ==
+ ||/'''db'''||Creation||PUT /'''db'''||Database creation||||
+ ||/'''db'''||Deletion||DELETE /'''db'''||Database deletion||||
+ ||/'''db'''||Info||GET /'''db'''||Database information||||
+ ||/'''db'''/_compact||Compaction||POST /'''db'''/_compact||Data compaction||||
+ ||/'''db'''||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||||
+ ||/'''db'''/_bulk_docs||Bulk document update||POST /'''db'''/_bulk_docs [{"foo": "bar"}]||Update many documents at once||||
+ ||/'''db'''/_temp_view||Temporary view||POST /'''db'''/_temp_View {'''view-code'''}||Run an ad-hoc view||||
+ ||/'''db'''/_design/'''design-doc'''/_view/'''view'''||View||GET /'''db'''/_design/'''design-doc'''/_view/'''view'''||View query (see [[HTTP_view_API]])||(in 0.9.x, this was /'''db'''/_view/'''design-doc'''/'''view''')||
  
- POST /'''db'''/_compact
- 
- == create ==
- 
- PUT /'''db'''
- 
- == drop ==
- 
- DELETE /'''db'''
- 
- == info ==
- 
- GET /'''db'''
- 
- == all_docs ==
- 
- GET /'''db'''/_all_docs
- 
- == open_doc ==
- 
- GET /'''db'''/'''doc_id'''
- 
- == save_doc (CREATE) ==
- 
- POST /'''db'''
- 
- == save_doc (UPDATE) ==
- 
- PUT /'''db'''/'''doc_id'''
- 
- == remove_doc ==
- 
- DELETE /'''db'''/'''doc_id'''
- 
- == bulk_docs ==
- 
- POST /'''db'''/_bulk_docs
- 
- == query (aka temporary view) ==
- 
- POST /'''db'''/_temp_view
- 
- == view ==
- 
- If you are using CouchDB < 0.9.0:
- 
- GET /'''db'''/_view/'''designname'''/'''viewname'''
- 
- Otherwise
- 
- GET /'''db'''/_design/'''designname'''/_view/'''viewname'''
-