jiangphcn commented on a change in pull request #243: Add description about new 
endpoint _dbs_info
URL: 
https://github.com/apache/couchdb-documentation/pull/243#discussion_r164025867
 
 

 ##########
 File path: src/api/server/common.rst
 ##########
 @@ -208,6 +208,115 @@
            "locations"
         ]
 
+.. _api/server/dbs_info:
+
+==============
+``/_dbs_info``
+==============
+
+.. http:post:: /_dbs_info
+    :synopsis: Returns information of a list of the specified databases
+
+    Returns information of a list of the specified databases in the CouchDB
+    instance. This enables you to request information about multiple databases
+    in a single request, in place of multiple :get:`/{db}` requests.
+
+    :<header Accept: - :mimetype:`application/json`
+    :>header Content-Type: - :mimetype:`application/json`
+    :code 200: Request completed successfully
+
+    **Request**:
+
+    .. code-block:: http
+
+        POST /_dbs_info HTTP/1.1
+        Accept: application/json
+        Host: localhost:5984
+        Content-Type: application/json
+
+        {
+            "keys": [
+                "animals",
+                "plants"
+            ]
+        }
+
+    **Response**:
+
+    .. code-block:: http
+
+        HTTP/1.1 200 OK
+        Cache-Control: must-revalidate
+        Content-Type: application/json
+        Date: Sat, 20 Dec 2017 06:57:48 GMT
+        Server: CouchDB (Erlang/OTP)
+
+        [
+          {
+            "key": "animals",
+            "info": {
+              "db_name": "animals",
+              "update_seq": "52232",
+              "sizes": {
+                "file": 1178613587,
+                "external": 1713103872,
+                "active": 1162451555
+              },
+              "purge_seq": 0,
+              "other": {
+                "data_size": 1713103872
+              },
+              "doc_del_count": 0,
+              "doc_count": 52224,
+              "disk_size": 1178613587,
+              "disk_format_version": 6,
+              "data_size": 1162451555,
+              "compact_running": false,
+              "cluster": {
+                "q": 8,
+                "n": 3,
+                "w": 2,
+                "r": 2
+              },
+              "instance_start_time": "0"
+            }
+          },
+          {
+            "key": "plants",
+            "info": {
+              "db_name": "plants",
+              "update_seq": "303",
+              "sizes": {
+                "file": 3872387,
+                "external": 2339,
+                "active": 67475
+              },
+              "purge_seq": 0,
+              "other": {
+                "data_size": 2339
+              },
+              "doc_del_count": 0,
+              "doc_count": 11,
+              "disk_size": 3872387,
+              "disk_format_version": 6,
+              "data_size": 67475,
+              "compact_running": false,
+              "cluster": {
+                "q": 8,
+                "n": 3,
+                "w": 2,
+                "r": 2
+              },
+              "instance_start_time": "0"
+            }
+          }
+        ]
+
+.. note::
+    The supported number of the specified databases in the list can be limited
+    by modifying the `max_db_number_for_dbs_info_req` entry in configuration
+    file. The default limit is 100.
+
 
 Review comment:
   Added with thanks.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to