couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kxe...@apache.org
Subject [01/32] git commit: updated refs/heads/1781-reorganize-and-improve-docs to 11fd32a
Date Fri, 14 Jun 2013 08:24:58 GMT
Updated Branches:
  refs/heads/1781-reorganize-and-improve-docs [created] 11fd32aa1


Setup API sections references.

Scheme: api/{section}/{endpoint}.{method}


Project: http://git-wip-us.apache.org/repos/asf/couchdb/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb/commit/fd3e45cd
Tree: http://git-wip-us.apache.org/repos/asf/couchdb/tree/fd3e45cd
Diff: http://git-wip-us.apache.org/repos/asf/couchdb/diff/fd3e45cd

Branch: refs/heads/1781-reorganize-and-improve-docs
Commit: fd3e45cdd8ae32567c3440d27bf92b95c50962d6
Parents: eb364ff
Author: Alexander Shorin <kxepal@apache.org>
Authored: Mon Jun 3 11:09:56 2013 +0400
Committer: Alexander Shorin <kxepal@apache.org>
Committed: Mon Jun 3 11:09:56 2013 +0400

----------------------------------------------------------------------
 share/doc/src/api/authn.rst         |  2 +
 share/doc/src/api/configuration.rst | 14 +++++-
 share/doc/src/api/database.rst      | 80 ++++++++++++++++++++++++--------
 share/doc/src/api/design.rst        | 64 ++++++++++++++++++++-----
 share/doc/src/api/documents.rst     | 54 ++++++++++++---------
 share/doc/src/api/local.rst         | 13 ++++--
 share/doc/src/api/misc.rst          | 33 +++++++++++--
 share/doc/src/intro.rst             |  4 +-
 8 files changed, 198 insertions(+), 66 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb/blob/fd3e45cd/share/doc/src/api/authn.rst
----------------------------------------------------------------------
diff --git a/share/doc/src/api/authn.rst b/share/doc/src/api/authn.rst
index bac198b..7635c1c 100644
--- a/share/doc/src/api/authn.rst
+++ b/share/doc/src/api/authn.rst
@@ -10,6 +10,8 @@
 .. License for the specific language governing permissions and limitations under
 .. the License.
 
+.. _api/auth:
+
 ======================
 Authentication Methods
 ======================

http://git-wip-us.apache.org/repos/asf/couchdb/blob/fd3e45cd/share/doc/src/api/configuration.rst
----------------------------------------------------------------------
diff --git a/share/doc/src/api/configuration.rst b/share/doc/src/api/configuration.rst
index 6c2c588..9fdec09 100644
--- a/share/doc/src/api/configuration.rst
+++ b/share/doc/src/api/configuration.rst
@@ -10,7 +10,7 @@
 .. License for the specific language governing permissions and limitations under
 .. the License.
 
-.. _api-config:
+.. _api/config:
 
 =====================
 Configuration Methods
@@ -38,6 +38,8 @@ A list of the available methods and URL paths are provided below:
 | DELETE | /_config/section/key    | Delete the current setting                |
 +--------+-------------------------+-------------------------------------------+
 
+.. _api/config.get:
+
 ``GET /_config``
 ================
 
@@ -167,6 +169,9 @@ The response is the JSON structure:
     }
         
 
+.. _api/config/section:
+.. _api/config/section.get:
+
 ``GET /_config/section``
 ========================
 
@@ -204,6 +209,9 @@ section:
        "delayed_commits" : "true"
     }
 
+.. _api/config/section/key:
+.. _api/config/section/key.get:
+
 ``GET /_config/section/key``
 ============================
 
@@ -235,7 +243,7 @@ Returns the string of the log level:
    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:
+.. _api/config/section/key.put:
 
 ``PUT /_config/section/key``
 ============================
@@ -269,6 +277,8 @@ For example, to set the function used to generate UUIDs by the
 The return value will be empty, with the response code indicating the
 success or failure of the configuration setting.
 
+.. _api/config/section/key.delete:
+
 ``DELETE /_config/section/key``
 ===============================
 

http://git-wip-us.apache.org/repos/asf/couchdb/blob/fd3e45cd/share/doc/src/api/database.rst
----------------------------------------------------------------------
diff --git a/share/doc/src/api/database.rst b/share/doc/src/api/database.rst
index 826adaa..c6022be 100644
--- a/share/doc/src/api/database.rst
+++ b/share/doc/src/api/database.rst
@@ -10,7 +10,7 @@
 .. License for the specific language governing permissions and limitations under
 .. the License.
 
-.. _api-db:
+.. _api/db:
 
 ================
 Database Methods
@@ -99,7 +99,7 @@ For clarity, the form below is used in the URL paths:
 
 Where ``db`` is the name of any database.
 
-.. _api-get-db:
+.. _api/db.get:
 
 ``GET /db``
 ===========
@@ -176,6 +176,8 @@ The elements of the returned structure are shown in the table below:
 |                                  | database.                                 |
 +----------------------------------+-------------------------------------------+
 
+.. _api/db.put:
+
 ``PUT /db``
 ===========
 
@@ -224,6 +226,8 @@ The returned content contains the JSON status:
 Anything should be treated as an error, and the problem should be taken
 form the HTTP response code.
 
+.. _api/db.delete:
+
 ``DELETE /db``
 ==============
 
@@ -258,7 +262,8 @@ If successful, the returned JSON will indicate success
        "ok" : true
     }
 
-.. _api-changes:
+.. _api/db/changes:
+.. _api/db/changes.get:
 
 ``GET /db/_changes``
 ====================
@@ -431,7 +436,8 @@ ID's or the list of ``_design`` documents in a database. If the
 passed in the ``doc_ids`` parameter as a JSON array. For more
 information, see :ref:`changes`.
 
-.. _api-compact:
+.. _api/db/compact:
+.. _api/db/compact.post:
 
 ``POST /db/_compact``
 =====================
@@ -460,7 +466,7 @@ disk database file by performing the following operations:
 
 -  Removes old revisions of documents from the database, up to the
    per-database limit specified by the ``_revs_limit`` database
-   parameter. See :ref:`api-get-db`.
+   parameter. See :ref:`api/db.get`.
 
 Compaction can only be requested on an individual database; you cannot
 compact all the databases for a CouchDB instance. The compaction process
@@ -469,12 +475,13 @@ runs as a background process.
 You can determine if the compaction process is operating on a database
 by obtaining the database meta information, the ``compact_running``
 value of the returned database structure will be set to true. See
-:ref:`api-get-db`.
+:ref:`api/db.get`.
 
 You can also obtain a list of running processes to determine whether
-compaction is currently running. See :ref:`active-tasks`.
+compaction is currently running. See :ref:`api/misc/active_tasks`.
 
-.. _api-compact-ddoc:
+.. _api/db/compact/ddoc:
+.. _api/db/compact/ddoc.post:
 
 ``POST /db/_compact/design-doc``
 ================================
@@ -515,6 +522,9 @@ compaction request has been received (HTTP status code 202):
     }
         
 
+.. _api/db/view_cleanup:
+.. _api/db/view_cleanup.post:
+
 ``POST /db/_view_cleanup``
 ==========================
 
@@ -539,6 +549,9 @@ If the request is successful, a basic status message us returned:
     }
         
 
+.. _api/db/ensure_full_commit:
+.. _api/db/ensure_full_commit.post:
+
 ``POST /db/_ensure_full_commit``
 ================================
 
@@ -576,6 +589,9 @@ timestamp for when the CouchDB instance was started:
       "instance_start_time" : "1288186189373361"
     }
 
+.. _api/db/bulk_docs:
+.. _api/db/bulk_docs.post:
+
 ``POST /db/_bulk_docs``
 =======================
 
@@ -679,9 +695,9 @@ documents created, here with the combination and their revision IDs:
               
 
 The content and structure of the returned JSON will depend on the transaction
-semantics being used for the bulk update; see :ref:`bulk-semantics` for more
-information. Conflicts and validation errors when updating documents in
-bulk must be handled separately; see :ref:`bulk-validation`.
+semantics being used for the bulk update; see :ref:`api/db/bulk_docs/semantics`
+for more information. Conflicts and validation errors when updating documents in
+bulk must be handled separately; see :ref:`api/db/bulk_docs/validation`.
 
 Updating Documents in Bulk
 --------------------------
@@ -752,11 +768,11 @@ the returned structure indicating specific success or otherwise messages
 on a per-document basis.
 
 The content and structure of the returned JSON will depend on the transaction
-semantics being used for the bulk update; see :ref:`bulk-semantics` for more
-information. Conflicts and validation errors when updating documents in
-bulk must be handled separately; see :ref:`bulk-validation`.
+semantics being used for the bulk update; see :ref:`api/db/bulk_docs/semantics`
+for more information. Conflicts and validation errors when updating documents in
+bulk must be handled separately; see :ref:`api/db/bulk_docs/validation`.
 
-.. _bulk-semantics:
+.. _api/db/bulk_docs/semantics:
 
 Bulk Documents Transaction Semantics
 ------------------------------------
@@ -873,7 +889,7 @@ you make use of the all-or-nothing mode the exact list of documents,
 revisions (and their conflict state) may or may not be replicated to
 other databases correctly.
 
-.. _bulk-validation:
+.. _api/db/bulk_docs/validation:
 
 Bulk Document Validation and Conflict Errors
 --------------------------------------------
@@ -935,7 +951,9 @@ following type:
           "error" : "forbidden",
           "reason" : "invalid recipe ingredient"
        }
-             
+
+.. _api/db/temp_view:
+.. _api/db/temp_view.post:
 
 ``POST /db/_temp_view``
 =======================
@@ -990,6 +1008,9 @@ relies on being executed at the time of the request. In addition to the
 time taken, they are also computationally very expensive to produce. You
 should use a defined view if you want to achieve the best performance.
 
+.. _api/db/purge:
+.. _api/db/purge.post:
+
 ``POST /db/_purge``
 ===================
 
@@ -1015,7 +1036,7 @@ large number of documents you should run purge on each database.
 
    Purging documents does not remove the space used by them on disk. To
    reclaim disk space, you should run a database compact (see
-   :ref:`api-compact`), and compact views (see :ref:`api-compact-ddoc`).
+   :ref:`api/db/compact`), and compact views (see :ref:`api/db/compact/ddoc`).
 
 To perform a purge operation you must send a request including the JSON
 of the document IDs that you want to purge. For example:
@@ -1068,6 +1089,9 @@ database sequence is greater than 1, then the view index is entirely
 rebuilt. This is an expensive operation as every document in the
 database must be examined.
 
+.. _api/db/all_docs:
+.. _api/db/all_docs.get:
+
 ``GET /db/_all_docs``
 =====================
 
@@ -1241,6 +1265,8 @@ database documents, with the returned key consisting of the ID of the
 document. The remainder of the interface is therefore identical to the
 View query arguments and their behavior.
 
+.. _api/db/all_docs.post:
+
 ``POST /db/_all_docs``
 ======================
 
@@ -1252,7 +1278,7 @@ View query arguments and their behavior.
 The ``POST`` to ``_all_docs`` allows to specify multiple keys to be
 selected from the database. This enables you to request multiple
 documents in a single request, in place of multiple
-:ref:`api-get-doc` requests.
+:ref:`api/doc.get` requests.
 
 The request body should contain a list of the keys to be returned as an
 array to a ``keys`` object. For example:
@@ -1295,6 +1321,9 @@ selected keys in the output:
        "offset" : 0
     }
 
+.. _api/db/missing_revs:
+.. _api/db/missing_revs.post:
+
 ``POST /db/_missing_revs``
 ==========================
 
@@ -1303,6 +1332,9 @@ selected keys in the output:
 * **Response**: JSON of missing revisions
 * **Admin Privileges Required**: no
 
+.. _api/db/revs_diff:
+.. _api/db/revs_diff.post:
+
 ``POST /db/_revs_diff``
 =======================
 
@@ -1311,6 +1343,9 @@ selected keys in the output:
 * **Response**: JSON list of differences from supplied document/revision list
 * **Admin Privileges Required**: no
 
+.. _api/db/security:
+.. _api/db/security.get:
+
 ``GET /db/_security``
 =====================
 
@@ -1365,6 +1400,8 @@ Security object structure is:
    If the security object for a database has never been set, then the
    value returned will be empty.
 
+.. _api/db/security.put:
+
 ``PUT /db/_security``
 =====================
 
@@ -1406,6 +1443,9 @@ If the setting was successful, a JSON status object will be returned:
        "ok" : true
     }
 
+.. _api/db/revs_limit:
+.. _api/db/revs_limit.get:
+
 ``GET /db/_revs_limit``
 =======================
 
@@ -1430,6 +1470,8 @@ The returned information is the current setting as a numerical scalar:
 
     1000
 
