POST /com/vmware/content/library/item/downloadsession/file/id:{download_session_id}?~action=prepare |
POST /com/vmware/content/library/item/downloadsession/file?~action=prepare |
{
"download_session_id": "obj-103", "endpoint_type": "HTTPS", "file_name": "string" }
<?xml version="1.0" ?>
<ns0:Prepare-Input xmlns:ns0="http://vmware.com/content/library/item/downloadsession/file" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <endpoint_type>HTTPS</endpoint_type> <download_session_id>obj-103</download_session_id> <file_name>string</file_name> </ns0:Prepare-Input>
POST /com/vmware/content/library/item/downloadsession/file?~action=prepare
&endpoint_type=HTTPS &download_session_id=obj-103 &file_name=string |
Name | Type | Required | Description |
---|---|---|---|
download_session_id* |
ID | Yes | Identifier of the download session. Id of type com.vmware.content.library.item.DownloadSession. |
file_name* |
string | Yes | Name of the file requested for download. |
endpoint_type | com.vmware.content.library.item.downloadsession.file.endpoint_type | No | Endpoint type request, one of HTTPS , DIRECT . This will determine the type of the com.vmware.content.library.item.downloadsession.file.info.download_endpoint that is generated when the file is prepared. The DIRECT is only available to users who have the ContentLibrary.ReadStorage privilege. |
{
"value": { "bytes_transferred": 10, "checksum_info": { "algorithm": "SH_a1", "checksum": "string" }, "download_endpoint": { "ssl_certificate_thumbprint": "string", "uri": "http://myurl.com" }, "error_message": { "args": [ "string", "string" ], "default_message": "string", "id": "string" }, "name": "string", "size": 10, "status": "UNPREPARED" } }
<?xml version="1.0" ?>
<ns0:Prepare-Result xmlns:ns0="http://vmware.com/content/library/item/downloadsession/file" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <value> <download_endpoint> <ssl_certificate_thumbprint>string</ssl_certificate_thumbprint> <uri>http://myurl.com</uri> </download_endpoint> <status>UNPREPARED</status> <error_message> <default_message>string</default_message> <id>string</id> <args-array> <array-item>string</array-item> <array-item>string</array-item> </args-array> </error_message> <name>string</name> <bytes_transferred>10</bytes_transferred> <checksum_info> <checksum>string</checksum> <algorithm>SH_a1</algorithm> </checksum_info> <size>10</size> </value> </ns0:Prepare-Result> |
Name | Type | Required | Description |
---|---|---|---|
result | info | Yes | File information containing the status of the request and the download link to the file. |
Type | Description | HTTP Status Code |
---|---|---|
not_found | if the download session does not exist. | 404 |
invalid_argument | if there is no file with the specified file_name . |
400 |
unauthorized | if the the download session wasn't created with the ContentLibrary.ReadStorage privilege and the caller requested a DIRECT endpoint type. | 403 |
Copyright © 2014. All Rights Reserved.