Networking
Attach security group to VM NIC
Attach a security group to a specific network interface on a VM. The security group's rules apply to inbound and outbound traffic on that NIC.
Use nic_id from GET /api/v1/vms/{id}/networks to target a specific interface.
post/api/v1/vms/{id}/security-groups
Path parameters
idstring uuid required
VM ID (UUID)
Headers
X-Project-IDstring uuid required
Project ID. Required for all mutating operations (create, delete, power actions, resize).
Request body
Response
Security group attached
Example response
{
"success": true,
"message": "Operation completed successfully"
}