+.. _api/db/revs_limit.put:
+
 ``PUT /db/_revs_limit``
 =======================
 

http://git-wip-us.apache.org/repos/asf/couchdb/blob/fd3e45cd/share/doc/src/api/design.rst
----------------------------------------------------------------------
diff --git a/share/doc/src/api/design.rst b/share/doc/src/api/design.rst
index 38bdd0b..570c08e 100644
--- a/share/doc/src/api/design.rst
+++ b/share/doc/src/api/design.rst
@@ -10,7 +10,7 @@
 .. License for the specific language governing permissions and limitations under
 .. the License.
 
-.. _api-design:
+.. _api/ddoc:
 
 =======================
 Design Document Methods
@@ -32,6 +32,8 @@ A list of the available methods and URL paths are provided below:
 
 Design Document API Calls
 
+.. _api/ddoc.get:
+
 ``GET /db/_design/design-doc``
 ==============================
 
@@ -93,7 +95,9 @@ The returned string will be the JSON of the design document:
 A list of the revisions can be obtained by using the ``revs`` query
 argument, or an extended list of revisions using the ``revs_info`` query
 argument. This operates in the same way as for other documents. Fur
-further examples, see :ref:`api-get-doc`.
+further examples, see :ref:`api/doc.get`.
+
+.. _api/ddoc.put:
 
 ``PUT /db/_design/design-doc``
 ==============================
@@ -116,7 +120,9 @@ document, as summarised in the following table.
     * **map**:  Map Function for View
     * **reduce (optional)**:  Reduce Function for View
 
-For more information on writing views, see :ref:`views`.
+For more information on writing views, see :ref:`api/ddoc/view`.
+
+.. _api/ddoc.delete:
 
 ``DELETE /db/_design/design-doc``
 =================================
@@ -169,6 +175,8 @@ The response contains the delete document ID and revision:
        "rev" : "3-7a05370bff53186cb5d403f861aca154",
     }
 
+.. _api/ddoc.copy:
+
 ``COPY /db/_design/design-doc``
 ===============================
 
@@ -263,6 +271,9 @@ The return value will be the new revision of the copied document:
        "rev" : "2-55b6a1b251902a2c249b667dab1c6692",
     }
 
+.. _api/ddoc/attachment:
+.. _api/ddoc/attachment.get:
+
 ``GET /db/_design/design-doc/attachment``
 =========================================
 
@@ -277,6 +288,8 @@ attachment is returned (just as if you were accessing a static file. The
 returned HTTP ``Content-type`` will be the same as the content type set
 when the document attachment was submitted into the database.
 
+.. _api/ddoc/attachment.put:
+
 ``PUT /db/_design/design-doc/attachment``
 =========================================
 
@@ -313,7 +326,7 @@ Upload the supplied content as an attachment to the specified design
 document (``/_design/design-doc``). The ``attachment`` name provided
 must be a URL encoded string. You must also supply either the ``rev``
 query argument or the ``If-Match`` HTTP header for validation, and the
-HTTP headers (to set the attacment content type). The content type is
+HTTP headers (to set the attachment content type). The content type is
 used when the attachment is requested as the corresponding content-type
 in the returned document header.
 
@@ -357,6 +370,8 @@ The returned JSON contains the new document information:
    Uploading an attachment updates the corresponding document revision.
    Revisions are tracked for the parent document, not individual attachments.
 
+.. _api/ddoc/attachment.delete:
+
 ``DELETE /db/_design/design-doc/attachment``
 ============================================
 
@@ -408,6 +423,9 @@ parent document:
        "rev" : "10-f3b15bb408961f8dcc3d86c7d3b54c4c",
     }
 
+.. _api/ddoc/info:
+.. _api/ddoc/info.get:
+
 ``GET /db/_design/design-doc/_info``
 ====================================
 
@@ -465,9 +483,8 @@ The individual fields in the returned JSON structure are detailed below:
   * **waiting_commit**:  Indicates if there are outstanding commits to the
     underlying database that need to processed
 
-.. _api-get-view:
-
-.. _views:
+.. _api/ddoc/view:
+.. _api/ddoc/view.get:
 
 ``GET /db/_design/design-doc/_view/view-name``
 ==============================================
@@ -639,7 +656,7 @@ completely eliminate, these issues. These include:
 
 -  Use the ``/db/_changes`` method to monitor for changes to the
    database and then access the view to force the corresponding view
-   index to be updated. See :ref:`api-changes` for more information.
+   index to be updated. See :ref:`api/db/changes` for more information.
 
 -  Use a monitor with the ``update_notification`` section of the CouchDB
    configuration file to monitor for changes to your database, and
@@ -683,7 +700,7 @@ In addition to using stale views, you can also make use of the
 view information including the update sequence of the database from
 which the view was generated. The returned value can be compared this to
 the current update sequence exposed in the database information
-(returned by :ref:`api-get-db`).
+(returned by :ref:`api/db.get`).
 
 Sorting Returned Rows
 ---------------------
@@ -886,6 +903,8 @@ View Reduction and Grouping
 
 TBC
 
+.. _api/ddoc/view.post:
+
 ``POST /db/_design/design-doc/_view/view-name``
 ===============================================
 
@@ -1005,7 +1024,7 @@ Executes the specified ``view-name`` from the specified ``design-doc``
 design document. Unlike the ``GET`` method for accessing views, the
 ``POST`` method supports the specification of explicit keys to be
 retrieved from the view results. The remainder of the ``POST`` view
-functionality is identical to the :ref:`api-get-view` API.
+functionality is identical to the :ref:`api/ddoc/view.get` API.
 
 For example, the request below will return all the recipes where the key
 for the view matches either “claret” or “clear apple cider” :
@@ -1055,7 +1074,7 @@ Multi-document Fetching
 By combining the ``POST`` method to a given view with the
 ``include_docs=true`` query argument you can obtain multiple documents
 from a database. The result is more efficient than using multiple
-:ref:`api-get-doc` requests.
+:ref:`api/doc.get` requests.
 
 For example, sending the following request for ingredients matching
 “claret” and “clear apple juice”:
@@ -1160,6 +1179,9 @@ Returns the full document for each recipe:
        "total_rows" : 26484
     }
 
+.. _api/ddoc/show:
+.. _api/ddoc/show.get:
+
 ``GET /db/_design/design-doc/_show/show-name``
 ===============================================
 
@@ -1183,6 +1205,8 @@ Returns the full document for each recipe:
     * **Optional**: yes
     * **Type**: string
 
+.. _api/ddoc/show/doc.post:
+
 ``POST /db/_design/design-doc/_show/show-name/doc``
 ===================================================
 
@@ -1193,6 +1217,9 @@ Returns the full document for each recipe:
 * **Response**:  Returns the result of the show
 * **Admin Privileges Required**: no
 
+.. _api/ddoc/list/ddoc:
+.. _api/ddoc/list/ddoc.get:
+
 ``GET /db/_design/design-doc/_list/list-name/other-design-doc/view-name``
 =========================================================================
 
@@ -1203,6 +1230,8 @@ Returns the full document for each recipe:
 * **Response**:  TBC
 * **Admin Privileges Required**: no
 
+.. _api/ddoc/list/ddoc.post:
+
 ``POST /db/_design/design-doc/_list/list-name/other-design-doc/view-name``
 ==========================================================================
 
@@ -1213,6 +1242,9 @@ Returns the full document for each recipe:
 * **Response**:  TBC
 * **Admin Privileges Required**: no
 
+.. _api/ddoc/list:
+.. _api/ddoc/list.get:
+
 ``GET /db/_design/design-doc/_list/list-name/view-name``
 ========================================================
 
@@ -1223,6 +1255,8 @@ Returns the full document for each recipe:
 * **Response**:  TBC
 * **Admin Privileges Required**: no
 
+.. _api/ddoc/list.post:
+
 ``POST /db/_design/design-doc/_list/list-name/view-name``
 =========================================================
 
@@ -1233,6 +1267,9 @@ Returns the full document for each recipe:
 * **Response**:  TBC
 * **Admin Privileges Required**: no
 
+.. _api/ddoc/update/doc:
+.. _api/ddoc/update/doc.put:
+
 ``PUT /db/_design/design-doc/_update/updatename/doc``
 =====================================================
 
@@ -1243,6 +1280,9 @@ Returns the full document for each recipe:
 * **Response**:  TBC
 * **Admin Privileges Required**: no
 
+.. _api/ddoc/update:
+.. _api/ddoc/update.post:
+
 ``POST /db/_design/design-doc/_update/updatename``
 ==================================================
 
