Retrieving Cluster Information

  • reference
    +
    Cluster information is retrieved with GET /pools HTTP method and URI.

    Syntax

    Curl request syntax:

    curl -u [admin]:[password] http://[localhost]:8091/pools

    HTTP request syntax:

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

    A pool represents computing resources (machines, memory, CPU, disks) that are used to host Couchbase buckets. Couchbase Server clusters currently support only a single pool named default.

    While the specified server is a member of one cluster, a server can also be aware of other pools. The Client-Specification-Version is optional in the request, but advised. It enables implementations to adjust representation and state transitions to the client, if backward compatibility is desirable.

    HTTP method and URI

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

    GET /pools

    Example

    To send a request for cluster information using curl:

    curl -u Administrator:password http://10.5.2.117:8091/pools

    Response

    Couchbase Server returns only one cluster per group of systems and the cluster typically has a default name. Couchbase Server returns the build number for the server in implementationVersion and the specifications supported are in componentsVersion.

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

      % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                     Dload  Upload   Total   Spent    Left  Speed
    100  1037  100  1037    0     0  64294      0 --:--:-- --:--:-- --:--:-- 69133
    {
    "componentsVersion": {
    "ale": "3.0.0-1209-rel-enterprise",
            "asn1": "2.0.4",
            "compiler": "4.9.4",
            "couch": "2.1.1r-432-gc2af28d",
            "couch_index_merger": "2.1.1r-432-gc2af28d",
            "couch_set_view": "2.1.1r-432-gc2af28d",
            "couch_view_parser": "1.0.0",
            "crypto": "3.2",
            "inets": "5.9.8",
            "kernel": "2.16.4",
            "lhttpc": "1.3.0",
            "mapreduce": "1.0.0",
            "mochiweb": "2.4.2",
            "ns_server": "3.0.0-1209-rel-enterprise",
            "oauth": "7d85d3ef",
            "os_mon": "2.2.14",
            "public_key": "0.21",
            "sasl": "2.3.4",
            "ssl": "5.3.3",
            "stdlib": "1.19.4",
            "syntax_tools": "1.6.13",
            "xmerl": "1.3.6"
        },
        "implementationVersion": "3.0.0-1209-rel-enterprise",
        "isAdminCreds": true,
        "isEnterprise": true,
        "isROAdminCreds": false,
        "pools": [
            {
                "name": "default",
                "streamingUri": "/poolsStreaming/default?uuid=995618a6a6cc9ac79731bd13240e19b5",
                "uri": "/pools/default?uuid=995618a6a6cc9ac79731bd13240e19b5"
            }
        ],
        "settings": {
            "maxParallelIndexers": "/settings/maxParallelIndexers?uuid=995618a6a6cc9ac79731bd13240e19b5",
            "viewUpdateDaemon": "/settings/viewUpdateDaemon?uuid=995618a6a6cc9ac79731bd13240e19b5"
        },
        "uuid": "995618a6a6cc9ac79731bd13240e19b5"
    }