Create From Host Depots Offline Task
Extract the current software specification applied to the host and import it into the depot. Returns details about the current software specification applied to the host. The result of this operation can be queried by calling the cis/tasks/{task-id} where the task-id is the response of this operation.
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
ConnectionSpec connection spec for the host.
{
"auth_type": "USERNAME_PASSWORD"
}
The Offline.ConnectionSpec.AuthenticationType enumerated type defines the possible types of authentication supported when connecting to the host.
USERNAME_PASSWORD : Connect to host using host’s credentials Offline#HostCredentials structure.
EXISTING : Connect to the host using service ticket. Note: This is supported only for hosts present in the VC inventory.
Possible values are: USERNAME_PASSWORD , EXISTING
Specifies the host Managed Object ID to be used during the Offline.create-from-host operation. This field is optional and it is only relevant when the value of Offline.ConnectionSpec.auth-type is EXISTING. When clients pass a value of this structure as a parameter, the field must be an identifier for the resource type: HostSystem. When operations return a value of this structure as a result, the field will be an identifier for the resource type: HostSystem.
Specifies the host details to be used during the Offline.create-from-host operation. This field is optional and it is only relevant when the value of Offline.ConnectionSpec.auth-type is USERNAME_PASSWORD.
Authentication
Response
Response BodyResponse Body
An identifier for the task created by this API invocation will be returned. If the non-async version of the operation returns a value, this id can be used with the CIS Get Task operation to fetch that value. The normal description of this operation’s return value will follow if one exists. DepotExtractInfo details about the current software specification applied to the host extracted into the depot.
Errors
com.vmware.vapi.std.errors.invalid_argument : If the Offline.HostCredentials.host-name field of spec is invalid. | com.vmware.vapi.std.errors.unverified_peer : If the SSL certificate of the target node cannot be validated by comparing with the thumbprint provided in Offline.HostCredentials.ssl-thumb-print.
com.vmware.vapi.std.errors.not_found : If there is no Offline.HostCredentials.host-name field associated with host id in the system.
com.vmware.vapi.std.errors.error : If there is some unknown internal error. The accompanying error message will give more details about the failure.
‘Default’ means this response is used for all HTTP codes that are not covered individually for this operation.
Code Samples
PowerCLI Client SDK Example
PowerCLI Client SDK All Parameters Example
cURL Command
Vendor Extensions
x-vmw-doc-operation: create_from_host_task