Tested on Proxmox 7.1-12
- Customize the script in the upper section with your own settings
- The script on your system made executable with chmod +x ./proxmox_api.sh
- A Proxmox user with the correct permissions for that specific command you want to execute
(Note: User has to be created on Proxmox VE authentication server NOT Linux PAM )
-
Standard functions
'Syntax: start|stop|reboot|resume|shutdown|suspend lxc|vm <vmid'>' -
Use any possible API command available (see official documentation https://pve.proxmox.com/wiki/Proxmox_VE_API)
Custom commands without retyping static URL part (https://$PROXMOX_NODE_IP:8006/api2/json/nodes/)"
Syntax: custom GET|POST|PUT your/command/extending/static/url -
Create/Delete LXCs with preconfigured settings with one command
'Syntax: create|delete '
/path/to/script/proxmox_api.sh restart vm 180
(Note: Use PUT, GET or POST like described in documentation)
/path/to/script/proxmox_api.sh custom PUT node3/lxc/177/config?memory=1024
/path/to/script/proxmox_api.sh create 189 AdGuard-LXC