Updated on 2026-04-16 GMT+08:00

Downloading a File

Function

Obtain the download address of a single file in the sharing link. (This function is available only to whitelisted users.)

URI

POST /koodrive/ose/v1/share/public/download

Request Parameters

Table 1 Request header parameters

Parameter

Mandatory

Type

Description

X-Traceid

No

String

Definition:

Service trace ID, which contains 58 bits.

Constraints:

N/A

Range:

The value contains 58 bits.

Default Value:

N/A

language

No

String

Definition:

Language code.

Constraints:

The value must comply with the internationalization specifications. For example, en_us indicates English (United States).

Range:

N/A

Default Value:

en-US

X-Hw-Agentname

Yes

String

Definition:

Carrier name.

Constraints:

N/A

Range:

N/A

Default Value:

N/A

Table 2 Request body parameters

Parameter

Mandatory

Type

Description

shareId

Yes

String

Definition:

Sharing ID.

Constraints:

N/A

Range:

N/A

Default Value:

N/A

kdstoken

No

String

Definition:

Temporary token for sharing.

Constraints:

N/A

Range:

N/A

Default Value:

N/A

fileId

Yes

String

Definition:

ID of the file to be downloaded.

Constraints:

N/A

Range:

N/A

Default Value:

N/A

Response Parameters

Status code: 200

Table 3 Response body parameters

Parameter

Type

Description

code

Integer

Response code.

msg

String

Response information.

downloadUrl

String

Download link.

Example Requests

/koodrive/ose/v1/share/public/download

{
  "shareId" : "1808628918186415616",
  "fileId" : "FumFysUZDLUEAGaRDVyFC76wn87hIwVpB",
  "kdstoken" : ""
}

Example Responses

Status code: 200

OK

{
  "downloadUrl" : "https://obs-koodrive-obs.cn-north-4.myhuaweicloud.com/a*********************************ers=host&X-Amz-Expires=3600&X-Amz-Credential=CKJ3TYZ9M7QPX4SXS3",
  "code" : 0,
  "msg" : "Success."
}

Status Codes

Status Code

Description

200

OK