Placement group API
Create shared constraints, manage membership, and explain noncompliant placements.
The Placement group API stores affinity or spread constraints in a project. Membership changes do not automatically migrate existing guests.
/organizations/{organization_id}/projects/{project_id}/placement-groupsCreates a shared placement constraint and its initial membership.
namestringrequiredregion_idstringrequiredstrategystringrequireddomainstringoptionalnodeenforcementstringoptionalrequireddroplet_idsstring[]optional[]Returns 201 with the group ID, revision, resolved members, and compliance.
An unsupported strategy/domain combination returns 422 invalid_constraint.
Unknown members and cross-region references reject the whole definition.
Update membership
/organizations/{organization_id}/projects/{project_id}/placement-groups/{group_id}Updates placement constraints or member IDs.
Requires If-Match and droplets:write.
Writable fields include name, strategy, domain, enforcement, and droplet_ids.
The member array replaces the complete set; omission preserves it and an empty
array removes all members. null is invalid.
Existing locations can become noncompliant after an edit. The result records those violations instead of evicting members. Organization policy can reject an edit that introduces a noncompliant required rule.
Read compliance
/organizations/{organization_id}/projects/{project_id}/placement-groups/{group_id}Returns evaluated placement compliance and violations.
Requires droplets:read. Its compliance object contains
state, evaluated_at, and violations identifying member IDs, domain IDs,
and failed requirements. A stale evaluation includes its timestamp and is not
a placement reservation.
A compliance result lists unsatisfied placement constraints:
{
"state": "noncompliant",
"violations": [
{
"code": "shared_zone",
"droplet_ids": ["drp_web01", "drp_web02"],
"domain_id": "zone_a"
}
]
}Reconcile
/organizations/{organization_id}/projects/{project_id}/placement-groups/{group_id}/reconcile-previewReturns proposed moves and unsatisfied members. Apply the reviewed preview through this operation.
/organizations/{organization_id}/projects/{project_id}/placement-groups/{group_id}/reconcileApplies a reviewed placement-reconciliation plan.
Requires the reviewed plan ID and the current group ETag in If-Match. Accepted work
returns 202 with child migration operations.
Unsupported live moves remain blockers. The operation cannot bypass local-disk, CPU, or passthrough device constraints.
Delete
/organizations/{organization_id}/projects/{project_id}/placement-groups/{group_id}Deletes an empty placement group without moving droplets.
Requires If-Match and rejects a nonempty group with 409 group_in_use.
Removing an empty group returns 204 without changing any droplet placement.
See placement groups for maintenance consequences and
Operation API for partial reconciliation results.