The VMWare CIM SDK lets one explore the vm's on the ESX Server machine, view storage resource, storage allocation, physical storage allocated to virtual machine and operational status of the storage devices involved with vm's.
For querying on memory, CPU, network etc. VMWare's VI SDK would be a helpful proposition.