API Problems

SearchForTheCode

New Member
Oct 19, 2021
4
0
1
40
Hello dear Proxmox community.
I am having weird problems with the API.

I am trying to get information about disks and storages but i am failing.

Those calls fail, return a json with a empty data property:
https://pve.proxmox.com/pve-docs/api-viewer/index.html#/nodes/{node}/disks/list
curl --insecure -H "Authorization: PVEAPIToken=root@xyt!monitoring=guid" https://10.0.2.100:8006/api2/json//nodes/proxmox01/storage
curl --insecure -H "Authorization: PVEAPIToken=root@xyt!monitoring=guid" https://10.0.2.100:8006/api2/json//nodes/proxmox01/disks/list

But these calls succeds:
curl --insecure -H "Authorization: PVEAPIToken=root@xyt!monitoring=guid" https://10.0.2.100:8006/api2/json//nodes/proxmox01/cpu
curl --insecure -H "Authorization: PVEAPIToken=root@xyt!monitoring=guid" https://10.0.2.100:8006/api2/json//nodes

The API Token is assigned to the root user so rights cannot be an issue ( or shouldnt be).
The calls over pvesh via SSH and the root user are working.

I dont understand the problem with the API calls. I would understand all failing, but why does cpu works, but disks/list not. It doesnt make sense to me.
Is there some known api bug?

Thank you in advance for your response.
 
Last edited:
Indeed the privilegde seperation was active at first, i deactivated it. But the problem persists.

here is the output of pveversion -v

root@proxmox01:~# pveversion -v
proxmox-ve: 6.3-1 (running kernel: 5.4.106-1-pve)
pve-manager: 6.3-6 (running version: 6.3-6/2184247e)
pve-kernel-5.4: 6.3-8
pve-kernel-helper: 6.3-8
pve-kernel-5.3: 6.1-6
pve-kernel-5.4.106-1-pve: 5.4.106-1
pve-kernel-4.15: 5.4-16
pve-kernel-5.3.18-3-pve: 5.3.18-3
pve-kernel-4.15.18-27-pve: 4.15.18-55
pve-kernel-4.15.18-12-pve: 4.15.18-36
ceph-fuse: 12.2.11+dfsg1-2.1+b1
corosync: 3.1.2-pve1
criu: 3.11-3
glusterfs-client: 5.5-3
ifupdown: residual config
ifupdown2: 3.0.0-1+pve3
ksm-control-daemon: 1.3-1
libjs-extjs: 6.0.1-10
libknet1: 1.20-pve1
libproxmox-acme-perl: 1.0.8
libproxmox-backup-qemu0: 1.0.3-1
libpve-access-control: 6.1-3
libpve-apiclient-perl: 3.1-3
libpve-common-perl: 6.3-5
libpve-guest-common-perl: 3.1-5
libpve-http-server-perl: 3.1-1
libpve-storage-perl: 6.3-9
libqb0: 1.0.5-1
libspice-server1: 0.14.2-4~pve6+1
lvm2: 2.03.02-pve4
lxc-pve: 4.0.6-2
lxcfs: 4.0.6-pve1
novnc-pve: 1.1.0-1
proxmox-backup-client: 1.1.1-1
proxmox-mini-journalreader: 1.1-1
proxmox-widget-toolkit: 2.5-1
pve-cluster: 6.2-1
pve-container: 3.3-4
pve-docs: 6.3-1
pve-edk2-firmware: 2.20200531-1
pve-firewall: 4.1-3
pve-firmware: 3.2-2
pve-ha-manager: 3.1-1
pve-i18n: 2.3-1
pve-qemu-kvm: 5.2.0-5
pve-xtermjs: 4.7.0-3
qemu-server: 6.3-10
smartmontools: 7.2-pve2
spiceterm: 3.1-1
vncterm: 1.6-2
zfsutils-linux: 2.0.4-pve1
 
Try using ' instead of ", the ! might not be escaped properly.