@@ -1253,6 +1293,8 @@ Returns the full document for each recipe:
 * **Response**:  TBC
 * **Admin Privileges Required**: no
 
+.. _api/ddoc/rewrite:
+
 ``ALL /db/_design/design-doc/_rewrite/rewrite-name/anything``
 =============================================================
 

http://git-wip-us.apache.org/repos/asf/couchdb/blob/fd3e45cd/share/doc/src/api/documents.rst
----------------------------------------------------------------------
diff --git a/share/doc/src/api/documents.rst b/share/doc/src/api/documents.rst
index c58d004..ac2c763 100644
--- a/share/doc/src/api/documents.rst
+++ b/share/doc/src/api/documents.rst
@@ -10,7 +10,7 @@
 .. License for the specific language governing permissions and limitations under
 .. the License.
 
-.. _api-doc:
+.. _api/doc:
 
 ================
 Document Methods
@@ -46,6 +46,8 @@ A list of the available methods and URL paths are provided below:
 | DELETE | /db/doc/attachment      | Deletes an attachment of a document       |
 +--------+-------------------------+-------------------------------------------+
 
+.. _api/db.post:
+
 ``POST /db``
 ============
 
@@ -133,8 +135,6 @@ ID, and status message:
     }
         
 
-.. _api-batch-writes:
-
 UUID generation algorithms
 --------------------------
 
@@ -164,18 +164,21 @@ can be set simply by `PUT http://couchdb:5984/_config/uuids/algorithm`.
 |               | utc_id_suffix.      |                                    |
 +---------------+---------------------+------------------------------------+
 
-.. Impact of UUID choices::
-   The choice of UUID has a signficant impact on the layout of the B-tree,
-   prior to compaction. For example, a sequential UUID algorithm during
-   uploading thousands of documents, will avoid the need to rewrite many
-   intermediate B-tree nodes. A random UUID algorithm may require rewriting
-   intermediate nodes on a regular basis, with a corresponding decrease of
-   throughput, and significant wasted space due to the append-only B-tree
-   design. It is generally recommended to set your own UUIDs, or use the
-   sequential algorithm unless you have a specific need and take into account
-   the likely need for compaction to re-balance the B-tree and reclaim wasted
-   space.
+.. note:: **Impact of UUID choices:**
+   The choice of UUID has a significant impact on the layout of the B-tree,
+   prior to compaction.
+
+   For example, a sequential UUID algorithm during uploading thousands of
+   documents, will avoid the need to rewrite many intermediate B-tree nodes.
+   A random UUID algorithm may require rewriting intermediate nodes on a regular
+   basis, with a corresponding decrease of throughput, and significant wasted
+   space due to the append-only B-tree design.
 
+   It is generally recommended to set your own UUIDs, or use the sequential
+   algorithm unless you have a specific need and take into account the likely
+   need for compaction to re-balance the B-tree and reclaim wasted space.
+
+.. _api/doc/batch-writes:
 
 Batch Mode Writes
 -----------------
@@ -196,7 +199,7 @@ Including Attachments
 You can include one or more attachments with a given document by
 incorporating the attachment information within the JSON of the
 document. This provides a simpler alternative to loading documents with
-attachments than making a separate call (see :ref:`api-put-attachment`).
+attachments than making a separate call (see :ref:`api/doc/attachment.put`).
 
 * **_id** (optional): Document ID
 * **_rev** (optional): Revision ID (when updating an existing document)
@@ -228,12 +231,12 @@ the JSON structure below:
 
 The attachment ``styling.css`` can be accessed using
 ``/recipes/FishStew/styling.css``. For more information on attachments,
-see :ref:`api-get-attachment`.
+see :ref:`api/doc/attachment.get`.
 
 The document data embedded in to the structure must be encoded using
 base64.
 
-.. _api-get-doc:
+.. _api/doc.get:
 
 ``GET /db/doc``
 ===============
@@ -465,6 +468,8 @@ The specified revision of the document will be returned, including a
        "title" : "Fish Stew"
     }
 
+.. _api/doc.head:
+
 ``HEAD /db/doc``
 ================
 
@@ -540,7 +545,7 @@ returned. Note that the current revision is not returned when the
     Content-Length: 609
     Cache-Control: must-revalidate
 
