VM Manager API is the service to use. Enable a feature called OS Patch Management in there.