Retrieves the download URL for a file.
Try it now
Test
RAM authorization
Request syntax
POST /v2/file/get_download_url HTTP/1.1
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| body |
object |
No |
||
| share_id |
string |
No |
|
7JQX1FswpQ8 |
| drive_id |
string |
No |
|
1 |
| file_id |
string |
Yes |
|
9520943DC264 |
| file_name |
string |
No |
|
1.txt |
| expire_sec |
integer |
No |
|
100 |
| response_content_type |
string |
No |
video/mp4 |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
The response schema. |
||
| url |
string |
The public download URL. If you enable intelligent data endpoints, the system selects the best network line for the customer and returns a download URL with the corresponding domain name. |
https://data.aliyunpds.com/hz22%2F5d79219b0aa9a7c995a94a96993ba3205cd91c5a%2F5d79219bf3261a5d38744da0834ed489b677a27a?Expires=xxxOSSAccessKeyId=xxx&Signature=xxx&response-content-disposition=attachment%3Bfilename%3DtBiZAoJPC2c8b13450eda4292b7f5f8010618e078.txt |
| internal_url |
string |
The download URL for use within a Virtual Private Cloud (VPC). This field is not used if you enable intelligent data endpoints. In that case, the system automatically returns the appropriate URL in the url field. To use this field, contact PDS technical support. |
https://data-vpc.aliyunpds.com/hz22%2F5d79219b0aa9a7c995a94a96993ba3205cd91c5a%2F5d79219bf3261a5d38744da0834ed489b677a27a?Expires=xxxOSSAccessKeyId=xxx&Signature=xxx&response-content-disposition=attachment%3Bfilename%3DtBiZAoJPC2c8b13450eda4292b7f5f8010618e078.txt |
| cdn_url |
string |
The Content Delivery Network (CDN) download URL. This field is not used if you enable intelligent data endpoints. In that case, the system automatically returns the appropriate URL in the url field. To use this field, contact PDS technical support. |
https://data-cdn.aliyunpds.com/hz22%2F5d79219b0aa9a7c995a94a96993ba3205cd91c5a%2F5d79219bf3261a5d38744da0834ed489b677a27a?Expires=xxxOSSAccessKeyId=xxx&Signature=xxx&response-content-disposition=attachment%3Bfilename%3DtBiZAoJPC2c8b13450eda4292b7f5f8010618e078.txt |
| expiration |
string |
The expiration time of the download URL. |
2022-01-02T15:04:05.999Z07:00 |
| size |
integer |
The file size, in bytes. |
10 |
| crc64_hash |
string |
The CRC-64 value. |
5498595269368962671 |
| content_hash |
string |
The hash of the file content. |
EA4942AA8761213890A5C386F88E6464D2C31CA1 |
| content_hash_name |
string |
The name of the hash algorithm for the file content. |
sha1 |
Examples
Success response
JSON format
{
"url": "https://data.aliyunpds.com/hz22%2F5d79219b0aa9a7c995a94a96993ba3205cd91c5a%2F5d79219bf3261a5d38744da0834ed489b677a27a?Expires=xxxOSSAccessKeyId=xxx&Signature=xxx&response-content-disposition=attachment%3Bfilename%3DtBiZAoJPC2c8b13450eda4292b7f5f8010618e078.txt",
"internal_url": "https://data-vpc.aliyunpds.com/hz22%2F5d79219b0aa9a7c995a94a96993ba3205cd91c5a%2F5d79219bf3261a5d38744da0834ed489b677a27a?Expires=xxxOSSAccessKeyId=xxx&Signature=xxx&response-content-disposition=attachment%3Bfilename%3DtBiZAoJPC2c8b13450eda4292b7f5f8010618e078.txt",
"cdn_url": "https://data-cdn.aliyunpds.com/hz22%2F5d79219b0aa9a7c995a94a96993ba3205cd91c5a%2F5d79219bf3261a5d38744da0834ed489b677a27a?Expires=xxxOSSAccessKeyId=xxx&Signature=xxx&response-content-disposition=attachment%3Bfilename%3DtBiZAoJPC2c8b13450eda4292b7f5f8010618e078.txt",
"expiration": "2022-01-02T15:04:05.999Z07:00",
"size": 10,
"crc64_hash": "5498595269368962671",
"content_hash": "EA4942AA8761213890A5C386F88E6464D2C31CA1",
"content_hash_name": "sha1"
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.