You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by va...@apache.org on 2022/09/22 02:18:18 UTC
[couchdb] branch main updated: Document _versions endpoint
This is an automated email from the ASF dual-hosted git repository.
vatamane pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/couchdb.git
The following commit(s) were added to refs/heads/main by this push:
new 344ae9320 Document _versions endpoint
344ae9320 is described below
commit 344ae9320aacb8f17770f49e308d99bea9be01ff
Author: Ronny Berndt <ro...@apache.org>
AuthorDate: Fri Sep 9 10:17:16 2022 +0200
Document _versions endpoint
---
src/docs/src/api/server/common.rst | 61 ++++++++++++++++++++++++++++++++++++++
src/docs/src/config/auth.rst | 4 ++-
2 files changed, 64 insertions(+), 1 deletion(-)
diff --git a/src/docs/src/api/server/common.rst b/src/docs/src/api/server/common.rst
index c73bd7c7a..371511500 100644
--- a/src/docs/src/api/server/common.rst
+++ b/src/docs/src/api/server/common.rst
@@ -1967,6 +1967,67 @@ See :ref:`Configuration of Prometheus Endpoint <config/prometheus>` for details.
:code 200: Request completed successfully
+.. _api/server/versions:
+
+================================
+``/_node/{node-name}/_versions``
+================================
+
+.. http:get:: /_node/{node-name}/_versions
+ :synopsis: Returns system-level server version informations
+
+ The ``_versions`` resource returns a JSON object containing various
+ system-level informations for the running server.
+
+ The literal string ``_local`` serves as an alias for the local node name, so
+ for all stats URLs, ``{node-name}`` may be replaced with ``_local``, to
+ interact with the local node's informations.
+
+ :<header Accept: - :mimetype:`application/json`
+ - :mimetype:`text/plain`
+ :>header Content-Type: - :mimetype:`application/json`
+ :code 200: Request completed successfully
+
+ **Request**:
+
+ .. code-block:: http
+
+ GET /_node/_local/_versions HTTP/1.1
+ Accept: application/json
+ Host: localhost:5984
+
+ **Response**:
+
+ .. code-block:: http
+
+ HTTP/1.1 200 OK
+ Cache-Control: must-revalidate
+ Content-Length: 368
+ Content-Type: application/json
+ Date: Sat, 03 Sep 2022 08:12:12 GMT
+ Server: CouchDB/3.2.2-ea382cf (Erlang OTP/25)
+
+ {
+ "javascript_engine": {
+ "version": "91",
+ "name": "spidermonkey"
+ },
+ "erlang": {
+ "version": "25.0.4",
+ "supported_hashes": [
+ "sha",
+ "sha224",
+ "sha256",
+ ]
+ },
+ "collation_driver": {
+ "name": "libicu",
+ "library_version": "70.1",
+ "collator_version": "153.112",
+ "collation_algorithm_version": "14"
+ }
+ }
+
.. _api/server/search_analyze:
==========================================
diff --git a/src/docs/src/config/auth.rst b/src/docs/src/config/auth.rst
index cb92f3188..ada470cd0 100644
--- a/src/docs/src/config/auth.rst
+++ b/src/docs/src/config/auth.rst
@@ -216,7 +216,9 @@ Authentication Configuration
To retrieve a complete list of supported hash algorithms you can use our
``bin/remsh`` script and retrieve a full list of available hash algorithms
- with ``crypto:supports(hashs).``.
+ with ``crypto:supports(hashs).`` or use the
+ :ref:`_node/$node/_versions <api/server/versions>` endpoint to retrieve the
+ hashes.
.. warning::
We do not recommend using the following hash algorithms: ::