diff --git a/Documentation/DocuBlocks/Rest/Administration/JSF_get_api_cluster_endpoints.md b/Documentation/DocuBlocks/Rest/Administration/JSF_get_api_cluster_endpoints.md index 2c2d454e5d..b65a88aa74 100644 --- a/Documentation/DocuBlocks/Rest/Administration/JSF_get_api_cluster_endpoints.md +++ b/Documentation/DocuBlocks/Rest/Administration/JSF_get_api_cluster_endpoints.md @@ -5,10 +5,11 @@ @RESTDESCRIPTION -Returns an array of objects, which each have -the attribute `endpoint`, whose value is a string with the endpoint -description. There is an entry for each coordinator in the cluster. -This method only works on coordinators in cluster mode. +Returns an object with a single attribute `endpoints`, which contains an +array of objects, which each have the attribute `endpoint`, whose value +is a string with the endpoint description. There is an entry for each +coordinator in the cluster. This method only works on coordinators in +cluster mode. @RESTRETURNCODES diff --git a/js/server/modules/@arangodb/cluster.js b/js/server/modules/@arangodb/cluster.js index 271883d22b..d0da85cf1f 100644 --- a/js/server/modules/@arangodb/cluster.js +++ b/js/server/modules/@arangodb/cluster.js @@ -2077,7 +2077,9 @@ function endpoints() { try { let coords = global.ArangoClusterInfo.getCoordinators(); let endpoints = coords.map(c => global.ArangoClusterInfo.getServerEndpoint(c)); - return endpoints.map(function(e) { return {"endpoint": e}; }); + return { "endpoints": endpoints.map(function(e) { + return {"endpoint": e}; + }) }; } catch (err) { return { error: true, exception: err }; }