You can use the vSphere Automation API to initiate the remediation of a cluster or a standalone host through the vSphere Lifecycle Manager.

To remediate a cluster with a desired state, use the POST https://<vcenter_ip_address_or_fqdn>api/esx/settings/clusters/<cluster_id>/software?action=apply&vmw-task=true request and submit a Software.ApplySpec JSON object in the request body. Specify whether the VMware End User License Agreement (EULA) must be accepted. You can also set the minimum commit ID of the draft software specification that must be used for remediating the cluster. Upon successful completion of the remediation task, all hosts in the cluster have the same software state.

To remediate a standalone host with a desired state, use the POST https://<vcenter_ip_address_or_fqdn>/api/esx/settings/hosts/<host_id>/software?action=apply&vmw-task=true request and submit a Software.ApplySpec JSON object in the request body. Use the software apply specification to set the minimum commit identifier of the draft software specification. See Committing the Draft Software Specification. You can also specify whether the VMware End User License Agreement (EULA) must be accepted.