[REST API] Is there any API which returns proxmox 'VM id' given the 'VM name'
I saw that the reboot/reset api is using {vmid} to reset/reboot a VM(https://pve.proxmox.com/pve-docs/api-viewer/index.html#/nodes/{node}/qemu/{vmid}/status/reset).
The only way I could get the vm_id based on VM_name is via "https://pve.proxmox.com/pve-docs/api-viewer/index.html#/cluster/resources" api which will return me info of the resources present at proxmox. Here, I have to loop through all the resources and find my matching resources.
As we are planning to having thousands of VM's in our proxmox environment moving forward, looping through all the VM or resources seems to be a bad idea. Hence, I am looking for an API which return me proxmox VM details.
Input: VM name
Expected output: VM details containing VM ID
Thanks in advance,
Priyanka
I saw that the reboot/reset api is using {vmid} to reset/reboot a VM(https://pve.proxmox.com/pve-docs/api-viewer/index.html#/nodes/{node}/qemu/{vmid}/status/reset).
The only way I could get the vm_id based on VM_name is via "https://pve.proxmox.com/pve-docs/api-viewer/index.html#/cluster/resources" api which will return me info of the resources present at proxmox. Here, I have to loop through all the resources and find my matching resources.
As we are planning to having thousands of VM's in our proxmox environment moving forward, looping through all the VM or resources seems to be a bad idea. Hence, I am looking for an API which return me proxmox VM details.
Input: VM name
Expected output: VM details containing VM ID
Thanks in advance,
Priyanka
Last edited: