Create Host Deprecated
Add a new standalone host in the vCenter inventory. The newly connected host will be in connected state. The vCenter Server will verify the SSL certificate before adding the host to its inventory. In the case where the SSL certificate cannot be verified because the Certificate Authority is not recognized or the certificate is self signed, the vCenter Server will fall back to thumbprint verification mode as defined by Host.CreateSpec.ThumbprintVerification.
Request
URLURL
Header Parameters
Header Parameters
Required session ID, acquired from Create Session API under CIS product
vmware-api-session-id example
"b00db39f948d13ea1e59b4d6fce56389"
Request Body
This is a request body class for an operation.
{
"spec": {
"folder": "string",
"hostname": "string",
"password": "string",
"thumbprint_verification": "NONE",
"user_name": "string"
}
}
Authentication
Response
Response BodyResponse Body
The newly created identifier of the host in vCenter. The result will be an identifier for the resource type: HostSystem.
{
"value": "string"
}
The newly created identifier of the host in vCenter. The result will be an identifier for the resource type: HostSystem.
Errors
com.vmware.vapi.std.errors.already_exists : if the host with the same name is already present. | com.vmware.vapi.std.errors.invalid_argument : if the host name is invalid. if the host folder is invalid. if the SSL thumbprint specified is invalid. | com.vmware.vapi.std.errors.invalid_element_type : if the host folder id does not support vSphere compute resource as its children type. | com.vmware.vapi.std.errors.resource_in_use : if the host is already being managed by another vCenter Server | com.vmware.vapi.std.errors.unsupported : if the software version on the host is not supported.
com.vmware.vapi.std.errors.unauthenticated : if the user name or password for the administration account on the host are invalid. if the user can not be authenticated.
com.vmware.vapi.std.errors.unauthorized : if the user doesn’t have the required privileges.
com.vmware.vapi.std.errors.not_found : if there is no folder associated with the Host.CreateSpec.folder field in the system.
com.vmware.vapi.std.errors.error : if installation of VirtualCenter agent on a host fails. if the system reports an error while responding to the request. | com.vmware.vapi.std.errors.unable_to_allocate_resource : if there are not enough licenses to add the host.
com.vmware.vapi.std.errors.service_unavailable : if the system is unable to communicate with a service to complete the request.
‘Default’ means this response is used for all HTTP codes that are not covered individually for this operation.
Code Samples
cURL Command
Vendor Extensions
x-vmw-doc-new-method: post
x-vmw-doc-new-path: /api/vcenter/host
x-vmw-doc-operation: create