Skip to main content
GET
/
cloud
/
v1
/
servergroups
/
{project_id}
/
{region_id}
Python
import os
from gcore import Gcore

client = Gcore(
    api_key=os.environ.get("GCORE_API_KEY"),  # This is the default and can be omitted
)
placement_group_list = client.cloud.placement_groups.list(
    project_id=0,
    region_id=0,
)
print(placement_group_list.count)
{
  "count": 1,
  "results": [
    {
      "instances": [
        {
          "instance_id": "<string>",
          "instance_name": "<string>"
        }
      ],
      "name": "<string>",
      "policy": "<string>",
      "project_id": 123,
      "region": "<string>",
      "region_id": 123,
      "servergroup_id": "<string>"
    }
  ]
}

Authorizations

Authorization
string
header
required

API key for authentication. Make sure to include the word apikey, followed by a single space and then your token. Example: apikey 1234$abcdef

Path Parameters

project_id
integer
required

Project ID

region_id
integer
required

Region ID

Response

200 - application/json

List of placement groups

count
integer
required

Number of objects

Required range: x >= 0
results
Server group schema · object[]
required

Objects