Assign security group to VM via API

Craig St George

Well-Known Member
Jul 31, 2018
114
14
58
62
Hi I m using the API e.g https://pve.proxmox.com/pve-docs/api-viewer/index.html
and every thing works great as was so easy to integrate

My question is around adding security groups to a VM via the API I cant seem to find any API call to do that I looked under nodes/{node}/qemu/{vmid}/firewall

I can create rules but cant see how to add existing security groups

Under /cluster/firewall/groups I can create groups

Any ideas were to look thanks
 
The API path is :

POST /api2/json/nodes/{node}/qemu/{vmid}/firewall/rules

(type == 'group', action ==> GROUP_NAME)
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!