Content Library Item Downloadsession File prepare
Requests a file to be prepared for download.
Returns an authorization error if you do not have all of the privileges described as follows:
- Operation execution requires
System.Anonymous
.
Identifier of the download session.
The parameter must be an identifier for the resource type: com.vmware.content.library.item.DownloadSession
.
Request body for invoking operation: prepare
Show optional properties
{
"file_name": "string"
}
{
"file_name": "string",
"endpoint_type": "string"
}
Name of the file requested for download.
Endpoint type request, one of EndpointType. This will determine the type of the Content Library Item Downloadsession File Info.download_endpoint that is generated when the file is prepared. The Content Library Item Downloadsession File EndpointType.DIRECT is only available to users who have the ContentLibrary.ReadStorage privilege.
For more information see: Content Library Item Downloadsession File EndpointType.
If not specified the default is Content Library Item Downloadsession File EndpointType.HTTPS.
File information containing the status of the request and the download link to the file.
{
"name": "string",
"size": 0,
"bytes_transferred": 0,
"status": "string",
"download_endpoint": {
"uri": "string",
"ssl_certificate_thumbprint": "string",
"ssl_certificate": "string"
},
"checksum_info": {
"algorithm": "string",
"checksum": "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"
}
}
The name of the file.
The file size, in bytes.
This property may not be available immediately. It is guaranteed to be set when the client finishes downloading the file.
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 preparation status (PrepareStatus) of the file.
For more information see: Content Library Item Downloadsession File PrepareStatus.
Endpoint at which the file is available for download. The value is valid only when the Content Library Item Downloadsession File Info.status is Content Library Item Downloadsession File PrepareStatus.PREPARED.
This property won't be set until the file status is Content Library Item Downloadsession File PrepareStatus.PREPARED.
The checksum information of the file. When the download is complete, you can retrieve the checksum from the GET /content/library/item/download-session/{downloadSessionId}/file?file_name operation to verify the checksum for the downloaded file.
The checksum is always calculated for the downloaded file, but this property won't be set until the download is complete.
Error message for a failed preparation when the prepare status is Content Library Item Downloadsession File PrepareStatus.ERROR.
This property won't be set unless there was an error with the file transfer.
if there is no file with the specified fileName.
"Vapi Std Errors InvalidArgument Object"
if the the download session wasn't created with the ContentLibrary.ReadStorage privilege and the caller requested a Content Library Item Downloadsession File EndpointType.DIRECT endpoint type.
"Vapi Std Errors Unauthorized Object"
if the download session does not exist.
"Vapi Std Errors NotFound Object"
curl -X POST -H 'Authorization: <value>' -H 'Content-Type: application/json' -d '{"file_name:"string"}' https://{api_host}/api/content/library/item/download-session/{downloadSessionId}/file?action=prepare