Content Library Item DownloadSession create

Content Library Item DownloadSession create

Creates a new download session.

Returns an authorization error if you do not have all of the privileges described as follows:

  • The resource com.vmware.content.library.Item referenced by the property Content Library Item DownloadSessionModel.library_item_id requires ContentLibrary.DownloadSession.
Request
URI
POST
https://{api_host}/api/content/library/item/download-session
COPY
Header Parameters
string
Client-Token
Optional

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.


Request Body

Specification for the new download session to be created.

Required
{
    "id": "string",
    "library_item_id": "string",
    "library_item_content_version": "string",
    "error_message": {
        "id": "string",
        "default_message": "string",
        "args": [
            "string"
        ],
        "params": {
            "params": {
                "s": "string",
                "dt": "string",
                "i": 0,
                "d": "number",
                "l": "Vapi Std NestedLocalizableMessage Object",
                "format": "string",
                "precision": 0
            }
        },
        "localized": "string"
    },
    "client_progress": 0,
    "state": "string",
    "expiration_time": "string"
}
string
id
Optional

The identifier of this download session.

This property is not used for the create operation. It will not be present in the response of the get or list operations. It is not used for the update operation.

When clients pass a value of this schema as a parameter, the property must be an identifier for the resource type: com.vmware.content.library.item.DownloadSession. When operations return a value of this schema as a response, the property will be an identifier for the resource type: com.vmware.content.library.item.DownloadSession.

string
library_item_id
Optional

The identifier of the library item whose content is being downloaded.

This property must be provided for the create operation. It will always be present in the response of the get or list operations. It is not used for the update operation.

When clients pass a value of this schema as a parameter, the property must be an identifier for the resource type: com.vmware.content.library.Item. When operations return a value of this schema as a response, the property will be an identifier for the resource type: com.vmware.content.library.Item.

string
library_item_content_version
Optional

The content version of the library item whose content is being downloaded. This value is the Content Library ItemModel.content_version at the time when the session is created for the library item.

This property is not used for the create operation. It will always be present in the response of the get or list operations. It is not used for the update operation.

error_message
Optional

If the session is in the Content Library Item DownloadSessionModel State.ERROR status this property will have more details about the error.

This property is not used for the create operation. It is optional in the response of the get or list operations. It is not used for the update operation.

integer As int64 As int64
client_progress
Optional

The progress that has been made with the download. This property is to be updated by the client during the download process to indicate the progress of its work in completing the download. The initial progress is 0 until updated by the client. The maximum value is 100, which indicates that the download is complete.

This property is not used for the create operation. It will always be present in the response of the get or list operations. It is optional for the update operation.

string
state
Optional

The current state (State) of the download session.

For more information see: Content Library Item DownloadSessionModel State.

This property is not used for the create operation. It will always be present in the response of the get or list operations. It is not used for the update operation.

string As date-time As date-time
expiration_time
Optional

Indicates the time after which the session will expire. The session is guaranteed not to expire before this time.

This property is not used for the create operation. It will always be present in the response of the get or list operations. It is not used for the update operation.

Authentication
This operation uses the following authentication methods.
Responses
201

Identifier of the new download session being created.

The response will be an identifier for the resource type: com.vmware.content.library.item.DownloadSession.

Returns string of type(s) application/json
Operation doesn't return any data structure

400

if the session specification is not valid.

format.

Returns Vapi Std Errors InvalidArgument of type(s) application/json
This response body class contains all of the following: InlineVapi Std Errors InvalidArgument0
"Vapi Std Errors InvalidArgument Object"

404

if the library item targeted by the download does not exist.

Returns Vapi Std Errors NotFound of type(s) application/json
This response body class contains all of the following: InlineVapi Std Errors NotFound0
"Vapi Std Errors NotFound Object"

Code Samples
COPY
                    curl -X POST -H 'Authorization: <value>' -H 'Content-Type: application/json' -d '{}' https://{api_host}/api/content/library/item/download-session