A newer version of this documentation is available.

View Latest

Creating Groups

  • reference
    +
    Server groups are created with the POST /pools/default/serverGroups HTTP method and URI.

    HTTP method and URI

    POST /pools/default/serverGroups

    Description

    This creates a server group. A name for the group, unique across the server, must be specified. Names cannot be longer than 64 bytes.

    Curl Syntax

    curl -X POST -u <administrator>:<password>
    http://<host>:<port>/pools/default/serverGroups
    -d name="<groupName>"

    Responses

    Success gives 200 OK, and returns an empty object. Specifying a name already assigned to an existing group gives 400 Bad Request, and returns an object of the form {"name": "already exists"}. Failure to authenticate gives 401 Unauthorized.

    Example

    The following request creates a new group on the cluster.

    curl -X POST -u myAdmin:myPassword \
    http://10.143.190.101:8091/pools/default/serverGroups \
    -d 'name="Group 3"'

    If successful, this duly creates a new, empty group; named Group 3.

    See Also

    See Server Group Awareness, for a conceptual overview of groups. See Getting Server Group Information for getting information on the current node-to-group configuration for the server. See Updating Server Group Memberships for an example of changing the node-to-group configuration. For examples of performing rebalance, see Rebalancing Nodes. See Adding Servers to Server Groups, for information on adding nodes to groups. See Manage Groups, for examples of managing groups by means of Couchbase Web Console.