This API will be called when it is required to format a host, a.ka. image a host. After the formatting is complete, an ESXi build will be installed on the host.

VMware will format the host before beginning the LCM operations on the host, such as bring-up, adding the host, and so on.

The host ID of the host that you want to image and the ESXi build number that will be installed on the host after the imaging will be sent in the POST request.

Procedure

The following POST request will be sent to the server. The host ID and the build number will be sent in the body of the email.
POST 'Content-Type: application/json' https://{{server_ip}}:9443/api/v1/image_host
{
    "hostId": "c27f33ac-8507-46ab-bb8d-43d80dac3f6b",
    "buildNumber" : "13846173"
 }
A successful response completes the task and returns the job ID.

{ jobId" : "image-esxi-c27f33ac-8507-46ab" }