Obtaining Download Links
Function
Obtain the download links of files.
URI
POST /koodrive/ose/v1/files/download
Request Parameters
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
Authorization |
Yes |
String |
Access token. Token authentication is used to call KooDrive APIs. A token indicates the permission. When an API is called, the token is added to the request header to obtain the operation permission. For details about how to obtain an access token, see the corresponding developer guide. The format is Bearer+{access_token}. |
X-Traceid |
No |
String |
Message log trace ID. The value contains 58 bits. |
language |
No |
String |
Language code, which complies with the internationalization specifications. For example, en-US indicates English (United States). English (United States) is used by default. |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
containerId |
Yes |
String |
ID of the space where the files to be obtained are located. |
fileIds |
Yes |
Array of strings |
File ID list. Up to 100 file IDs are allowed. |
Response Parameters
Status code: 200
Parameter |
Type |
Description |
---|---|---|
code |
Integer |
Response code. |
msg |
String |
Response information. |
batchCode |
Integer |
Response code.
|
downloads |
Array of DownloadInfoResponse objects |
Download link information. |
Example Requests
Obtains the download links of files.
POST /koodrive/ose/v1/files/download Authorization:Bearer+10f88*********4791e9ff { "containerId": "IAADfsBFCO6WtAtuA9add2fea594e4e75b8feb8474ef236", "fileIds": [ "Fn1bTLIOomJkTCAe9DEVBRY4U6IkuqkMZ" ] }
Example Responses
Status code: 200
Response to the request for obtaining the file download links.
{ "downloads" : [ { "fileId" : "Fn1bTLIOomJkTCAe9DEVBRY4U6IkuqkMZ", "url" : "https://b10-obs-ykj-uat-01.obs.cidc-rp-2006.joint.cmecloud.cn/5e3fc0c5d4fa45338f44db7177579c2c087?response-content-disposition=attachment%3B%20filename%3D%22%25E5%258F%2591%25E7%25A5%25A81.pdf%22&X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Date=20231227T072939Z&X-Amz-SignedHeaders=host&X-Amz-Expires=3600&X-Amz-Credential=MKRISPBZAJWFHNBJ5WLB%2F20231227%2Fcidc-rp-2006%2Fs3%2Faws4_request&X-Amz-Signature=9d06798af17e2f1082b720f43af29a32b3154da4ddeee4f10025a758b599728a", "fileName" : "Invoice 1.pdf", "code" : "0", "msg" : "success" } ], "batchCode" : 1, "code" : 0, "msg" : "Success." }
Status Codes
Status Code |
Description |
---|---|
200 |
Response to the request for obtaining the file download links. |
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot