REST API - delete_and_import

esx settings clusters software drafts internal: delete and import

Imports the desired software specification as a new draft. If there is a draft already associated with the user for this cluster, that draft will be deleted before new draft is created.

Request:

HTTP request

POST https://{server}/api/esx/settings/clusters/{cluster}/software/drafts-internal

?action=delete-and-import
{
    "file_id""string",
    "source_type""PULL",
    "location""http://myurl.com"
}

Path Parameters

Name Type Description
Required
cluster string Identifier of the cluster.

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

The source_type structure defines possible values of sources to import software specification. 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.
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.

-.location URI Location of the software specification file to be imported.

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.

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.

Response:

HTTP Status Code: 200

Response Body Structure:

{
    "draft""obj-103",
    "info"{
        "metadata"{
            "owner""string",
            "creation_time""2015-01-01T22:13:05.651Z",
            "status""VALID"
        },
        "software"{
            "hardware_support"{
                "packages"{
                    "obj-103"{
                        "pkg""obj-103",
                        "version""string"
                    }
                }
            },
            "components"{
                "obj-103"{
                    "details"{
                        "vendor""string",
                        "display_version""string",
                        "display_name""string"
                    },
                    "version""string"
                }
            },
            "base_image"{
                "details"{
                    "release_date""2015-01-01T22:13:05.651Z",
                    "display_version""string",
                    "display_name""string"
                },
                "version""string"
            },
            "solutions"{
                "obj-103"{
                    "components"[
                        {
                            "component""obj-103"
                        },
                        {
                            "component""obj-103"
                        }
                    ],
                    "details"{
                        "components"[
                            {
                                "component""obj-103",
                                "display_version""string",
                                "vendor""string",
                                "display_name""string"
                            },
                            {
                                "component""obj-103",
                                "display_version""string",
                                "vendor""string",
                                "display_name""string"
                            }
                        ],
                        "display_version""string",
                        "display_name""string"
                    },
                    "version""string"
                }
            },
            "add_on"{
                "name""string",
                "details"{
                    "vendor""string",
                    "display_version""string",
                    "display_name""string"
                },
                "version""string"
            }
        }
    }
}

Headers:

None

Type:

Name Type Description
bold = required
- create_result Map containing identifier and information about the draft.
-.draft string Identifier of the draft.

When clients pass a value of this structure as a parameter, the field must be an identifier for the resource type: com.vmware.esx.settings.draft. When operations return a value of this structure as a result, the field will be an identifier for the resource type: com.vmware.esx.settings.draft.

-.info info Information about the draft.

-.info.metadata metadata Metadata about the software draft.

-.info.metadata.owner string Owner of the software draft.

-.info.metadata.status string Status of the software draft.

The status_type structure defines possible values of status of a software draft. Value is one of:
VALID: Software draft is valid.
INVALID: Software draft is invalid.

-.info.metadata.creation_time date_time Creation time of the software draft.

-.info.software software_info Software specification associated with the draft.

-.info.software.base_image base_image_info Base image of the ESX.

-.info.software.base_image.details base_image_details Details about the base-image.

Optional. unset if base-image is not present in the depot.

-.info.software.base_image.details.display_name string Display name of the base-image.

-.info.software.base_image.details.display_version string Human readable version of the base-image.

-.info.software.base_image.details.release_date date_time Release date of the base-image.

-.info.software.base_image.version string Version of the base-image

-.info.software.add_on add_on_info OEM customization on top of given base-image. The components in this customization override the components in the base base-image.

Optional. If unset, no OEM customization will be applied.

-.info.software.add_on.details add_on_details Details about the add-on.

Optional. unset if add-on is not present in the depot.

-.info.software.add_on.details.display_name string Display name of the OEM add-on.

-.info.software.add_on.details.vendor string Vendor of the OEM add-on.

-.info.software.add_on.details.display_version string Human readable version of the OEM add-on.

-.info.software.add_on.name string Name of the add-on

-.info.software.add_on.version string Version of the add-on

-.info.software.components object Information about the components in the software specification.

When clients pass a value of this structure as a parameter, the key in the field key/value pairs must be an identifier for the resource type: com.vmware.esx.settings.component. When operations return a value of this structure as a result, the key in the field key/value pairs will be an identifier for the resource type: com.vmware.esx.settings.component.Object with element values of type component_info.

-.info.software.components.* component_info
-.info.software.components.*.version string Version of the component.

Optional. unset if version is not specified.

-.info.software.solutions object Information about the solutions in the software specification.

When clients pass a value of this structure as a parameter, the key in the field key/value pairs must be an identifier for the resource type: com.vmware.esx.settings.solution. When operations return a value of this structure as a result, the key in the field key/value pairs will be an identifier for the resource type: com.vmware.esx.settings.solution.Object with element values of type solution_info.

-.info.software.hardware_support hardware_support_info Information about the Hardware Support Packages (HSP) configured.

Optional. If unset, no Hardware Support Package (HSP) is specified for the cluster.

-.info.software.hardware_support.packages object Map of Hardware Support Packages (HSPs) for the cluster. The key is the Hardware Support Manager (HSM) identifier and the value is the specification detailing the HSP configured for that HSM.

When clients pass a value of this structure as a parameter, the key in the field key/value pairs must be an identifier for the resource type: com.vmware.esx.setting.hardware_support.manager. When operations return a value of this structure as a result, the key in the field key/value pairs will be an identifier for the resource type: com.vmware.esx.setting.hardware_support.manager.Object with element values of type hardware_support_package_info.

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 cluster associated with cluster in the system.
503 service_unavailable If the service is not available.
401 unauthenticated If the caller is not authenticated.