This is an automated email from the ASF dual-hosted git repository. wohali pushed a commit to branch node-local in repository https://gitbox.apache.org/repos/asf/couchdb-documentation.git
commit b617bc1c3119e06dc3fba1a829d3015bdc2d77cd Author: Joan Touzet <[email protected]> AuthorDate: Tue Jan 28 14:31:50 2020 -0500 Document GET /_node/{nodename} --- src/api/server/common.rst | 44 ++++++++++++++++++++++++++++++++++++++++++++ src/whatsnew/3.0.rst | 2 +- 2 files changed, 45 insertions(+), 1 deletion(-) diff --git a/src/api/server/common.rst b/src/api/server/common.rst index a5fb478..0343625 100644 --- a/src/api/server/common.rst +++ b/src/api/server/common.rst @@ -1400,6 +1400,50 @@ error. "target": "http://adm:*****@localhost:15984/cdyno-0000002/" } +.. _api/server/name: + +====================== +``/_node/{node-name}`` +====================== + +.. http:get:: /_node/{node-name} + :synopsis: Returns node name + + The ``/_node/{node-name}`` endpoint can be used to confirm the Erlang + node name of the server that processes the request. This is most useful + when accessing ``/_node/_local`` to retrieve this information. Repeatedly + retrieving this information for a CouchDB endpoint can be useful to determine + if a CouchDB cluster is correctly proxied through a reverse load balancer. + + :<header Accept: - :mimetype:`application/json` + - :mimetype:`text/plain` + :>header Content-Type: - :mimetype:`application/json` + - :mimetype:`text/plain; charset=utf-8` + :code 200: Request completed successfully + + **Request**: + + .. code-block:: http + + GET /_node/_local HTTP/1.1 + Accept: application/json + Host: localhost:5984 + + **Response**: + + .. code-block:: http + + HTTP/1.1 200 OK + Cache-Control: must-revalidate + Content-Length: 27 + Content-Type: application/json + Date: Tue, 28 Jan 2020 19:25:51 GMT + Server: CouchDB (Erlang OTP) + X-Couch-Request-ID: 5b8db6c677 + X-CouchDB-Body-Time: 0 + + {"name":"[email protected]"} + .. _api/server/stats: ============================= diff --git a/src/whatsnew/3.0.rst b/src/whatsnew/3.0.rst index c7f9cf7..d9bcce7 100644 --- a/src/whatsnew/3.0.rst +++ b/src/whatsnew/3.0.rst @@ -216,7 +216,7 @@ Features and Enhancements blocking. * :ghissue:`2005`, :ghissue:`2006`: The name of any node can now be retrieved through - the new API endpoint ``GET /_node/_local``. + the :ref:`new API endpoint <api/server/name>` ``GET /_node/{node-name}``. * :ghissue:`1766`: Timeouts for requests, ``all_docs``, attachments, views, and partitioned view requests can all be specified separately in the ini file under
