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 2015/07/15 12:10:40 UTC
documentation commit: updated refs/heads/master to ff3165a
Repository: couchdb-documentation
Updated Branches:
refs/heads/master d1a882017 -> ff3165a5f
document /_memberships
adds some basic documentation for `/_memberships` with a
reference to the setup guide for 2.0
COUCHDB-2591
PR: #21
PR-URL: https://github.com/apache/couchdb-documentation/pull/21
Reviewed-By: Alexander Shorin <null>
Project: http://git-wip-us.apache.org/repos/asf/couchdb-documentation/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb-documentation/commit/ff3165a5
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-documentation/tree/ff3165a5
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-documentation/diff/ff3165a5
Branch: refs/heads/master
Commit: ff3165a5fc106029a07d6228dc11c60bbab5820a
Parents: d1a8820
Author: Robert Kowalski <ro...@apache.org>
Authored: Mon Jul 6 13:04:25 2015 +0200
Committer: Robert Kowalski <ro...@kowalski.gd>
Committed: Wed Jul 15 12:11:58 2015 +0200
----------------------------------------------------------------------
src/api/server/common.rst | 54 ++++++++++++++++++++++++++++++++++++++++++
1 file changed, 54 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/couchdb-documentation/blob/ff3165a5/src/api/server/common.rst
----------------------------------------------------------------------
diff --git a/src/api/server/common.rst b/src/api/server/common.rst
index 5be8936..20b5f5d 100644
--- a/src/api/server/common.rst
+++ b/src/api/server/common.rst
@@ -267,6 +267,60 @@
"type": "created"
}
+.. _api/server/membership:
+
+================
+``/_membership``
+================
+
+.. versionadded:: 2.0
+
+.. http:get:: /_membership
+ :synopsis: Returns a list of nodes
+
+ Displays the nodes that are part of the cluster as ``cluster_nodes``. The
+ field ``all_nodes`` displays all nodes this node knows about, including the
+ ones that are part of the cluster. The endpoint is useful when setting up a
+ cluster, see :ref:`cluster/nodes`
+
+ :<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 /_membership HTTP/1.1
+ Accept: application/json
+ Host: localhost:5984
+
+ **Response**:
+
+ .. code-block:: http
+
+ HTTP/1.1 200 OK
+ Cache-Control: must-revalidate
+ Content-Type: application/json
+ Date: Sat, 11 Jul 2015 07:02:41 GMT
+ Server: CouchDB (Erlang/OTP)
+ Content-Length: 142
+
+ {
+ "all_nodes": [
+ "node1@127.0.0.1",
+ "node2@127.0.0.1",
+ "node3@127.0.0.1"
+ ],
+ "cluster_nodes": [
+ "node1@127.0.0.1",
+ "node2@127.0.0.1",
+ "node3@127.0.0.1"
+ ]
+ }
+
.. _api/server/log:
=========