Please help finding correct API Endpoint

joshiyamamoto

New Member
Aug 8, 2025
6
1
3
Hello,

I'm currently writing a script that will provide a list of VMs. In the event of a Proxmox node crash, we need a list of the affected VMs on that node. What endpoint could I use for this? I initially wanted to use /nodes/<nodename>/qemu, but the problem is that Proxmox would already fail over the VMs to a new node, thus distorting the output.

I'm grateful for any help.

Best regards
 
Hi @joshiyamamoto , welcome to the forum.

Sounds like you are looking for historical information, which is more suitable to be in "log", "task" or similar end point. I am not sure if these have what you want - check and let us know!
https://pve.proxmox.com/pve-docs/api-viewer/#/cluster/ha/status/current
https://pve.proxmox.com/pve-docs/api-viewer/#/cluster/ha/status
https://pve.proxmox.com/pve-docs/api-viewer/#/cluster/log
https://pve.proxmox.com/pve-docs/api-viewer/#/cluster/tasks

Note, that these are unlikely to have data in a ready to use state and you'd likely need to parse/extract the necessary information.

cheers


Blockbridge : Ultra low latency all-NVME shared storage for Proxmox - https://www.blockbridge.com/proxmox
 
Last edited:
  • Like
Reactions: joshiyamamoto
  • Like
Reactions: joshiyamamoto
My understanding is that OP is looking for data on which VMs were moved by HA event.
Ah okay. I understood that they want to see which VMs used to be on that node. In that case, I think checking task logs or syslogs for recovery tasks would work somewhat.
Or you fetch the cluster/resources every minute or two, and can then diff to see what happened?
 
  • Like
Reactions: joshiyamamoto
Hi @joshiyamamoto , welcome to the forum.

Sounds like you are looking for historical information, which is more suitable to be in "log", "task" or similar end point. I am not sure if these have what you want - check and let us know!
https://pve.proxmox.com/pve-docs/api-viewer/#/cluster/ha/status/current
https://pve.proxmox.com/pve-docs/api-viewer/#/cluster/ha/status
https://pve.proxmox.com/pve-docs/api-viewer/#/cluster/log
https://pve.proxmox.com/pve-docs/api-viewer/#/cluster/tasks

Note, that these are unlikely to have data in a ready to use state and you'd likely need to parse/extract the necessary information.

cheers


Blockbridge : Ultra low latency all-NVME shared storage for Proxmox - https://www.blockbridge.com/proxmox
this helped me alot I used now this endpoints in combination with per node api calls and it works!
 
  • Like
Reactions: aaron