1

I use Proxmox REST API to get info about hypervisors. I am able to iterate nodes/storages/qemu and get basic info about every item. Like this is path for storages: $path = "/nodes/$nodeId/storage"; But I can't find an exact CPU model name like 24 x Intel(R) Xeon(R) CPU E5-2620. Can somebody show me the path where I can find CPU model name?

Joe Bobson
  • 1,216
  • 15
  • 19

1 Answers1

0

EDIT: As mentioned in the comment to this answer, this information is present in the status API Endpoint for the specific node.


Here are the API Documents for Proxmox VE. If you step down through the tree you can see all of the available API endpoints for nodes/$nodeID including storage as you mention.

I no longer have a Proxmox server at home to test with. However, after looking through the options available via the API documentation, it appears to me that hardware is the only other endpoint in the tree that would normally contain this information. And it seems to only provide information about PCI devices. Which CPUs haven't been for a very long time.

So this leads me to conclude that the Proxmox VE API does not provide information about the CPU of the hypervisor. I'm sure you already know this, but if you are able to refactor your requirements to run a command on your Proxmox server over SSH, then it is quite easy to retrieve the information you want with lscpu. EG:

$> lscpu | grep Model\ name
Model name:            Intel(R) Xeon(R) CPU           X5482  @ 3.20GHz
TJ Zimmerman
  • 3,100
  • 25
  • 39
  • 1
    Thanks for reply. I found the answer on proxmox forum. The path is: "/nodes/NODENAME/status" It gives a property: 'cpuinfo' – Joe Bobson Mar 28 '20 at 20:56
  • Thanks for following up. Unfortunately their online API viewer doesn't show that property when you navigate to that endpoint so I didn't see it. However, I trust you are correct. As such, I have added your comment to the top of my answer as an EDIT and indicated you were the source. – TJ Zimmerman Mar 28 '20 at 21:00