esx settings hosts software drafts: import software spec
Imports the desired software specification. Warning: This operation is part of a new feature in development. It may be changed at any time and may not have all supported functionality implemented.
Request:
HTTP request
POST https://{server}/api/esx/settings/hosts/{host}/software/drafts
?action=import-software-spec
?action=import-software-spec
{
"file_id" : "string",
"software_spec" : "string",
"source_type" : "PULL",
"location" : "http://myurl.com"
}
"file_id" : "string",
"software_spec" : "string",
"source_type" : "PULL",
"location" : "http://myurl.com"
}
Path Parameters
Name | Type | Description |
---|---|---|
Required | ||
host | string | Identifier of the host. |
Body Parameters:
Name | Type | Description |
---|---|---|
bold = required | ||
- | import_spec | Specification to import desired software specification. |
-.source_type | string | Type of the source to import the desired software specification. Warning: This attribute is part of a new feature in development. It may be changed at any time and may not have all supported functionality implemented. Defines possible values of sources to import software specification. Warning: This enumeration is part of a new feature in development. It may be changed at any time and may not have all supported functionality implemented. Value is one of: PULL: Content is pulled from the URL location. The URL scheme of the value in {@link #pullLocation) can be http, https or file. Warning: This constant is part of a new feature in development. It may be changed at any time and may not have all supported functionality implemented. PUSH: Content was previously uploaded using the file upload enpoint present on vCenter appliance. This endpoint is present at https://VCENTERFQDN:9087/vum-fileupload URL. Warning: This constant is part of a new feature in development. It may be changed at any time and may not have all supported functionality implemented. JSON_STRING: The string representing the content of the software specfication. Warning: This constant is part of a new feature in development. It may be changed at any time and may not have all supported functionality implemented. |
-.location | URI | Location of the software specification file to be imported. Warning: This attribute is part of a new feature in development. It may be changed at any time and may not have all supported functionality implemented. Optional. It is only relevant when source_type has value [PULL]. This field is optional and it is only relevant when the value of source_type is PULL. |
-.file_id | string | File identifier returned by the file upload endpoint after file is uploaded. Warning: This attribute is part of a new feature in development. It may be changed at any time and may not have all supported functionality implemented. Optional. It is only relevant when source_type has value [PUSH]. This field is optional and it is only relevant when the value of source_type is PUSH. |
-.software_spec | string | The JSON string representing the desired software specification. Warning: This attribute is part of a new feature in development. It may be changed at any time and may not have all supported functionality implemented. Optional. It is only relevant when source_type has value [JSON_STRING]. This field is optional and it is only relevant when the value of source_type is JSON_STRING. |
Response:
HTTP Status Code: 200
Response Body Structure:
"obj-103"
Headers:
NoneType:
Name | Type | Description |
---|---|---|
bold = required | ||
- | string | Identifier of the working copy of the document. |
Errors:
HTTP Status Code | Type | Description |
---|---|---|
500 | error | If there is unknown internal error. The accompanying error message will give more details about the failure. |
404 | not_found | If there is no host associated with host in the system. |
503 | service_unavailable | If the service is not available. |
401 | unauthenticated | If the caller is not authenticated. |
400 | unsupported | If the host is not a standlone host, but instead part of a cluster. |