I'm trying to get a list of all VMs (no containers yet) running on my Proxmox v6.2 server (node name is "pve") using the Proxmox API. I've been referring to the API docs here. There are currently ten running VMs.
I created a user "api-user@pam" and created a token for the user named "main". I then created a permission for the token for the path "/vms" and gave it the "PVEAuditor" role with propagation enabled. I want this user to just have read-only permission.
For some reason, I'm getting back an empty array when I send a GET to "/api2/json/nodes/pve/qemu"
Am I overlooking something, or should I be getting a list of all QEMU/KVM VMs running on my server?
I created a user "api-user@pam" and created a token for the user named "main". I then created a permission for the token for the path "/vms" and gave it the "PVEAuditor" role with propagation enabled. I want this user to just have read-only permission.
For some reason, I'm getting back an empty array when I send a GET to "/api2/json/nodes/pve/qemu"
Bash:
$ curl -i -k -H 'Authorization: PVEAPIToken=api-user@pam!main=REDACTEDTOKEN' 'https://REDACTEDSERVERIP:8006/api2/json/nodes/pve/qemu'
HTTP/1.1 200 OK
Cache-Control: max-age=0
Connection: Keep-Alive
Connection: Keep-Alive
Date: Mon, 07 Dec 2020 22:01:52 GMT
Pragma: no-cache
Server: pve-api-daemon/3.0
Content-Length: 11
Content-Type: application/json;charset=UTF-8
Expires: Mon, 07 Dec 2020 22:01:52 GMT
{"data":[]}
Am I overlooking something, or should I be getting a list of all QEMU/KVM VMs running on my server?
Last edited: