Search:

Search all manuals
Search this manual
Manual
Couchbase Server Manual 2.0
Community Wiki and Resources
Download Couchbase Server 2.0
Couchbase Developer Guide 2.0
Client Libraries
Couchbase Server Forum
Additional Resources
Community Wiki
Community Forums
Couchbase SDKs
Parent Section
8 Using the REST API
Chapter Sections
Chapters

8.7. Managing Clusters

8.7.1. Viewing Cluster Details
8.7.2. Adding a Node to a Cluster
8.7.3. Joining a Node into a Cluster
8.7.4. Removing a Node from a Cluster
8.7.5. Initiating a Rebalance
8.7.6. Getting Rebalance Progress
8.7.7. Adjusting Rebalance during Compaction
8.7.8. Retrieving Auto-Failover Settings
8.7.9. Enabling and Disabling Auto-Failover
8.7.10. Resetting Auto-Failover
8.7.11. Setting Maximum Buckets for Clusters
8.7.12. Setting Maximum Parallel Indexers
8.7.13. View Settings for Email Notifications
8.7.14. Enabling and Disabling Email Notifications
8.7.15. Sending Test Emails
8.7.16. Managing Internal Cluster Settings
8.7.17. Disabling Consistent Query Results on Rebalance

One of the first ways to discover the URI endpoints for the REST API is to find the clusters available. For this you provide the Couchbase Server IP address, port number, and append '/pools'.

Example Request:

shell> curl -u admin:password http://localhost:8091/pools

As a raw HTTP request:

HTTP Request
GET /pools
Host: localhost:8091
Authorization: Basic xxxxxxxxxxxxxxxxxxx
Accept: application/json
X-memcachekv-Store-Client-Specification-Version: 0.1

The corresponding HTTP response contains a JSON document describing the cluster configuration:

HTTP Response
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: nnn


{"pools": [
            {
            "name":"default",
            "uri":"/pools/default",
            "streamingUri":"/poolsStreaming/default"
            }
          ],
          "isAdminCreds":false,
          "uuid":"c25913df-59a2-4886-858c-7119d42e36ab",
          "implementationVersion":"1.8.1-927-rel-enterprise",
          "componentsVersion":
             {
             "ale":"8cffe61",
             "os_mon":"2.2.6",
             "mnesia":"4.4.19",
             "inets":"5.6",
             "kernel":"2.14.4",
             "sasl":"2.1.9.4",
             "ns_server":"1.8.1-927-rel-enterprise",
             "stdlib":"1.17.4"}
 }

Couchbase Server returns only one cluster per group of systems and the cluster will typically have a default name.

Couchbase Server returns the build number for the server in implementation_version, the specifications supported are in the componentsVersion. While this node can only be a member of one cluster, there is flexibility which allows for any given node to be aware of other pools.

The Client-Specification-Version is optional in the request, but advised. It allows for implementations to adjust representation and state transitions to the client, if backward compatibility is desirable.