just my 5 cents, but ..
If a scheduelled power-outage were there, would a scheduelled cronjob on the Proxmox host be equally efficient, without poking around with the API ?
- if the scheduelled outage is always the same, then use a cronjob to shutdown the hosts/guests prior to the outage...