Hello all,
i would like to shutdown my servers with the API. What have i done?
So where i get the PVEAuthCookie and the CSRFPreventionToken?
I'am using Proxmox 7.0.x
Very Thanks.
i would like to shutdown my servers with the API. What have i done?
- Add a new user to proxmox as PVE user
- Add a new role "shutdown"
- Add ACL Sys.PowerMgmt to the Usergroup
Code:
curl 'https://HOSTNAME:8006/api2/extjs/nodes/virtu02/status' -H 'Cookie: PVEAuthCookie=REPLACEMEWITHCORRECTCOOKIE' -H 'Content-Type: application/x-www-form-urlencoded' -H 'CSRFPreventionToken: REPLACEMEWITHCORRECTTOKEN' --data 'command=shutdown' --insecure
I'am using Proxmox 7.0.x
Very Thanks.
Last edited: