I have a use case where I want to programmatically access the compliance results for a specific VM or snapshot, and create a HTML email from the results.
Does anyone know how to access the compliance results for a specific VM or snapshot programmatically?
I’ve tried the following:
- Checking the MiqAeService model chapter of Peter McGowan’s book for a compliance object
- Checking the methods available to a VM (
methods = $evm.vmdb(:vm).first.methods - Object.methods) for compliance methods
- Checking the attributes available to a VM (
I know I can access the results of a compliance report using the REST API, but this isn’t specific to a single VM - I’d have to find the correct results end-point, then filter for a specific VM in the report.
Any assistance is greatly appreciated.