3.11. HTTP Resource Handlers

3.11.1. Global HTTP Handlers


These HTTP resources are provided for CouchDB server root level.

/ = {couch_httpd_misc_handlers, handle_welcome_req, <<"Welcome">>}

The favicon handler looks for favicon.ico file within specified directory:

favicon.ico = {couch_httpd_misc_handlers, handle_favicon_req, "/usr/share/couchdb/www"}
_active_tasks = {couch_httpd_misc_handlers, handle_task_status_req}

Provides a list of all server’s databases:

_all_dbs = {couch_httpd_misc_handlers, handle_all_dbs_req}


Sometimes you don’t want to disclose database names for everyone, but you also don’t like/want/able to set up any proxies in front of CouchDB. Removing this handler disables _all_dbs resource and there will be no way to get list of available databases.

The same also is true for other resource handlers.


Provides resource to work with CouchDB config remotely. Any config changes that was made via HTTP API are applied automatically on fly and doesn’t requires server instance to be restarted:

_config = {couch_httpd_misc_handlers, handle_config_req}
_log = {couch_httpd_misc_handlers, handle_log_req}
_oauth = {couch_httpd_oauth, handle_oauth_req}

Provides an API to run temporary replications:

_replicate = {couch_replicator_httpd, handle_req}
_restart = {couch_httpd_misc_handlers, handle_restart_req}

Provides a resource with information about the current user’s session:

_session = {couch_httpd_auth, handle_session_req}
_stats = {couch_httpd_stats_handlers, handle_stats_req}

The _utils handler serves Fauxton‘s web administration page:

_utils = {couch_httpd_misc_handlers, handle_utils_dir_req, "/usr/share/couchdb/www"}

In similar way, you may set up custom handler to let CouchDB serve any static files.


Provides a resource to get UUIDs generated by CouchDB:

_uuids = {couch_httpd_misc_handlers, handle_uuids_req}

This is useful when your client environment isn’t capable of providing truly random IDs (web browsers e.g.).

3.11.2. Database HTTP Handlers


These HTTP resources are available on every CouchDB database.

_all_docs = {couch_mrview_http, handle_all_docs_req}
_local_docs = {couch_mrview_http, handle_local_docs_req}
_design_docs = {couch_mrview_http, handle_design_docs_req}
_changes = {couch_httpd_db, handle_changes_req}
_compact = {couch_httpd_db, handle_compact_req}
_design = {couch_httpd_db, handle_design_req}
_view_cleanup = {couch_mrview_http, handle_cleanup_req}

3.11.3. Design Documents HTTP Handlers


These HTTP resources are provided for design documents.

_compact = {couch_mrview_http, handle_compact_req}
_info = {couch_mrview_http, handle_info_req}
_list = {couch_mrview_show, handle_view_list_req}
_rewrite = {couch_httpd_rewrite, handle_rewrite_req}
_show = {couch_mrview_show, handle_doc_show_req}
_update = {couch_mrview_show, handle_doc_update_req}
_view = {couch_mrview_http, handle_view_req}

Table Of Contents

Previous topic

3.10. External Processes

Next topic

3.12. CouchDB Internal Services

More Help