VMware

DownloadSession Namespace

The DownloadSession namespace manipulates download sessions, which are used to download content from the Content Library Service. A download session is an object that tracks the download of content (that is, downloading content from the Content Library Service) and acts as a lease to keep the download links available. The File namespace provides access to the download links.

List of commands:



Create Command

dcli com vmware content library item downloadsession create

Description

Creates a new download session.

Options

Option Name Type Required Description
client‑token string No A unique token generated by the client for each creation request. The token should be a universally unique identifier (UUID), for example: b8a2a2e3-2314-43cd-a871-6ede0f429751. This token can be used to guarantee idempotent creation. If not specified creation is not idempotent.
library‑item‑id string No The identifier of the library item whose content is being downloaded. When clients pass a value of this class as a parameter, the option must be an identifier for the resource type: com.vmware.content.library.Item. When commands return a value of this class as a output, the option will be an identifier for the resource type: com.vmware.content.library.Item. This option must be provided for the create command. It will always be present in the output of the get or list commands. It is not used for the update command.

Example

dcli com vmware content library item downloadsession create


Get Command

dcli com vmware content library item downloadsession get

Description

Gets the download session with the specified identifier, including the most up-to-date status information for the session.

Options

Option Name Type Required Description
download‑session‑id string Yes Identifier of the download session to retrieve. The parameter must be an identifier for the resource type: com.vmware.content.library.item.DownloadSession.

Example

dcli com vmware content library item downloadsession get --download-session-id testId


List Command

dcli com vmware content library item downloadsession list

Description

Lists the identifiers of the download sessions created by the calling user. Optionally may filter by library item.

Options

Option Name Type Required Description
library‑item‑id string No Library item identifier on which to filter results. The parameter must be an identifier for the resource type: com.vmware.content.library.item.DownloadSession. If not specified all download session identifiers are listed.

Example

dcli com vmware content library item downloadsession list


KeepAlive Command

dcli com vmware content library item downloadsession keepalive

Description

Keeps a download session alive. This operation is allowed only if the session is in the ACTIVE state. If there is no activity for a download session for a certain period of time, the download session will expire. The download session expiration timeout is configurable in the Content Library Service system configuration. The default is five minutes. Invoking this command enables a client to specifically extend the lifetime of an active download session.

Options

Option Name Type Required Description
download‑session‑id string Yes Identifier of the download session whose lifetime should be extended. The parameter must be an identifier for the resource type: com.vmware.content.library.item.DownloadSession.
progress int No Optional update to the progress property of the session. If specified, the new progress should be greater then the current progress. See DownloadSessionModel.client-progress. If not specified the progress is not updated.

Example

dcli com vmware content library item downloadsession keepalive --download-session-id testId


Cancel Command

dcli com vmware content library item downloadsession cancel

Description

Cancels the download session. This command will abort any ongoing transfers and invalidate transfer urls that the client may be downloading from.

Options

Option Name Type Required Description
download‑session‑id string Yes Identifer of the download session that should be canceled. The parameter must be an identifier for the resource type: com.vmware.content.library.item.DownloadSession.

Example

dcli com vmware content library item downloadsession cancel --download-session-id testId


Delete Command

dcli com vmware content library item downloadsession delete

Description

Deletes a download session. This removes the session and all information associated with it. Removing a download session leaves any current transfers for that session in an indeterminate state (there is no guarantee that the transfers will be able to complete). However there will no longer be a means of inspecting the status of those downloads except by seeing the effect on the library item. Download sessions for which there is no download activity or which are complete will automatically be expired and then deleted after a period of time.

Options

Option Name Type Required Description
download‑session‑id string Yes Identifier of the download session to be deleted. The parameter must be an identifier for the resource type: com.vmware.content.library.item.DownloadSession.

Example

dcli com vmware content library item downloadsession delete --download-session-id testId


Fail Command

dcli com vmware content library item downloadsession fail

Description

Terminates the download session with a client specified error message. This is useful in transmitting client side failures (for example, not being able to download a file) to the server side.

Options

Option Name Type Required Description
download‑session‑id string Yes Identifier of the download session to fail. The parameter must be an identifier for the resource type: com.vmware.content.library.item.DownloadSession.
client‑error‑message string Yes Client side error message. This can be useful in providing some extra details about the client side failure. Note that the message won't be translated to the user's locale.

Example

dcli com vmware content library item downloadsession fail --download-session-id testId --client-error-message testString