Get Item Downloadsession File
Retrieves file download information for a specific file. if you do not have all of the privileges described as follows: - Operation execution requires System.Anonymous.
Request
URLURL
Path Parameters
Path Parameters
Identifier of the download session. The parameter must be an identifier for the resource type: com.vmware.content.library.item.DownloadSession.
Query Parameters
Query Parameters
Name of the file requested.
Header Parameters
Header Parameters
Required session ID, acquired from Create Session API under CIS product
vmware-api-session-id example
"b00db39f948d13ea1e59b4d6fce56389"
Authentication
Response
Response BodyResponse Body
The File.Info instance containing the status of the file and its download link if available.
{
"bytes_transferred": 0,
"checksum_info": {
"algorithm": "SHA1",
"checksum": "string"
},
"download_endpoint": {
"ssl_certificate_thumbprint": "string",
"uri": "string"
},
"error_message": {
"args": [
"string"
],
"default_message": "string",
"id": "string",
"localized": "string",
"params": {
"key": {
"d": 0,
"dt": "string",
"format": "SHORT_DATE",
"i": 0,
"l": {
"id": "string",
"params": "StdLocalizationParam Object"
},
"precision": 0,
"s": "string"
}
}
},
"name": "string",
"size": 0,
"status": "UNPREPARED"
}
The number of bytes that have been transferred by the server so far for making this file prepared for download. This value may stay at zero till the client starts downloading the file.
The name of the file.
The File.PrepareStatus enumerated type defines the state of the file in preparation for download.
UNPREPARED : The file hasn’t been requested for preparation.
PREPARE_REQUESTED : A prepare has been requested, however the server hasn’t started the preparation yet.
PREPARING : A prepare has been requested and the file is in the process of being prepared.
PREPARED : Prepare succeeded. The file is ready for download.
ERROR : Prepare failed.
Possible values are: UNPREPARED , PREPARE_REQUESTED , PREPARING , PREPARED , ERROR
The checksum information of the file. When the download is complete, you can retrieve the checksum from the File.get operation to verify the checksum for the downloaded file. The checksum is always calculated for the downloaded file, but this field won’t be set until the download is complete.
Endpoint at which the file is available for download. The value is valid only when the File.Info.status is PREPARED. This field won’t be set until the file status is PREPARED.
Error message for a failed preparation when the prepare status is ERROR. This field won’t be set unless there was an error with the file transfer.
The file size, in bytes. This field may not be available immediately. It is guaranteed to be set when the client finishes downloading the file.
Errors
com.vmware.vapi.std.errors.invalid_argument : if there is no file with the specified fileName.
com.vmware.vapi.std.errors.not_found : if the download session associated with downloadSessionId does not exist.
‘Default’ means this response is used for all HTTP codes that are not covered individually for this operation.
Code Samples
PowerCLI Client SDK Example
cURL Command
Vendor Extensions
x-vmw-doc-deprecated-method: post
x-vmw-doc-deprecated-path: /rest/com/vmware/content/library/item/downloadsession/file/id:{download_session_id}?~action=get
x-vmw-doc-operation: get