You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by dc...@apache.org on 2012/09/14 12:16:59 UTC
[1/49] git commit: Align sphinx & autotools
Updated Branches:
refs/heads/docs [created] 838cf30be
Align sphinx & autotools
- remove manual.rst & release.rst files, only used during migration
- prepare conf.py to be run from share/Makefile similar to:
sphinx-build -a -E -W -n \
-D version='$ver' \
-D release='$ver-git-sha' \
-D project='Apache CouchDB' \
-D copyright='$year, Apache Software Foundation' \
-c `pwd` \
-d /tmp/ \
rst/ \
`pwd`/manual
- set sphinx config:
- update copyright & project
- set default syntax highlighting to JSON
- output docs to share/docs/manual
- move into share/docs/rst
- move old 1.1 .rst updates into main area
- add release.rst for future release notes
- swap specific versions and releases for sphinx variables
Project: http://git-wip-us.apache.org/repos/asf/couchdb/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb/commit/838cf30b
Tree: http://git-wip-us.apache.org/repos/asf/couchdb/tree/838cf30b
Diff: http://git-wip-us.apache.org/repos/asf/couchdb/diff/838cf30b
Branch: refs/heads/docs
Commit: 838cf30be6a71f5ebb17ddc1f91acf72c70ecc23
Parents: 010be92
Author: Dave Cottlehuber <dc...@apache.org>
Authored: Thu Aug 9 01:47:48 2012 +0200
Committer: Dave Cottlehuber <dc...@apache.org>
Committed: Fri Sep 7 20:44:50 2012 +0200
----------------------------------------------------------------------
.gitignore | 4 +-
share/docs/Makefile | 153 +
share/docs/conf.py | 244 +
share/docs/images/futon-createdb.png | Bin 134750 -> 76194 bytes
share/docs/images/futon-editdoc.png | Bin 122661 -> 64369 bytes
share/docs/images/futon-editeddoc.png | Bin 129215 -> 69595 bytes
share/docs/images/futon-overview.png | Bin 120718 -> 63039 bytes
share/docs/images/futon-replform.png | Bin 121806 -> 68068 bytes
share/docs/make.bat | 190 +
share/docs/rst/TODO.txt | 11 +
share/docs/rst/api-basics.rst | 435 +
share/docs/rst/api/authn.rst | 29 +
share/docs/rst/api/configuration.rst | 285 +
share/docs/rst/api/database.rst | 1451 ++
share/docs/rst/api/dbmaint.rst | 3 +
share/docs/rst/api/design.rst | 1250 ++
share/docs/rst/api/documents.rst | 919 +
share/docs/rst/api/local.rst | 157 +
share/docs/rst/api/misc.rst | 793 +
share/docs/rst/api/reference.rst | 16 +
share/docs/rst/changes.rst | 28 +
share/docs/rst/commonjs.rst | 52 +
share/docs/rst/configuring.rst | 490 +
share/docs/rst/ddocs.rst | 6 +
share/docs/rst/features.rst | 191 +
share/docs/rst/index.rst | 30 +
share/docs/rst/intro.rst | 297 +
share/docs/rst/json-structure.rst | 401 +
share/docs/rst/manual.rst |19092 ---------------------
share/docs/rst/other.rst | 148 +
share/docs/rst/proxy.rst | 80 +
share/docs/rst/range.rst | 60 +
share/docs/rst/release.rst | 1661 +--
share/docs/rst/replication.rst | 369 +
share/docs/rst/ssl.rst | 97 +
share/sphinx-docs/1.1/commonjs.rst | 52 -
share/sphinx-docs/1.1/index.rst | 35 -
share/sphinx-docs/1.1/other.rst | 148 -
share/sphinx-docs/1.1/proxy.rst | 80 -
share/sphinx-docs/1.1/range.rst | 60 -
share/sphinx-docs/1.1/replicator.rst | 369 -
share/sphinx-docs/1.1/ssl.rst | 97 -
share/sphinx-docs/Makefile | 153 -
share/sphinx-docs/TODO.txt | 11 -
share/sphinx-docs/api-basics.rst | 435 -
share/sphinx-docs/api/authn.rst | 29 -
share/sphinx-docs/api/configuration.rst | 285 -
share/sphinx-docs/api/database.rst | 1451 --
share/sphinx-docs/api/dbmaint.rst | 3 -
share/sphinx-docs/api/design.rst | 1250 --
share/sphinx-docs/api/documents.rst | 919 -
share/sphinx-docs/api/local.rst | 157 -
share/sphinx-docs/api/misc.rst | 793 -
share/sphinx-docs/api/reference.rst | 16 -
share/sphinx-docs/changes.rst | 28 -
share/sphinx-docs/conf.py | 242 -
share/sphinx-docs/configuring.rst | 490 -
share/sphinx-docs/features.rst | 191 -
share/sphinx-docs/images/futon-createdb.png | Bin 76194 -> 0 bytes
share/sphinx-docs/images/futon-editdoc.png | Bin 64369 -> 0 bytes
share/sphinx-docs/images/futon-editeddoc.png | Bin 69595 -> 0 bytes
share/sphinx-docs/images/futon-overview.png | Bin 63039 -> 0 bytes
share/sphinx-docs/images/futon-replform.png | Bin 68068 -> 0 bytes
share/sphinx-docs/index.rst | 31 -
share/sphinx-docs/intro.rst | 300 -
share/sphinx-docs/json-structure.rst | 401 -
share/sphinx-docs/make.bat | 190 -
share/sphinx-docs/replication.rst | 375 -
share/sphinx-docs/views.rst | 6 -
69 files changed, 8211 insertions(+), 29328 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/couchdb/blob/838cf30b/.gitignore
----------------------------------------------------------------------
diff --git a/.gitignore b/.gitignore
index 0206e1e..899b1a4 100644
--- a/.gitignore
+++ b/.gitignore
@@ -91,7 +91,7 @@ test/etap/test_util.erl
test/javascript/run
share/server/main.js
share/server/main-coffee.js
-share/sphinx-docs/build
+share/docs/html
# for make dev
@@ -119,3 +119,5 @@ couchdb.stdout
cover/*
INSTALL
+
+/share/docs/manual/
http://git-wip-us.apache.org/repos/asf/couchdb/blob/838cf30b/share/docs/Makefile
----------------------------------------------------------------------
diff --git a/share/docs/Makefile b/share/docs/Makefile
new file mode 100644
index 0000000..80edec9
--- /dev/null
+++ b/share/docs/Makefile
@@ -0,0 +1,153 @@
+# Makefile for Sphinx documentation
+#
+
+# You can set these variables from the command line.
+SPHINXOPTS =
+SPHINXBUILD = sphinx-build
+PAPER =
+BUILDDIR =
+
+# Internal variables.
+PAPEROPT_a4 = -D latex_paper_size=a4
+PAPEROPT_letter = -D latex_paper_size=letter
+ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .
+# the i18n builder cannot share the environment and doctrees with the others
+I18NSPHINXOPTS = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) source
+
+.PHONY: help clean html dirhtml singlehtml pickle json htmlhelp qthelp devhelp epub latex latexpdf text man changes linkcheck doctest gettext
+
+help:
+ @echo "Please use \`make <target>' where <target> is one of"
+ @echo " html to make standalone HTML files"
+ @echo " dirhtml to make HTML files named index.html in directories"
+ @echo " singlehtml to make a single large HTML file"
+ @echo " pickle to make pickle files"
+ @echo " json to make JSON files"
+ @echo " htmlhelp to make HTML files and a HTML help project"
+ @echo " qthelp to make HTML files and a qthelp project"
+ @echo " devhelp to make HTML files and a Devhelp project"
+ @echo " epub to make an epub"
+ @echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter"
+ @echo " latexpdf to make LaTeX files and run them through pdflatex"
+ @echo " text to make text files"
+ @echo " man to make manual pages"
+ @echo " texinfo to make Texinfo files"
+ @echo " info to make Texinfo files and run them through makeinfo"
+ @echo " gettext to make PO message catalogs"
+ @echo " changes to make an overview of all changed/added/deprecated items"
+ @echo " linkcheck to check all external links for integrity"
+ @echo " doctest to run all doctests embedded in the documentation (if enabled)"
+
+clean:
+ -rm -rf $(BUILDDIR)/*
+
+html:
+ $(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html
+ @echo
+ @echo "Build finished. The HTML pages are in $(BUILDDIR)/html."
+
+dirhtml:
+ $(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml
+ @echo
+ @echo "Build finished. The HTML pages are in $(BUILDDIR)/dirhtml."
+
+singlehtml:
+ $(SPHINXBUILD) -b singlehtml $(ALLSPHINXOPTS) $(BUILDDIR)/singlehtml
+ @echo
+ @echo "Build finished. The HTML page is in $(BUILDDIR)/singlehtml."
+
+pickle:
+ $(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) $(BUILDDIR)/pickle
+ @echo
+ @echo "Build finished; now you can process the pickle files."
+
+json:
+ $(SPHINXBUILD) -b json $(ALLSPHINXOPTS) $(BUILDDIR)/json
+ @echo
+ @echo "Build finished; now you can process the JSON files."
+
+htmlhelp:
+ $(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) $(BUILDDIR)/htmlhelp
+ @echo
+ @echo "Build finished; now you can run HTML Help Workshop with the" \
+ ".hhp project file in $(BUILDDIR)/htmlhelp."
+
+qthelp:
+ $(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) $(BUILDDIR)/qthelp
+ @echo
+ @echo "Build finished; now you can run "qcollectiongenerator" with the" \
+ ".qhcp project file in $(BUILDDIR)/qthelp, like this:"
+ @echo "# qcollectiongenerator $(BUILDDIR)/qthelp/CouchDB.qhcp"
+ @echo "To view the help file:"
+ @echo "# assistant -collectionFile $(BUILDDIR)/qthelp/CouchDB.qhc"
+
+devhelp:
+ $(SPHINXBUILD) -b devhelp $(ALLSPHINXOPTS) $(BUILDDIR)/devhelp
+ @echo
+ @echo "Build finished."
+ @echo "To view the help file:"
+ @echo "# mkdir -p $$HOME/.local/share/devhelp/CouchDB"
+ @echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/CouchDB"
+ @echo "# devhelp"
+
+epub:
+ $(SPHINXBUILD) -b epub $(ALLSPHINXOPTS) $(BUILDDIR)/epub
+ @echo
+ @echo "Build finished. The epub file is in $(BUILDDIR)/epub."
+
+latex:
+ $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
+ @echo
+ @echo "Build finished; the LaTeX files are in $(BUILDDIR)/latex."
+ @echo "Run \`make' in that directory to run these through (pdf)latex" \
+ "(use \`make latexpdf' here to do that automatically)."
+
+latexpdf:
+ $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
+ @echo "Running LaTeX files through pdflatex..."
+ $(MAKE) -C $(BUILDDIR)/latex all-pdf
+ @echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex."
+
+text:
+ $(SPHINXBUILD) -b text $(ALLSPHINXOPTS) $(BUILDDIR)/text
+ @echo
+ @echo "Build finished. The text files are in $(BUILDDIR)/text."
+
+man:
+ $(SPHINXBUILD) -b man $(ALLSPHINXOPTS) $(BUILDDIR)/man
+ @echo
+ @echo "Build finished. The manual pages are in $(BUILDDIR)/man."
+
+texinfo:
+ $(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo
+ @echo
+ @echo "Build finished. The Texinfo files are in $(BUILDDIR)/texinfo."
+ @echo "Run \`make' in that directory to run these through makeinfo" \
+ "(use \`make info' here to do that automatically)."
+
+info:
+ $(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo
+ @echo "Running Texinfo files through makeinfo..."
+ make -C $(BUILDDIR)/texinfo info
+ @echo "makeinfo finished; the Info files are in $(BUILDDIR)/texinfo."
+
+gettext:
+ $(SPHINXBUILD) -b gettext $(I18NSPHINXOPTS) $(BUILDDIR)/locale
+ @echo
+ @echo "Build finished. The message catalogs are in $(BUILDDIR)/locale."
+
+changes:
+ $(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(BUILDDIR)/changes
+ @echo
+ @echo "The overview file is in $(BUILDDIR)/changes."
+
+linkcheck:
+ $(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(BUILDDIR)/linkcheck
+ @echo
+ @echo "Link check complete; look for any errors in the above output " \
+ "or in $(BUILDDIR)/linkcheck/output.txt."
+
+doctest:
+ $(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(BUILDDIR)/doctest
+ @echo "Testing of doctests in the sources finished, look at the " \
+ "results in $(BUILDDIR)/doctest/output.txt."
http://git-wip-us.apache.org/repos/asf/couchdb/blob/838cf30b/share/docs/conf.py
----------------------------------------------------------------------
diff --git a/share/docs/conf.py b/share/docs/conf.py
new file mode 100644
index 0000000..c855f49
--- /dev/null
+++ b/share/docs/conf.py
@@ -0,0 +1,244 @@
+# -*- coding: utf-8 -*-
+#
+# CouchDB documentation build configuration file, created by
+# sphinx-quickstart on Tue Jul 31 20:52:16 2012.
+#
+# This file is execfile()d with the current directory set to its containing dir.
+#
+# Note that not all possible configuration values are present in this
+# autogenerated file.
+#
+# All configuration values have a default; values that are commented out
+# serve to show the default.
+
+import sys, os
+
+# If extensions (or modules to document with autodoc) are in another directory,
+# add these directories to sys.path here. If the directory is relative to the
+# documentation root, use os.path.abspath to make it absolute, like shown here.
+#sys.path.insert(0, os.path.abspath('.'))
+
+# -- General configuration -----------------------------------------------------
+
+# If your documentation needs a minimal Sphinx version, state it here.
+#needs_sphinx = '1.0'
+
+# Add any Sphinx extension module names here, as strings. They can be extensions
+# coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
+extensions = ['sphinx.ext.todo']
+
+# Add any paths that contain templates here, relative to this directory.
+# templates_path = ['_templates']
+
+# The suffix of source filenames.
+source_suffix = '.rst'
+
+# The encoding of source files.
+#source_encoding = 'utf-8-sig'
+
+# The master toctree document.
+master_doc = 'index'
+
+# General information about the project.
+project = u'Apache CouchDB'
+# copyright = u'2012, Apache Software Foundation'
+
+# The version info for the project you're documenting, acts as replacement for
+# |version| and |release|, also used in various other places throughout the
+# built documents.
+#
+# The short X.Y version.
+# These will be set during make/make dist
+# version = None
+# The full version, including alpha/beta/rc tags.
+# release = None
+
+# The language for content autogenerated by Sphinx. Refer to documentation
+# for a list of supported languages.
+#language = None
+
+# There are two options for replacing |today|: either, you set today to some
+# non-false value, then it is used:
+#today = ''
+# Else, today_fmt is used as the format for a strftime call.
+#today_fmt = '%B %d, %Y'
+
+# List of patterns, relative to source directory, that match files and
+# directories to ignore when looking for source files.
+#exclude_patterns = []
+
+# The reST default role (used for this markup: `text`) to use for all documents.
+#default_role = None
+
+# If true, '()' will be appended to :func: etc. cross-reference text.
+#add_function_parentheses = True
+
+# If true, the current module name will be prepended to all description
+# unit titles (such as .. function::).
+#add_module_names = True
+
+# If true, sectionauthor and moduleauthor directives will be shown in the
+# output. They are ignored by default.
+#show_authors = False
+
+# The name of the Pygments (syntax highlighting) style to use.
+pygments_style = 'sphinx'
+highlight_language = 'json'
+
+# A list of ignored prefixes for module index sorting.
+#modindex_common_prefix = []
+
+
+# -- Options for HTML output ---------------------------------------------------
+
+# The theme to use for HTML and HTML Help pages. See the documentation for
+# a list of builtin themes.
+html_theme = 'default'
+
+# Theme options are theme-specific and customize the look and feel of a theme
+# further. For a list of options available for each theme, see the
+# documentation.
+#html_theme_options = {}
+
+# Add any paths that contain custom themes here, relative to this directory.
+#html_theme_path = []
+
+# The name for this set of Sphinx documents. If None, it defaults to
+# "<project> v<release> documentation".
+#html_title = None
+
+# A shorter title for the navigation bar. Default is the same as html_title.
+#html_short_title = None
+
+# The name of an image file (relative to this directory) to place at the top
+# of the sidebar.
+#html_logo = None
+
+# The name of an image file (within the static path) to use as favicon of the
+# docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32
+# pixels large.
+# html_favicon = None
+
+# Add any paths that contain custom static files (such as style sheets) here,
+# relative to this directory. They are copied after the builtin static files,
+# so a file named "default.css" will overwrite the builtin "default.css".
+# html_static_path = None
+
+# If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
+# using the given strftime format.
+#html_last_updated_fmt = '%b %d, %Y'
+
+# If true, SmartyPants will be used to convert quotes and dashes to
+# typographically correct entities.
+#html_use_smartypants = True
+
+# Custom sidebar templates, maps document names to template names.
+#html_sidebars = {}
+
+# Additional templates that should be rendered to pages, maps page names to
+# template names.
+#html_additional_pages = {}
+
+# If false, no module index is generated.
+html_domain_indices = True
+
+# If false, no index is generated.
+html_use_index = True
+
+# If true, the index is split into individual pages for each letter.
+#html_split_index = False
+
+# If true, links to the reST sources are added to the pages.
+html_show_sourcelink = True
+
+# If true, "Created using Sphinx" is shown in the HTML footer. Default is True.
+#html_show_sphinx = True
+
+# If true, "(C) Copyright ..." is shown in the HTML footer. Default is True.
+#html_show_copyright = True
+
+# If true, an OpenSearch description file will be output, and all pages will
+# contain a <link> tag referring to it. The value of this option must be the
+# base URL from which the finished HTML is served.
+#html_use_opensearch = ''
+
+# This is the file name suffix for HTML files (e.g. ".xhtml").
+#html_file_suffix = None
+
+# Output file base name for HTML help builder.
+htmlhelp_basename = 'CouchDBdoc'
+
+
+# -- Options for LaTeX output --------------------------------------------------
+
+latex_elements = {
+# The paper size ('letterpaper' or 'a4paper').
+#'papersize': 'letterpaper',
+
+# The font size ('10pt', '11pt' or '12pt').
+#'pointsize': '10pt',
+
+# Additional stuff for the LaTeX preamble.
+#'preamble': '',
+}
+
+# Grouping the document tree into LaTeX files. List of tuples
+# (source start file, target name, title, author, documentclass [howto/manual]).
+latex_documents = [
+ ('index', 'CouchDB.tex', u'CouchDB Documentation',
+ u'Developers', 'manual'),
+]
+
+# The name of an image file (relative to this directory) to place at the top of
+# the title page.
+#latex_logo = None
+
+# For "manual" documents, if this is true, then toplevel headings are parts,
+# not chapters.
+#latex_use_parts = False
+
+# If true, show page references after internal links.
+#latex_show_pagerefs = False
+
+# If true, show URL addresses after external links.
+#latex_show_urls = False
+
+# Documents to append as an appendix to all manuals.
+#latex_appendices = []
+
+# If false, no module index is generated.
+#latex_domain_indices = True
+
+
+# -- Options for manual page output --------------------------------------------
+
+# One entry per manual page. List of tuples
+# (source start file, name, description, authors, manual section).
+man_pages = [
+ ('index', 'couchdb', u'CouchDB Documentation',
+ [u'Developers'], 1)
+]
+
+# If true, show URL addresses after external links.
+#man_show_urls = False
+
+
+# -- Options for Texinfo output ------------------------------------------------
+
+# Grouping the document tree into Texinfo files. List of tuples
+# (source start file, target name, title, author,
+# dir menu entry, description, category)
+texinfo_documents = [
+ ('index', 'CouchDB', u'CouchDB Documentation',
+ u'Developers', 'Apache CouchDB', 'A Document-oriented Database with Native JSON support, built-in multi-master replication, and an HTTP API.',
+ 'Miscellaneous'),
+]
+
+# Documents to append as an appendix to all manuals.
+#texinfo_appendices = []
+
+# If false, no module index is generated.
+#texinfo_domain_indices = True
+
+# How to display URL addresses: 'footnote', 'no', or 'inline'.
+#texinfo_show_urls = 'footnote'
http://git-wip-us.apache.org/repos/asf/couchdb/blob/838cf30b/share/docs/images/futon-createdb.png
----------------------------------------------------------------------
diff --git a/share/docs/images/futon-createdb.png b/share/docs/images/futon-createdb.png
index eb152c6..c8c1b9d 100644
Binary files a/share/docs/images/futon-createdb.png and b/share/docs/images/futon-createdb.png differ
http://git-wip-us.apache.org/repos/asf/couchdb/blob/838cf30b/share/docs/images/futon-editdoc.png
----------------------------------------------------------------------
diff --git a/share/docs/images/futon-editdoc.png b/share/docs/images/futon-editdoc.png
index b3b5a51..6802c2c 100644
Binary files a/share/docs/images/futon-editdoc.png and b/share/docs/images/futon-editdoc.png differ
http://git-wip-us.apache.org/repos/asf/couchdb/blob/838cf30b/share/docs/images/futon-editeddoc.png
----------------------------------------------------------------------
diff --git a/share/docs/images/futon-editeddoc.png b/share/docs/images/futon-editeddoc.png
index e44ed18..5c8b549 100644
Binary files a/share/docs/images/futon-editeddoc.png and b/share/docs/images/futon-editeddoc.png differ
http://git-wip-us.apache.org/repos/asf/couchdb/blob/838cf30b/share/docs/images/futon-overview.png
----------------------------------------------------------------------
diff --git a/share/docs/images/futon-overview.png b/share/docs/images/futon-overview.png
index 9ecde97..d1eac6e 100644
Binary files a/share/docs/images/futon-overview.png and b/share/docs/images/futon-overview.png differ
http://git-wip-us.apache.org/repos/asf/couchdb/blob/838cf30b/share/docs/images/futon-replform.png
----------------------------------------------------------------------
diff --git a/share/docs/images/futon-replform.png b/share/docs/images/futon-replform.png
index 9fd9a1d..d904f0d 100644
Binary files a/share/docs/images/futon-replform.png and b/share/docs/images/futon-replform.png differ
http://git-wip-us.apache.org/repos/asf/couchdb/blob/838cf30b/share/docs/make.bat
----------------------------------------------------------------------
diff --git a/share/docs/make.bat b/share/docs/make.bat
new file mode 100644
index 0000000..4994199
--- /dev/null
+++ b/share/docs/make.bat
@@ -0,0 +1,190 @@
+@ECHO OFF
+
+REM Command file for Sphinx documentation
+
+if "%SPHINXBUILD%" == "" (
+ set SPHINXBUILD=sphinx-build
+)
+set BUILDDIR=build
+set ALLSPHINXOPTS=-d %BUILDDIR%/doctrees %SPHINXOPTS% source
+set I18NSPHINXOPTS=%SPHINXOPTS% source
+if NOT "%PAPER%" == "" (
+ set ALLSPHINXOPTS=-D latex_paper_size=%PAPER% %ALLSPHINXOPTS%
+ set I18NSPHINXOPTS=-D latex_paper_size=%PAPER% %I18NSPHINXOPTS%
+)
+
+if "%1" == "" goto help
+
+if "%1" == "help" (
+ :help
+ echo.Please use `make ^<target^>` where ^<target^> is one of
+ echo. html to make standalone HTML files
+ echo. dirhtml to make HTML files named index.html in directories
+ echo. singlehtml to make a single large HTML file
+ echo. pickle to make pickle files
+ echo. json to make JSON files
+ echo. htmlhelp to make HTML files and a HTML help project
+ echo. qthelp to make HTML files and a qthelp project
+ echo. devhelp to make HTML files and a Devhelp project
+ echo. epub to make an epub
+ echo. latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter
+ echo. text to make text files
+ echo. man to make manual pages
+ echo. texinfo to make Texinfo files
+ echo. gettext to make PO message catalogs
+ echo. changes to make an overview over all changed/added/deprecated items
+ echo. linkcheck to check all external links for integrity
+ echo. doctest to run all doctests embedded in the documentation if enabled
+ goto end
+)
+
+if "%1" == "clean" (
+ for /d %%i in (%BUILDDIR%\*) do rmdir /q /s %%i
+ del /q /s %BUILDDIR%\*
+ goto end
+)
+
+if "%1" == "html" (
+ %SPHINXBUILD% -b html %ALLSPHINXOPTS% %BUILDDIR%/html
+ if errorlevel 1 exit /b 1
+ echo.
+ echo.Build finished. The HTML pages are in %BUILDDIR%/html.
+ goto end
+)
+
+if "%1" == "dirhtml" (
+ %SPHINXBUILD% -b dirhtml %ALLSPHINXOPTS% %BUILDDIR%/dirhtml
+ if errorlevel 1 exit /b 1
+ echo.
+ echo.Build finished. The HTML pages are in %BUILDDIR%/dirhtml.
+ goto end
+)
+
+if "%1" == "singlehtml" (
+ %SPHINXBUILD% -b singlehtml %ALLSPHINXOPTS% %BUILDDIR%/singlehtml
+ if errorlevel 1 exit /b 1
+ echo.
+ echo.Build finished. The HTML pages are in %BUILDDIR%/singlehtml.
+ goto end
+)
+
+if "%1" == "pickle" (
+ %SPHINXBUILD% -b pickle %ALLSPHINXOPTS% %BUILDDIR%/pickle
+ if errorlevel 1 exit /b 1
+ echo.
+ echo.Build finished; now you can process the pickle files.
+ goto end
+)
+
+if "%1" == "json" (
+ %SPHINXBUILD% -b json %ALLSPHINXOPTS% %BUILDDIR%/json
+ if errorlevel 1 exit /b 1
+ echo.
+ echo.Build finished; now you can process the JSON files.
+ goto end
+)
+
+if "%1" == "htmlhelp" (
+ %SPHINXBUILD% -b htmlhelp %ALLSPHINXOPTS% %BUILDDIR%/htmlhelp
+ if errorlevel 1 exit /b 1
+ echo.
+ echo.Build finished; now you can run HTML Help Workshop with the ^
+.hhp project file in %BUILDDIR%/htmlhelp.
+ goto end
+)
+
+if "%1" == "qthelp" (
+ %SPHINXBUILD% -b qthelp %ALLSPHINXOPTS% %BUILDDIR%/qthelp
+ if errorlevel 1 exit /b 1
+ echo.
+ echo.Build finished; now you can run "qcollectiongenerator" with the ^
+.qhcp project file in %BUILDDIR%/qthelp, like this:
+ echo.^> qcollectiongenerator %BUILDDIR%\qthelp\CouchDB.qhcp
+ echo.To view the help file:
+ echo.^> assistant -collectionFile %BUILDDIR%\qthelp\CouchDB.ghc
+ goto end
+)
+
+if "%1" == "devhelp" (
+ %SPHINXBUILD% -b devhelp %ALLSPHINXOPTS% %BUILDDIR%/devhelp
+ if errorlevel 1 exit /b 1
+ echo.
+ echo.Build finished.
+ goto end
+)
+
+if "%1" == "epub" (
+ %SPHINXBUILD% -b epub %ALLSPHINXOPTS% %BUILDDIR%/epub
+ if errorlevel 1 exit /b 1
+ echo.
+ echo.Build finished. The epub file is in %BUILDDIR%/epub.
+ goto end
+)
+
+if "%1" == "latex" (
+ %SPHINXBUILD% -b latex %ALLSPHINXOPTS% %BUILDDIR%/latex
+ if errorlevel 1 exit /b 1
+ echo.
+ echo.Build finished; the LaTeX files are in %BUILDDIR%/latex.
+ goto end
+)
+
+if "%1" == "text" (
+ %SPHINXBUILD% -b text %ALLSPHINXOPTS% %BUILDDIR%/text
+ if errorlevel 1 exit /b 1
+ echo.
+ echo.Build finished. The text files are in %BUILDDIR%/text.
+ goto end
+)
+
+if "%1" == "man" (
+ %SPHINXBUILD% -b man %ALLSPHINXOPTS% %BUILDDIR%/man
+ if errorlevel 1 exit /b 1
+ echo.
+ echo.Build finished. The manual pages are in %BUILDDIR%/man.
+ goto end
+)
+
+if "%1" == "texinfo" (
+ %SPHINXBUILD% -b texinfo %ALLSPHINXOPTS% %BUILDDIR%/texinfo
+ if errorlevel 1 exit /b 1
+ echo.
+ echo.Build finished. The Texinfo files are in %BUILDDIR%/texinfo.
+ goto end
+)
+
+if "%1" == "gettext" (
+ %SPHINXBUILD% -b gettext %I18NSPHINXOPTS% %BUILDDIR%/locale
+ if errorlevel 1 exit /b 1
+ echo.
+ echo.Build finished. The message catalogs are in %BUILDDIR%/locale.
+ goto end
+)
+
+if "%1" == "changes" (
+ %SPHINXBUILD% -b changes %ALLSPHINXOPTS% %BUILDDIR%/changes
+ if errorlevel 1 exit /b 1
+ echo.
+ echo.The overview file is in %BUILDDIR%/changes.
+ goto end
+)
+
+if "%1" == "linkcheck" (
+ %SPHINXBUILD% -b linkcheck %ALLSPHINXOPTS% %BUILDDIR%/linkcheck
+ if errorlevel 1 exit /b 1
+ echo.
+ echo.Link check complete; look for any errors in the above output ^
+or in %BUILDDIR%/linkcheck/output.txt.
+ goto end
+)
+
+if "%1" == "doctest" (
+ %SPHINXBUILD% -b doctest %ALLSPHINXOPTS% %BUILDDIR%/doctest
+ if errorlevel 1 exit /b 1
+ echo.
+ echo.Testing of doctests in the sources finished, look at the ^
+results in %BUILDDIR%/doctest/output.txt.
+ goto end
+)
+
+:end
http://git-wip-us.apache.org/repos/asf/couchdb/blob/838cf30b/share/docs/manual/.gitignore
----------------------------------------------------------------------
diff --git a/share/docs/manual/.gitignore b/share/docs/manual/.gitignore
new file mode 100644
index 0000000..e69de29
http://git-wip-us.apache.org/repos/asf/couchdb/blob/838cf30b/share/docs/rst/TODO.txt
----------------------------------------------------------------------
diff --git a/share/docs/rst/TODO.txt b/share/docs/rst/TODO.txt
new file mode 100644
index 0000000..00fd3ba
--- /dev/null
+++ b/share/docs/rst/TODO.txt
@@ -0,0 +1,11 @@
+- Actually explain configuration options in configuring [reference]
+- Write some documentation on (writing) views [views]
+- Expand view documentation in reference (skipping and grouping) [api/design]
+- Write documentation on the changes feed [changes]
+- Share content from 1.1 in main docs somehow (ssl, proxying)
+- Fill out db maintenance reference (?) [api/dbmaint]
+- Fill out authentication reference [api/authn]
+- Document missing APIs [api/database]
+- Add table with list of APIs [api/design]
+- Update documentation for 1.2
+- Update documentation for master
http://git-wip-us.apache.org/repos/asf/couchdb/blob/838cf30b/share/docs/rst/_static/.gitignore
----------------------------------------------------------------------
diff --git a/share/docs/rst/_static/.gitignore b/share/docs/rst/_static/.gitignore
new file mode 100644
index 0000000..e69de29
http://git-wip-us.apache.org/repos/asf/couchdb/blob/838cf30b/share/docs/rst/api-basics.rst
----------------------------------------------------------------------
diff --git a/share/docs/rst/api-basics.rst b/share/docs/rst/api-basics.rst
new file mode 100644
index 0000000..87f2c21
--- /dev/null
+++ b/share/docs/rst/api-basics.rst
@@ -0,0 +1,435 @@
+.. _api-basics:
+
+===========
+CouchDB API
+===========
+
+The CouchDB API is the primary method of interfacing to a CouchDB
+instance. Requests are made using HTTP and requests are used to request
+information from the database, store new data, and perform views and
+formatting of the information stored within the documents.
+
+Requests to the API can be categorised by the different areas of the
+CouchDB system that you are accessing, and the HTTP method used to send
+the request. Different methods imply different operations, for example
+retrieval of information from the database is typically handled by the
+``GET`` operation, while updates are handled by either a ``POST`` or
+``PUT`` request. There are some differences between the information that
+must be supplied for the different methods. For a guide to the basic
+HTTP methods and request structure, see :ref:`api-format`.
+
+For nearly all operations, the submitted data, and the returned data
+structure, is defined within a JavaScript Object Notation (JSON) object.
+Basic information on the content and data types for JSON are provided in
+:ref:`json`.
+
+Errors when accessing the CouchDB API are reported using standard HTTP
+Status Codes. A guide to the generic codes returned by CouchDB are
+provided in :ref:`errors`.
+
+When accessing specific areas of the CouchDB API, specific information
+and examples on the HTTP methods and request, JSON structures, and error
+codes are provided. For a guide to the different areas of the API, see
+:ref:`api-overview`.
+
+.. _api-format:
+
+Request Format and Responses
+============================
+
+CouchDB supports the following HTTP request methods:
+
+- ``GET``
+
+ Request the specified item. As with normal HTTP requests, the format
+ of the URL defines what is returned. With CouchDB this can include
+ static items, database documents, and configuration and statistical
+ information. In most cases the information is returned in the form of
+ a JSON document.
+
+- ``HEAD``
+
+ The ``HEAD`` method is used to get the HTTP header of a ``GET``
+ request without the body of the response.
+
+- ``POST``
+
+ Upload data. Within CouchDB ``POST`` is used to set values, including
+ uploading documents, setting document values, and starting certain
+ administration commands.
+
+- ``PUT``
+
+ Used to put a specified resource. In CouchDB ``PUT`` is used to
+ create new objects, including databases, documents, views and design
+ documents.
+
+- ``DELETE``
+
+ Deletes the specified resource, including documents, views, and
+ design documents.
+
+- ``COPY``
+
+ A special method that can be used to copy documents and objects.
+
+If you use the an unsupported HTTP request type with a URL that does not
+support the specified type, a 405 error will be returned, listing the
+supported HTTP methods. For example:
+
+.. code-block:: javascript
+
+ {
+ "error":"method_not_allowed",
+ "reason":"Only GET,HEAD allowed"
+ }
+
+
+The CouchDB design document API and the functions when returning HTML
+(for example as part of a show or list) enables you to include custom
+HTTP headers through the ``headers`` block of the return object.
+
+HTTP Headers
+============
+
+Because CouchDB uses HTTP for all communication, you need to ensure that
+the correct HTTP headers are supplied (and processed on retrieval) so
+that you get the right format and encoding. Different environments and
+clients will be more or less strict on the effect of these HTTP headers
+(especially when not present). Where possible you should be as specific
+as possible.
+
+Request Headers
+---------------
+
+- ``Content-type``
+
+ Specifies the content type of the information being supplied within
+ the request. The specification uses MIME type specifications. For the
+ majority of requests this will be JSON (``application/json``). For
+ some settings the MIME type will be plain text. When uploading
+ attachments it should be the corresponding MIME type for the
+ attachment or binary (``application/octet-stream``).
+
+ The use of the ``Content-type`` on a request is highly recommended.
+
+- ``Accept``
+
+ Specifies the list of accepted data types to be returned by the
+ server (i.e. that are accepted/understandable by the client). The
+ format should be a list of one or more MIME types, separated by
+ colons.
+
+ For the majority of requests the definition should be for JSON data
+ (``application/json``). For attachments you can either specify the
+ MIME type explicitly, or use ``*/*`` to specify that all file types
+ are supported. If the ``Accept`` header is not supplied, then the
+ ``*/*`` MIME type is assumed (i.e. client accepts all formats).
+
+ The use of ``Accept`` in queries for CouchDB is not required, but is
+ highly recommended as it helps to ensure that the data returned can
+ be processed by the client.
+
+ If you specify a data type using the ``Accept`` header, CouchDB will
+ honor the specified type in the ``Content-type`` header field
+ returned. For example, if you explicitly request ``application/json``
+ in the ``Accept`` of a request, the returned HTTP headers will use
+ the value in the returned ``Content-type`` field.
+
+ For example, when sending a request without an explicit ``Accept``
+ header, or when specifying ``*/*``:
+
+ .. code-block:: http
+
+ GET /recipes HTTP/1.1
+ Host: couchdb:5984
+ Accept: */*
+
+ The returned headers are:
+
+ .. code-block:: http
+
+ Server: CouchDB/1.0.1 (Erlang OTP/R13B)
+ Date: Thu, 13 Jan 2011 13:39:34 GMT
+ Content-Type: text/plain;charset=utf-8
+ Content-Length: 227
+ Cache-Control: must-revalidate
+
+ Note that the returned content type is ``text/plain`` even though the
+ information returned by the request is in JSON format.
+
+ Explicitly specifying the ``Accept`` header:
+
+ .. code-block:: http
+
+ GET /recipes HTTP/1.1
+ Host: couchdb:5984
+ Accept: application/json
+
+ The headers returned include the ``application/json`` content type:
+
+ .. code-block:: http
+
+ Server: CouchDB/|version| (Erlang OTP/R13B)
+ Date: Thu, 13 Jan 2011 13:40:11 GMT
+ Content-Type: application/json
+ Content-Length: 227
+ Cache-Control: must-revalidate
+
+Response Headers
+----------------
+
+Response headers are returned by the server when sending back content
+and include a number of different header fields, many of which are
+standard HTTP response header and have no significance to CouchDB
+operation. The list of response headers important to CouchDB are listed
+below.
+
+- ``Content-type``
+
+ Specifies the MIME type of the returned data. For most request, the
+ returned MIME type is ``text/plain``. All text is encoded in Unicode
+ (UTF-8), and this is explicitly stated in the returned
+ ``Content-type``, as ``text/plain;charset=utf-8``.
+
+- ``Cache-control``
+
+ The cache control HTTP response header provides a suggestion for
+ client caching mechanisms on how to treat the returned information.
+ CouchDB typically returns the ``must-revalidate``, which indicates
+ that the information should be revalidated if possible. This is used
+ to ensure that the dynamic nature of the content is correctly
+ updated.
+
+- ``Content-length``
+
+ The length (in bytes) of the returned content.
+
+- ``Etag``
+
+ The ``Etag`` HTTP header field is used to show the revision for a
+ document.
+
+.. _json:
+
+JSON Basics
+===========
+
+The majority of requests and responses to CouchDB use the JavaScript
+Object Notation (JSON) for formatting the content and structure of the
+data and responses.
+
+JSON is used because it is the simplest and easiest to use solution for
+working with data within a web browser, as JSON structures can be
+evaluated and used as JavaScript objects within the web browser
+environment. JSON also integrates with the server-side JavaScript used
+within CouchDB.
+
+JSON supports the same basic types as supported by JavaScript, these
+are:
+
+- Number (either integer or floating-point).
+
+- String; this should be enclosed by double-quotes and supports Unicode
+ characters and backslash escaping. For example:
+
+ .. code-block:: javascript
+
+ "A String"
+
+- Boolean - a ``true`` or ``false`` value. You can use these strings
+ directly. For example:
+
+ .. code-block:: javascript
+
+ { "value": true}
+
+- Array - a list of values enclosed in square brackets. For example:
+
+ .. code-block:: javascript
+
+ ["one", "two", "three"]
+
+- Object - a set of key/value pairs (i.e. an associative array, or
+ hash). The key must be a string, but the value can be any of the
+ supported JSON values. For example:
+
+ .. code-block:: javascript
+
+ {
+ "servings" : 4,
+ "subtitle" : "Easy to make in advance, and then cook when ready",
+ "cooktime" : 60,
+ "title" : "Chicken Coriander"
+ }
+
+
+ In CouchDB, the JSON object is used to represent a variety of
+ structures, including the main CouchDB document.
+
+Parsing JSON into a JavaScript object is supported through the
+``eval()`` function in JavaScript, or through various libraries that
+will perform the parsing of the content into a JavaScript object for
+you. Libraries for parsing and generating JSON are available in many
+languages, including Perl, Python, Ruby, Erlang and others.
+
+.. warning::
+ Care should be taken to ensure that your JSON structures are
+ valid, invalid structures will cause CouchDB to return an HTTP status code
+ of 500 (server error).
+
+.. _errors:
+
+HTTP Status Codes
+=================
+
+With the interface to CouchDB working through HTTP, error codes and
+statuses are reported using a combination of the HTTP status code
+number, and corresponding data in the body of the response data.
+
+A list of the error codes returned by CouchDB, and generic descriptions
+of the related errors are provided below. The meaning of different
+status codes for specific request types are provided in the
+corresponding API call reference.
+
+- ``200 - OK``
+
+ Request completed successfully.
+
+- ``201 - Created``
+
+ Document created successfully.
+
+- ``202 - Accepted``
+
+ Request has been accepted, but the corresponding operation may not
+ have completed. This is used for background operations, such as
+ database compaction.
+
+- ``304 - Not Modified``
+
+ The additional content requested has not been modified. This is used
+ with the ETag system to identify the version of information returned.
+
+- ``400 - Bad Request``
+
+ Bad request structure. The error can indicate an error with the
+ request URL, path or headers. Differences in the supplied MD5 hash
+ and content also trigger this error, as this may indicate message
+ corruption.
+
+- ``401 - Unauthorized``
+
+ The item requested was not available using the supplied
+ authorization, or authorization was not supplied.
+
+- ``403 - Forbidden``
+
+ The requested item or operation is forbidden.
+
+- ``404 - Not Found``
+
+ The requested content could not be found. The content will include
+ further information, as a JSON object, if available. The structure
+ will contain two keys, ``error`` and ``reason``. For example:
+
+ .. code-block:: javascript
+
+ {"error":"not_found","reason":"no_db_file"}
+
+- ``405 - Resource Not Allowed``
+
+ A request was made using an invalid HTTP request type for the URL
+ requested. For example, you have requested a ``PUT`` when a ``POST``
+ is required. Errors of this type can also triggered by invalid URL
+ strings.
+
+- ``406 - Not Acceptable``
+
+ The requested content type is not supported by the server.
+
+- ``409 - Conflict``
+
+ Request resulted in an update conflict.
+
+- ``412 - Precondition Failed``
+
+ The request headers from the client and the capabilities of the
+ server do not match.
+
+- ``415 - Bad Content Type``
+
+ The content types supported, and the content type of the information
+ being requested or submitted indicate that the content type is not
+ supported.
+
+- ``416 - Requested Range Not Satisfiable``
+
+ The range specified in the request header cannot be satisfied by the
+ server.
+
+- ``417 - Expectation Failed``
+
+ When sending documents in bulk, the bulk load operation failed.
+
+- ``500 - Internal Server Error``
+
+ The request was invalid, either because the supplied JSON was
+ invalid, or invalid information was supplied as part of the request.
+
+.. _api-overview:
+
+CouchDB API Overview
+====================
+
+The components of the API URL path help determine the part of the
+CouchDB server that is being accessed. The result is the structure of
+the URL request both identifies and effectively describes the area of
+the database you are accessing.
+
+As with all URLs, the individual components are separated by a forward
+slash.
+
+As a general rule, URL components and JSON fields starting with the
+``_`` (underscore) character represent a special component or entity
+within the server or returned object. For example, the URL fragment
+``/_all_dbs`` gets a list of all of the databases in a CouchDB instance.
+
+The remainder of the URL API structure can be divided up according to
+the URL structure. The different sections are divided as follows:
+
+- ``/db``
+
+ Database methods, related to adding, updating or deleting databases,
+ and setting database parameters and operations. For more detailed
+ information, see :ref:`api-db`.
+
+- ``/db/doc``
+
+ Document methods, those that create, store, update or delete CouchDB
+ documents and their attachments. For more information, see :ref:`api-doc`.
+
+- ``/db/_local/local-doc``
+
+ Document methods, those that create, store, update or delete CouchDB
+ documents only within the local database. Local documents are not
+ synchronized with other databases. For more information, see
+ :ref:`api-local`.
+
+- ``/db/_design/design-doc``
+
+ Design documents provide the methods and structure for recovering
+ information from a CouchDB database in the form of views, shows and
+ lists. For more information, see :ref:`api-design`.
+
+- ``/_special``
+
+ Special methods that obtain or set information about the CouchDB
+ instance, including methods for configuring replication, accessing
+ the logs, and generate Universally Unique IDs (UUIDs). For more
+ information, see :ref:`api-misc`.
+
+- ``/_config``
+
+ Methods for getting, and settings, CouchDB configuration parameters.
+ For more information, see :ref:`api-config`.
http://git-wip-us.apache.org/repos/asf/couchdb/blob/838cf30b/share/docs/rst/api/authn.rst
----------------------------------------------------------------------
diff --git a/share/docs/rst/api/authn.rst b/share/docs/rst/api/authn.rst
new file mode 100644
index 0000000..66dd7f2
--- /dev/null
+++ b/share/docs/rst/api/authn.rst
@@ -0,0 +1,29 @@
+======================
+Authentication Methods
+======================
+
+.. todo:: Authentication Methods
+
+The CouchDB Authentication methods provide an interface for obtaining
+session and authorization data.
+
+A list of the available methods and URL paths are provided below:
+
++--------+-------------------------+-------------------------------------------+
+| Method | Path | Description |
++========+=========================+===========================================+
+| GET | /_oauth/access_token | TBC |
++--------+-------------------------+-------------------------------------------+
+| GET | /_oauth/authorize | TBC |
++--------+-------------------------+-------------------------------------------+
+| POST | /_oauth/authorize | TBC |
++--------+-------------------------+-------------------------------------------+
+| GET | /_oauth/request_token | TBC |
++--------+-------------------------+-------------------------------------------+
+| GET | /_session | Returns cookie based login user |
+| | | information |
++--------+-------------------------+-------------------------------------------+
+| POST | /_session | Do cookie based user login |
++--------+-------------------------+-------------------------------------------+
+| DELETE | /_session | Logout cookie based user |
++--------+-------------------------+-------------------------------------------+
http://git-wip-us.apache.org/repos/asf/couchdb/blob/838cf30b/share/docs/rst/api/configuration.rst
----------------------------------------------------------------------
diff --git a/share/docs/rst/api/configuration.rst b/share/docs/rst/api/configuration.rst
new file mode 100644
index 0000000..a57e5d2
--- /dev/null
+++ b/share/docs/rst/api/configuration.rst
@@ -0,0 +1,285 @@
+.. _api-config:
+
+=====================
+Configuration Methods
+=====================
+
+The CouchDB API Server Configuration Methods provide an interface to
+query and update the various configuration values within a running
+CouchDB instance.
+
+A list of the available methods and URL paths are provided below:
+
++--------+-------------------------+-------------------------------------------+
+| Method | Path | Description |
++========+=========================+===========================================+
+| GET | /_config | Obtain a list of the entire server |
+| | | configuration |
++--------+-------------------------+-------------------------------------------+
+| GET | /_config/section | Get all the configuration values for the |
+| | | specified section |
++--------+-------------------------+-------------------------------------------+
+| GET | /_config/section/key | Get a specific section/configuration value|
++--------+-------------------------+-------------------------------------------+
+| PUT | /_config/section/key | Set the specified configuration value |
++--------+-------------------------+-------------------------------------------+
+| DELETE | /_config/section/key | Delete the current setting |
++--------+-------------------------+-------------------------------------------+
+
+``GET /_config``
+================
+
+* **Method**: ``GET /_config``
+* **Request**: None
+* **Response**: Returns a structure configuration name and value pairs,
+ organized by section
+* **Admin Privileges Required**: yes
+* **Return Codes**:
+
+ * **200**:
+ Request completed successfully.
+
+Returns the entire CouchDB server configuration as a JSON structure. The
+structure is organized by different configuration sections, with
+individual values.
+
+For example, to get the configuration for a server:
+
+.. code-block:: http
+
+ GET http://couchdb:5984/_config
+ Accept: application/json
+
+The response is the JSON structure:
+
+.. code-block:: javascript
+
+ {
+ "query_server_config" : {
+ "reduce_limit" : "true"
+ },
+ "couchdb" : {
+ "os_process_timeout" : "5000",
+ "max_attachment_chunk_size" : "4294967296",
+ "max_document_size" : "4294967296",
+ "uri_file" : "/var/lib/couchdb/couch.uri",
+ "max_dbs_open" : "100",
+ "view_index_dir" : "/var/lib/couchdb",
+ "util_driver_dir" : "/usr/lib64/couchdb/erlang/lib/couch-1.0.1/priv/lib",
+ "database_dir" : "/var/lib/couchdb",
+ "delayed_commits" : "true"
+ },
+ "attachments" : {
+ "compressible_types" : "text/*, application/javascript, application/json, application/xml",
+ "compression_level" : "8"
+ },
+ "uuids" : {
+ "algorithm" : "utc_random"
+ },
+ "daemons" : {
+ "view_manager" : "{couch_view, start_link, []}",
+ "auth_cache" : "{couch_auth_cache, start_link, []}",
+ "uuids" : "{couch_uuids, start, []}",
+ "stats_aggregator" : "{couch_stats_aggregator, start, []}",
+ "query_servers" : "{couch_query_servers, start_link, []}",
+ "httpd" : "{couch_httpd, start_link, []}",
+ "stats_collector" : "{couch_stats_collector, start, []}",
+ "db_update_notifier" : "{couch_db_update_notifier_sup, start_link, []}",
+ "external_manager" : "{couch_external_manager, start_link, []}"
+ },
+ "stats" : {
+ "samples" : "[0, 60, 300, 900]",
+ "rate" : "1000"
+ },
+ "httpd" : {
+ "vhost_global_handlers" : "_utils, _uuids, _session, _oauth, _users",
+ "secure_rewrites" : "true",
+ "authentication_handlers" : "{couch_httpd_oauth, oauth_authentication_handler},
+ {couch_httpd_auth, cookie_authentication_handler},
+ {couch_httpd_auth, default_authentication_handler}",
+ "port" : "5984",
+ "default_handler" : "{couch_httpd_db, handle_request}",
+ "allow_jsonp" : "false",
+ "bind_address" : "192.168.0.2",
+ "max_connections" : "2048"
+ },
+ "query_servers" : {
+ "javascript" : "/usr/bin/couchjs /usr/share/couchdb/server/main.js"
+ },
+ "couch_httpd_auth" : {
+ "authentication_db" : "_users",
+ "require_valid_user" : "false",
+ "authentication_redirect" : "/_utils/session.html",
+ "timeout" : "600",
+ "auth_cache_size" : "50"
+ },
+ "httpd_db_handlers" : {
+ "_design" : "{couch_httpd_db, handle_design_req}",
+ "_compact" : "{couch_httpd_db, handle_compact_req}",
+ "_view_cleanup" : "{couch_httpd_db, handle_view_cleanup_req}",
+ "_temp_view" : "{couch_httpd_view, handle_temp_view_req}",
+ "_changes" : "{couch_httpd_db, handle_changes_req}"
+ },
+ "replicator" : {
+ "max_http_sessions" : "10",
+ "max_http_pipeline_size" : "10"
+ },
+ "log" : {
+ "include_sasl" : "true",
+ "level" : "info",
+ "file" : "/var/log/couchdb/couch.log"
+ },
+ "httpd_design_handlers" : {
+ "_update" : "{couch_httpd_show, handle_doc_update_req}",
+ "_show" : "{couch_httpd_show, handle_doc_show_req}",
+ "_info" : "{couch_httpd_db, handle_design_info_req}",
+ "_list" : "{couch_httpd_show, handle_view_list_req}",
+ "_view" : "{couch_httpd_view, handle_view_req}",
+ "_rewrite" : "{couch_httpd_rewrite, handle_rewrite_req}"
+ },
+ "httpd_global_handlers" : {
+ "_replicate" : "{couch_httpd_misc_handlers, handle_replicate_req}",
+ "/" : "{couch_httpd_misc_handlers, handle_welcome_req, <<\"Welcome\">>}",
+ "_config" : "{couch_httpd_misc_handlers, handle_config_req}",
+ "_utils" : "{couch_httpd_misc_handlers, handle_utils_dir_req, \"/usr/share/couchdb/www\"}",
+ "_active_tasks" : "{couch_httpd_misc_handlers, handle_task_status_req}",
+ "_session" : "{couch_httpd_auth, handle_session_req}",
+ "_log" : "{couch_httpd_misc_handlers, handle_log_req}",
+ "favicon.ico" : "{couch_httpd_misc_handlers, handle_favicon_req, \"/usr/share/couchdb/www\"}",
+ "_all_dbs" : "{couch_httpd_misc_handlers, handle_all_dbs_req}",
+ "_oauth" : "{couch_httpd_oauth, handle_oauth_req}",
+ "_restart" : "{couch_httpd_misc_handlers, handle_restart_req}",
+ "_uuids" : "{couch_httpd_misc_handlers, handle_uuids_req}",
+ "_stats" : "{couch_httpd_stats_handlers, handle_stats_req}"
+ }
+ }
+
+
+``GET /_config/section``
+========================
+
+* **Method**: ``GET /_config/section``
+* **Request**: None
+* **Response**: All the configuration values within a specified section
+* **Admin Privileges Required**: yes
+* **Return Codes**:
+
+ * **200**:
+ Request completed successfully.
+
+Gets the configuration structure for a single section. For example, to
+retrieve the CouchDB configuration section values:
+
+.. code-block:: http
+
+ GET http://couchdb:5984/_config/couchdb
+ Accept: application/json
+
+The returned JSON contains just the configuration values for this
+section:
+
+.. code-block:: javascript
+
+ {
+ "os_process_timeout" : "5000",
+ "max_attachment_chunk_size" : "4294967296",
+ "max_document_size" : "4294967296",
+ "uri_file" : "/var/lib/couchdb/couch.uri",
+ "max_dbs_open" : "100",
+ "view_index_dir" : "/var/lib/couchdb",
+ "util_driver_dir" : "/usr/lib64/couchdb/erlang/lib/couch-1.0.1/priv/lib",
+ "database_dir" : "/var/lib/couchdb",
+ "delayed_commits" : "true"
+ }
+
+``GET /_config/section/key``
+============================
+
+* **Method**: ``GET /_config/section/key``
+* **Request**: None
+* **Response**: Value of the specified key/section
+* **Admin Privileges Required**: yes
+* **Return Codes**:
+
+ * **200**:
+ Request completed successfully.
+
+Gets a single configuration value from within a specific configuration
+section. For example, to obtain the current log level:
+
+.. code-block:: http
+
+ GET http://couchdb:5984/_config/log/level
+ Accept: application/json
+
+Returns the string of the log level:
+
+.. code-block:: javascript
+
+ "info"
+
+.. note::
+ The returned value will be the JSON of the value, which may be a
+ string or numeric value, or an array or object. Some client
+ environments may not parse simple strings or numeric values as valid JSON.
+
+.. _api-put-config:
+
+``PUT /_config/section/key``
+============================
+
+* **Method**: ``PUT /_config/section/key``
+* **Request**: Value structure
+* **Response**: Previous value
+* **Admin Privileges Required**: yes
+* **Return Codes**:
+
+ * **200**:
+ Configuration option updated successfully
+
+ * **500**:
+ Error setting configuration
+
+Updates a configuration value. The new value should be supplied in the
+request body in the corresponding JSON format. For example, if you are
+setting a string value, you must supply a valid JSON string.
+
+For example, to set the function used to generate UUIDs by the
+``GET /_uuids`` API call to use the ``utc_random`` generator:
+
+.. code-block:: http
+
+ PUT http://couchdb:5984/_config/uuids/algorithm
+ Content-Type: application/json
+
+ "utc_random"
+
+The return value will be empty, with the response code indicating the
+success or failure of the configuration setting.
+
+``DELETE /_config/section/key``
+===============================
+
+* **Method**: ``DELETE /_config/section/key``
+* **Request**: None
+* **Response**: Previous value
+* **Admin Privileges Required**: yes
+* **Return Codes**:
+
+ * **409**:
+ Supplied revision is incorrect or missing
+
+Deletes a configuration value. The returned JSON will be the value of
+the configuration parameter before it was deleted. For example, to
+delete the UUID parameter:
+
+.. code-block:: http
+
+ DELETE http://couchdb:5984/_config/uuids/algorithm
+ Content-Type: application/json
+
+The returned value is the last configured UUID function:
+
+.. code-block:: javascript
+
+ "random"