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/poolsGET /pools Host: node.in.your.pool.com Authorization: Basic xxxxxxxxxxxxxxxxxxx Accept: application/json X-memcachekv-Store-Client-Specification-Version: 0.1
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.