-.. _api-put-doc:
+.. _api/doc.put:
 
 ``PUT /db/doc``
 ===============
@@ -648,9 +653,9 @@ The JSON returned will include the updated revision number:
     }
 
 For information on batched writes, which can provide improved
-performance, see :ref:`api-batch-writes`.
+performance, see :ref:`api/doc/batch-writes`.
 
-.. _api-del-doc:
+.. _api/doc.delete:
 
 ``DELETE /db/doc``
 ==================
@@ -711,7 +716,7 @@ The returned JSON contains the document ID, revision and status:
    use of a revision for deletion of the record allows replication of
    the database to correctly track the deletion in synchronized copies.
 
-.. _api-copy-doc:
+.. _api/doc.copy:
 
 ``COPY /db/doc``
 ================
@@ -809,7 +814,8 @@ The return value will be the new revision of the copied document:
        "rev" : "2-55b6a1b251902a2c249b667dab1c6692"
     }
 
-.. _api-get-attachment:
+.. _api/doc/attachment:
+.. _api/doc/attachment.get:
 
 ``GET /db/doc/attachment``
 ==========================
@@ -825,7 +831,7 @@ if you were accessing a static file. The returned HTTP ``Content-type``
 will be the same as the content type set when the document attachment
 was submitted into the database.
 
-.. _api-put-attachment:
+.. _api/doc/attachment.put:
 
 ``PUT /db/doc/attachment``
 ==========================
@@ -916,6 +922,8 @@ the corresponding stored content of the database. Since you must supply
 the revision information to add an attachment to a document, this serves
 as validation to update the existing attachment.
 
+.. _api/doc/attachment.delete:
+
 ``DELETE /db/doc/attachment``
 =============================
 

http://git-wip-us.apache.org/repos/asf/couchdb/blob/fd3e45cd/share/doc/src/api/local.rst
----------------------------------------------------------------------
diff --git a/share/doc/src/api/local.rst b/share/doc/src/api/local.rst
index 780c030..e6a2ede 100644
--- a/share/doc/src/api/local.rst
+++ b/share/doc/src/api/local.rst
@@ -10,7 +10,7 @@
 .. License for the specific language governing permissions and limitations under
 .. the License.
 
-.. _api-local:
+.. _api/local:
 
 ========================================
 Local (non-replicating) Document Methods
@@ -50,6 +50,9 @@ A list of the available methods and URL paths are provided below:
 | COPY   | /db/_local/local-doc    | Copies the non-replicated document        |
 +--------+-------------------------+-------------------------------------------+
 
+.. _api/local/doc:
+.. _api/local/doc.get:
+
 ``GET /db/_local/local-doc``
 ============================
 
@@ -93,7 +96,7 @@ A list of the available methods and URL paths are provided below:
 
 Gets the specified local document. The semantics are identical to
 accessing a standard document in the specified database, except that the
-document is not replicated. See :ref:`api-get-doc`.
+document is not replicated. See :ref:`api/doc.get`.
 
 ``PUT /db/_local/local-doc``
 ============================
@@ -109,7 +112,7 @@ document is not replicated. See :ref:`api-get-doc`.
 
 Stores the specified local document. The semantics are identical to
 storing a standard document in the specified database, except that the
-document is not replicated. See :ref:`api-put-doc`.
+document is not replicated. See :ref:`api/doc.put`.
 
 ``DELETE /db/_local/local-doc``
 ===============================
@@ -140,7 +143,7 @@ document is not replicated. See :ref:`api-put-doc`.
 
 Deletes the specified local document. The semantics are identical to
 deleting a standard document in the specified database, except that the
-document is not replicated. See :ref:`api-del-doc`.
+document is not replicated. See :ref:`api/doc.delete`.
 
 ``COPY /db/_local/local-doc``
 =============================
@@ -166,4 +169,4 @@ document is not replicated. See :ref:`api-del-doc`.
 
 Copies the specified local document. The semantics are identical to
 copying a standard document in the specified database, except that the
-document is not replicated. See :ref:`api-copy-doc`.
+document is not replicated. See :ref:`api/doc.copy`.

