You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by kx...@apache.org on 2013/08/21 18:37:40 UTC

[13/50] git commit: updated refs/heads/1781-reorganize-and-improve-docs to 360107b

Update Local API to use HTTP domain.


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

Branch: refs/heads/1781-reorganize-and-improve-docs
Commit: 0dd43c715c2210a5944e5f0835310e387626f28a
Parents: 27b11f6
Author: Alexander Shorin <kx...@apache.org>
Authored: Sat Aug 10 17:23:08 2013 +0400
Committer: Alexander Shorin <kx...@apache.org>
Committed: Wed Aug 21 20:27:19 2013 +0400

----------------------------------------------------------------------
 share/doc/src/api/local.rst            | 144 +++++-----------------------
 share/doc/src/replication/protocol.rst |   4 +-
 2 files changed, 25 insertions(+), 123 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb/blob/0dd43c71/share/doc/src/api/local.rst
----------------------------------------------------------------------
diff --git a/share/doc/src/api/local.rst b/share/doc/src/api/local.rst
index bc251ec..b08de5e 100644
--- a/share/doc/src/api/local.rst
+++ b/share/doc/src/api/local.rst
@@ -29,7 +29,7 @@ Local documents have the following limitations:
    accessed. You cannot obtain a list of local documents from the
    database.
 
--  Local documents are not output by views, or the ``_all_docs`` view.
+-  Local documents are not output by views, or the :ref:`api/db/all_docs` view.
 
 Local documents can be used when you want to store configuration or
 other information for the current (local) instance of a given database.
@@ -39,140 +39,42 @@ A list of the available methods and URL paths are provided below:
 +--------+-------------------------+-------------------------------------------+
 | Method | Path                    | Description                               |
 +========+=========================+===========================================+
-| GET    | /db/_local/local-doc    | Returns the latest revision of the        |
+| GET    | /db/_local/id           | Returns the latest revision of the        |
 |        |                         | non-replicated document                   |
 +--------+-------------------------+-------------------------------------------+
-| PUT    | /db/_local/local-doc    | Inserts a new version of the              |
+| PUT    | /db/_local/id           | Inserts a new version of the              |
 |        |                         | non-replicated document                   |
 +--------+-------------------------+-------------------------------------------+
-| DELETE | /db/_local/local-doc    | Deletes the non-replicated document       |
+| DELETE | /db/_local/id           | Deletes the non-replicated document       |
 +--------+-------------------------+-------------------------------------------+
-| COPY   | /db/_local/local-doc    | Copies the non-replicated document        |
+| COPY   | /db/_local/id           | Copies the non-replicated document        |
 +--------+-------------------------+-------------------------------------------+
 
 .. _api/local/doc:
-.. _api/local/doc.get:
 
-``GET /db/_local/local-doc``
-============================
+``/db/_local/id``
+========================
 
-* **Method**: ``GET /db/_local/local-doc``
-* **Request**: None
-* **Response**: JSON of the returned document
-* **Admin Privileges Required**: no
-* **Query Arguments**:
+.. http:get:: /{db}/_local/{id}
 
-  * **Argument**: rev
+  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/doc.get`.
 
-    * **Description**:  Specify the revision to return
-    * **Optional**: yes
-    * **Type**: string
-    * **Supported Values**:
+.. http:put:: /{db}/_local/{id}
 
-      * **true**: Includes the revisions
+  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/doc.put`.
 
-  * **Argument**: revs
+.. http:delete:: /{db}/_local/{id}
 
-    * **Description**:  Return a list of the revisions for the document
-    * **Optional**: yes
-    * **Type**: boolean
+  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/doc.delete`.
 
-  * **Argument**: revs_info
+.. http:copy:: /{db}/_local/{id}
 
-    * **Description**:  Return a list of detailed revision information for
-      the document
-    * **Optional**: yes
-    * **Type**: boolean
-    * **Supported Values**
-
-      * **true**: Includes the revisions
-
-* **Return Codes**:
-
-  * **400**:
-    The format of the request or revision was invalid
-  * **404**:
-    The specified document or revision cannot be found, or has been deleted
-
-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/doc.get`.
-
-.. _api/local/doc.put:
-
-``PUT /db/_local/local-doc``
-============================
-
-* **Method**: ``PUT /db/_local/local-doc``
-* **Request**: JSON of the document
-* **Response**: JSON with the committed document information
-* **Admin Privileges Required**: no
-* **Return Codes**:
-
-  * **201**:
-    Document has been created successfully
-
-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/doc.put`.
-
-.. _api/local/doc.delete:
-
-``DELETE /db/_local/local-doc``
-===============================
-
-* **Method**: ``DELETE /db/_local/local-doc``
-* **Request**: None
-* **Response**: JSON with the deleted document information
-* **Admin Privileges Required**: no
-* **Query Arguments**:
-
-  * **Argument**: rev
-
-    * **Description**: Current revision of the document for validation
-    * **Optional**: yes
-    * **Type**: string
-
-* **HTTP Headers**
-
-  * **Header**: ``If-Match``
-
-    * **Description**: Current revision of the document for validation
-    * **Optional**: yes
-
-* **Return Codes**:
-
-  * **409**:
-    Supplied revision is incorrect or missing
-
-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/doc.delete`.
-
-.. _api/local/doc.copy:
-
-``COPY /db/_local/local-doc``
-=============================
-
-* **Method**: ``COPY /db/_local/local-doc``
-* **Request**: None
-* **Response**: JSON of the copied document
-* **Admin Privileges Required**: no
-* **Query Arguments**:
-
-  * **Argument**: rev
-
-    * **Description**: Revision to copy from
-    * **Optional**: yes
-    * **Type**: string
-
-* **HTTP Headers**
-
-  * **Header**: ``Destination``
-
-    * **Description**: Destination document (and optional revision)
-    * **Optional**: no
-
-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/doc.copy`.
+  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/doc.copy`.

http://git-wip-us.apache.org/repos/asf/couchdb/blob/0dd43c71/share/doc/src/replication/protocol.rst
----------------------------------------------------------------------
diff --git a/share/doc/src/replication/protocol.rst b/share/doc/src/replication/protocol.rst
index bf478f7..b5ffb51 100644
--- a/share/doc/src/replication/protocol.rst
+++ b/share/doc/src/replication/protocol.rst
@@ -153,8 +153,8 @@ API Reference
 
 - :ref:`api/db.head` -- Check Database existence
 - :ref:`api/db/ensure_full_commit` -- Ensure that all changes are stored on disk
-- :ref:`api/local/doc.get` -- Read the last Checkpoint
-- :ref:`api/local/doc.put` -- Save a new Checkpoint
+- :http:get:`/{db}/_local/{id}` -- Read the last Checkpoint
+- :http:put:`/{db}/_local/{id}` -- Save a new Checkpoint
 
 Push Only
 ~~~~~~~~~