REST API - create-task

esx settings depots offline: create-task

Imports a new offline software depot. This will also import the metadata and payloads from this offline depot. The returned task will fail and no Offline Depot would be created if there are any issues during import. 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:

HTTP request

POST https://{server}/api/esx/settings/depots/offline

?vmw-task=true
{
    "file_id""string",
    "description""string",
    "source_type""PULL",
    "location""http://myurl.com"
}

Body Parameters:

Name Type Description
bold = required
- create_spec Depot specification to import an offline depot.
-.description string Description of the depot.

Optional. If unset, the description will be empty.

-.source_type string Type of the source from which offline bundle is obtained.

Defines possible values of sources for the offline depot. 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 depot from which content should be retrieved.

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: 202

Response Body Structure:

"obj-103"

Headers:

None

Type:

Name Type Description
bold = required
- string Identifier of the imported depot as part of result structure.

Errors:

HTTP Status Code Type Description
401 unauthenticated if the caller is not authenticated.
400 invalid_argument If an invalid pullLocation is provided.
503 service_unavailable If the service is not available.
400 already_exists If the depot content of CreateSpec already exists. The value of the data field of vapi.std.errors.error will be a structure that contains existing depot content id as part of depot field defined in esx.settings.depots.offline.create_result.
500 error If there is some unknown internal error. The accompanying error message will give more details about the failure.