http://git-wip-us.apache.org/repos/asf/couchdb/blob/fd3e45cd/share/doc/src/api/misc.rst
----------------------------------------------------------------------
diff --git a/share/doc/src/api/misc.rst b/share/doc/src/api/misc.rst
index f9562ae..a41d9d0 100644
--- a/share/doc/src/api/misc.rst
+++ b/share/doc/src/api/misc.rst
@@ -10,7 +10,7 @@
 .. License for the specific language governing permissions and limitations under
 .. the License.
 
-.. _api-misc:
+.. _api/misc:
 
 =====================
 Miscellaneous Methods
@@ -48,6 +48,9 @@ A list of the available methods and URL paths are provided below:
 | GET    | /favicon.ico            |  Get the site icon                        |
 +--------+-------------------------+-------------------------------------------+
 
+.. _api/misc/root:
+.. _api/misc/root.get:
+
 ``GET /``
 =========
 
@@ -72,7 +75,8 @@ server.
        "version" : "1.0.1"
     }
 
-.. _active-tasks:
+.. _api/misc/active_tasks:
+.. _api/misc/active_tasks.get:
 
 ``GET /_active_tasks``
 ======================
@@ -121,6 +125,9 @@ For operation type, valid values include:
 
 -  ``View Group Indexer``
 
+.. _api/misc/all_dbs:
+.. _api/misc/all_dbs.get:
+
 ``GET /_all_dbs``
 =================
 
@@ -153,6 +160,9 @@ The return is a JSON array:
        "locations"
     ]
 
+.. _api/misc/log:
+.. _api/misc/log.get:
+
 ``GET /_log``
 =============
 
@@ -217,7 +227,8 @@ following request:
 Reading of the log will start at 2000 bytes from the end of the log, and
 500 bytes will be shown.
 
-.. _replicate:
+.. _api/misc/replicate:
+.. _api/misc/replicate.post:
 
 ``POST /_replicate``
 ====================
@@ -496,6 +507,9 @@ Must be canceled using the request:
 Requesting cancellation of a replication that does not exist results in
 a 404 error.
 
+.. _api/misc/restart:
+.. _api/misc/restart.post:
+
 ``POST /_restart``
 ==================
 
@@ -537,6 +551,9 @@ status object indicating that the request has been received:
 If the server has already restarted, the header may be returned, but no
 actual data is contained in the response.
 
+.. _api/misc/stats:
+.. _api/misc/stats.get:
+
 ``GET /_stats``
 ===============
 
@@ -695,6 +712,8 @@ structure is as follows:
        }
     }
 
+.. _api/misc/utils:
+.. _api/misc/utils.get:
 
 ``GET /_utils``
 ===============
@@ -706,6 +725,9 @@ structure is as follows:
 
 Accesses the built-in Futon administration interface for CouchDB.
 
+.. _api/misc/uuids:
+.. _api/misc/uuids.get:
+
 ``GET /_uuids``
 ===============
 
@@ -760,7 +782,7 @@ Returns:
     }
 
 The UUID type is determined by the UUID type setting in the CouchDB
-configuration. See :ref:`api-put-config`.
+configuration. See :ref:`api/config/section/key.put`.
 
 For example, changing the UUID type to ``random``:
 
@@ -786,6 +808,9 @@ When obtaining a list of UUIDs:
        ]
     }
 
+.. _api/misc/favicon:
+.. _api/misc/favicon.get:
+
 ``GET /favicon.ico``
 ====================
 

http://git-wip-us.apache.org/repos/asf/couchdb/blob/fd3e45cd/share/doc/src/intro.rst
----------------------------------------------------------------------
diff --git a/share/doc/src/intro.rst b/share/doc/src/intro.rst
index b5930d3..dd5a985 100644
--- a/share/doc/src/intro.rst
+++ b/share/doc/src/intro.rst
@@ -81,7 +81,7 @@ The main sections are:
    Displays a list of the running background tasks on the server.
    Background tasks include view index building, compaction and
    replication. The Status page is an interface to the
-   :ref:`Active Tasks <active-tasks>` API call.
+   :ref:`Active Tasks <api/misc/active_tasks>` API call.
 
 -  Verify Installation
 
@@ -201,7 +201,7 @@ Once replication has been completed, the page will show the information
 returned when the replication process completes by the API.
 
 The Replicator tool is an interface to the underlying replication API.
-For more information, see :ref:`replicate`. For more information on
+For more information, see :ref:`api/misc/replicate`. For more information on
 replication, see :ref:`replication`.
 
 .. _using-curl:


Mime
View raw message