You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by ro...@apache.org on 2024/12/27 14:34:02 UTC

(couchdb) 01/01: chore(docs): Add 403 status code to api docs

This is an automated email from the ASF dual-hosted git repository.

ronny pushed a commit to branch fix/GH-5315
in repository https://gitbox.apache.org/repos/asf/couchdb.git

commit 61c8479965f7ae76b6cbf3b34f3c214940c658e7
Author: Ronny Berndt <ro...@apache.org>
AuthorDate: Fri Dec 27 15:32:28 2024 +0100

    chore(docs): Add 403 status code to api docs
---
 src/docs/src/api/local.rst           |  5 ++++
 src/docs/src/api/partitioned-dbs.rst | 45 +++++++++++++++++++++++++-----------
 2 files changed, 36 insertions(+), 14 deletions(-)

diff --git a/src/docs/src/api/local.rst b/src/docs/src/api/local.rst
index 8d0cc914e..019d6b197 100644
--- a/src/docs/src/api/local.rst
+++ b/src/docs/src/api/local.rst
@@ -113,6 +113,7 @@ A list of the available methods and URL paths are provided below:
       that this is not the number of rows returned in the actual query.
     :>json number update_seq: Current update sequence for the database
     :code 200: Request completed successfully
+    :code 403: Forbidden
 
     **Request**:
 
@@ -179,6 +180,9 @@ A list of the available methods and URL paths are provided below:
     :synopsis: Returns a built-in view of all local (non-replicating) documents
       in this database
 
+    :param db: Database name
+    :code 403: Forbidden
+
     :method:`POST` `_local_docs` functionality supports identical parameters and behavior
     as specified in the :get:`/{db}/_local_docs` API but allows for the query string
     parameters to be supplied as keys in a JSON object in the body of the `POST` request.
@@ -260,6 +264,7 @@ A list of the available methods and URL paths are provided below:
     :code 200: Request completed successfully
     :code 400: Invalid request
     :code 401: Read permission required
+    :code 403: Forbidden
     :code 404: Specified database is missing
     :code 500: Query execution error
 
diff --git a/src/docs/src/api/partitioned-dbs.rst b/src/docs/src/api/partitioned-dbs.rst
index 1a280140f..57cb48fd0 100644
--- a/src/docs/src/api/partitioned-dbs.rst
+++ b/src/docs/src/api/partitioned-dbs.rst
@@ -33,7 +33,11 @@ See the guide for
     It includes document and deleted document counts along with external
     and active data sizes.
 
+    :param db: Database name
+    :param partition_id: Name of the partition to query
+
     :code 200: Request completed successfully
+    :code 403: Forbidden
 
     **Request**:
 
@@ -71,9 +75,6 @@ See the guide for
 .. http:get:: /{db}/_partition/{partition_id}/_all_docs
     :synopsis: Return all docs in the specified partition
 
-    :param db: Database name
-    :param partition_id: Partition name
-
     This endpoint is a convenience endpoint for automatically setting
     bounds on the provided partition range. Similar results can be had
     by using the global ``/db/_all_docs`` endpoint with appropriately
@@ -83,6 +84,12 @@ See the guide for
     a complete description of the available query parameters and the format
     of the returned data.
 
+    :param db: Database name
+    :param partition_id: Partition name
+
+    :code 200: Request completed successfully
+    :code 403: Forbidden
+
     **Request**:
 
     .. code-block:: http
@@ -125,11 +132,6 @@ See the guide for
 .. http:get:: /{db}/_partition/{partition_id}/_design/{ddoc}/_view/{view}
     :synopsis: Execute a partitioned query
 
-    :param db: Database name
-    :param partition_id: Partition name
-    :param ddoc: Design document id
-    :param view: View name
-
     This endpoint is responsible for executing a partitioned query. The
     returned view result will only contain rows with the specified
     partition name.
@@ -138,6 +140,14 @@ See the guide for
     a complete description of the available query parameters and the format
     of the returned data.
 
+    :param db: Database name
+    :param partition_id: Partition name
+    :param ddoc: Design document id
+    :param view: View name
+
+    :code 200: Request completed successfully
+    :code 403: Forbidden
+
     .. code-block:: http
 
         GET /db/_partition/sensor-260/_design/sensor-readings/_view/by_sensor HTTP/1.1
@@ -202,9 +212,6 @@ See the guide for
 .. http:post:: /{db}/_partition/{partition_id}/_find
     :synopsis: Query the partition specified by ``partition_id``
 
-    :param db: Database name
-    :param partition id: Name of the partition to query
-
     This endpoint is responsible for finding a partition query by its ID.
     The returned view result will only contain rows with the
     specified partition id.
@@ -213,6 +220,13 @@ See the guide for
     documentation for a complete description of the
     available parameters and the format
     of the returned data.
+
+    :param db: Database name
+    :param partition_id: Name of the partition to query
+
+    :code 200: Request completed successfully
+    :code 403: Forbidden
+
 .. _api/partitioned/explain:
 
 ``/{db}/_partition/{partition_id}/_explain``
@@ -221,11 +235,14 @@ See the guide for
 .. http:post:: /{db}/_partition/{partition_id}/_explain
     :synopsis: Find index that is used with a query
 
-    :param db: Database name
-    :partition id: Name of the partition to query
-
     This endpoint shows which index is being used by the query.
 
     Refer to the :ref:`explain endpoint <api/db/find/explain>`
     documentation for a complete description of the available
     parameters and the format of the returned data.
+
+    :param db: Database name
+    :param partition_id: Name of the partition to query
+
+    :code 200: Request completed successfully
+    :code 403: Forbidden