Editing a Draft Software Specification

After you have created a draft software specification, use the
vSphere Automation
REST
API to edit its items.
To set a base image to a draft software specification:
  • For a cluster,
    use the
    PUT https://
    <vcenter_ip_address_or_fqdn>
    /api/esx/settings/clusters/
    <cluster_id>
    /software/drafts/
    <draft_id>
    /software/base-image
    request and submit the cluster and draft IDs as path parameters and a base image specification in the request body
    .
  • For a standalone host,
    use the
    PUT https://
    <vcenter_ip_address_or_fqdn>
    /api/esx/settings/hosts/
    <host_id>
    /software/drafts/
    <draft_id>
    /software/base-image
    request and submit the host and draft IDs as path parameters and a base image specification in the request body
    .
If the draft contains a base image, this method overwrites the existing image. The base image specification contains the version of the bootable
ESXi
that must be included in the desired state. To retrieve details about the base image that is currently present in a draft,
use the
GET https://
<vcenter_ip_address_or_fqdn>
/api/esx/settings/clusters/
<cluster_id>
/software/drafts/
<draft_id>
/software/base-image
or
GET https://
<vcenter_ip_address_or_fqdn>
/api/esx/settings/hosts/
<host_id>
/software/drafts/
<draft_id>
/software/base-image
requests and submit as path parameters the cluster or the standalone host ID, and the draft ID. You receive a
BaseImageInfo
JSON object in the request body that holds the details about the version, display name and version, and the release date of the
ESXi
host
.
To add an OEM add-on to a draft software specification:
  • For a cluster,
    use the
    PUT https://
    <vcenter_ip_address_or_fqdn>
    /api/esx/settings/clusters/
    <cluster_id>
    /software/drafts/
    <draft_id>
    /software/add-on
    request
    .
  • For a standalone host,
    use the
    PUT https://
    <vcenter_ip_address_or_fqdn>
    /api/esx/settings/hosts/
    <host_id>
    /software/drafts/
    <draft_id>
    /software/add-on
    request
    .
Pass as arguments to these methods the cluster or the standalone host ID, the draft ID, and the add-on specification. If you want to remove an add-on from a draft,
use the
DELETE https://
<vcenter_ip_address_or_fqdn>
/api/esx/settings/clusters/
<cluster_id>
/software/drafts/
<draft_id>
/software/add-on
and
DELETE https://
<vcenter_ip_address_or_fqdn>
/api/esx/settings/hosts/
<host_id>
/software/drafts/
<draft_id>
/software/add-on
and submit as path parameters the cluster or the standalone host ID, and the draft ID
.
You can add a component, change the version, or delete an existing component from a draft software specification. To change the version of a component included in a draft:
  • For a cluster,
    use the
    PUT https://
    <vcenter_ip_address_or_fqdn>
    /api/esx/settings/clusters/
    <cluster_id>
    /software/drafts/
    <draft_id>
    /software/components/
    <component_id>
    request
    .
  • For a standalone host,
    use the
    PUT https://
    <vcenter_ip_address_or_fqdn>
    /api/esx/settings/hosts/
    <host_id>
    /software/drafts/
    <draft_id>
    /software/components/
    <component_id>
    request
    .
As a result, you add the component specified with the
component_ID
and
version
arguments to the draft, if it is missing. To remove a component from a draft,
use the
DELETE https://
<vcenter_ip_address_or_fqdn>
/api/esx/settings/clusters/
<cluster_id>
/software/drafts/
<draft_id>
/software/components/
<component_id>
and
DELETE https://
<vcenter_ip_address_or_fqdn>
/api/esx/settings/hosts/
<host_id>
/software/drafts/
<draft_id>
/software/components/
<component_id>
requests
. You can change multiple components in a draft by
using the
PATCH https://
<vcenter_ip_address_or_fqdn>
/api/esx/settings/clusters/
<cluster_id>
/software/drafts/
<draft_id>
/software/components
and
PATCH https://
<vcenter_ip_address_or_fqdn>
/api/esx/settings/hosts/
<host_id>
/software/drafts/
<draft_id>
/software/components
requests. To specify the components you want to remove, add, or update for a given draft, submit a cluster or a host
Components.UpdateSpec
JSON object to the request body of the respective request
.
To retrieve information about all components present in a draft, or a single component,
use the list requests of the respective
Components
service
.