Skip to content

Server groups API reference

In these methods, {server_group_id} is a placeholder that should be replaced with the actual ID of the server group. The API allows you to list existing server groups, show details of a specific server group, create a new server group with a specified policy, and delete a server group. The policies in the request body determine how instances within the group are scheduled with respect to each other on the compute hosts.

List server groups

Bash
GET /os-server-groups

Show server group details

Bash
GET /os-server-groups/{server_group_id}

Create a server group

Bash
POST /os-server-groups

Request body

JSON
{
   "server_group": {
      "name": "Server Group Name",
      "policies": ["affinity" or "anti-affinity" or "soft-affinity" or "soft-anti-affinity"]
   }
}

Delete a server group

Bash
DELETE /os-server-groups/{server_group_id}