Need to export "inventory" information for web ordering

Nov 5, 2018
24
1
3
43
I am the process of automating a website where someone can "purchase" a VM container and it's built automatically for them (via scripting) on the backed.

To do this I need to make sure I don't over allocate my resources.

I am new to the REST API so I apologize if this is an option already available through it.

I am looking to export available storage (pvesm status, preferable in human readable format, which doesn't look to be the case), available CPUs (or vCPUs) and vRAM (and/or available physical RAM).

I then need to import that into my web hosting database on a timed manner (which I will figure out on my own).

Is there any good documentation on how to achieve these through the CLI (I can cron job it).

Thank you,
Scott
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!