A newer version of this documentation is available.

View Latest

Updating Server Group Memberships

    To change server group membership, use the PUT /pools/default/serverGroups HTTP method and URI.

    HTTP method and URI

    PUT /pools/default/serverGroups?rev=<:number>

    PUT /pools/default/serverGroups?rev=<:number> updates the server’s group memberships. In the following examples, the group name is optional. If the group name is provided, it must match the current group name. All servers must be mentioned and all groups must be mentioned. The URI is used to identify the group.

    This request moves servers from one server group to another. This request does not permit server group renaming or removal. In this example, the servers for Group 2 are moved to Group 1.

    The following is the group information that is needed to update the server and server group memberships:

       "groups": [( { ("name": <groupName:string>,)?
       "uri": "/pools/default/serverGroups/"<uuid>,
       "nodes": [(<otpNode>)*]
    The PUT request is transactional. The request either succeeds completely or fails without impact. If all nodes or groups are not passed, a generic error message: "Bad input" occurs and the server group is removed.


    curl -d @<inputFile> -X PUT
      -u <administrator>:<password>


    In this example, a JSON file is used.

    curl -d@file.json -X PUT \

    In this example, the JSON data is provided on the command line.

    curl -v -X PUT \
      -u Administrator:password \ \
      -d '{"groups": \
          [{"nodes": [{"otpNode": "ns_1@"}, \
                      {"otpNode": "ns_1@"}], \
            "name": "Group 1", \
            "uri": "/pools/default/serverGroups/0"}, \
           {"nodes": [], \
            "name": "Group 2", \
            "uri": "/pools/default/serverGroups/3ca074a8456e1d4940cfa3b7badc1e22"}] }'