Updated on 2026-02-12 GMT+08:00

Modifying Sharing Settings

Function

Modify sharing settings.

URI

PUT /koodrive/ose/v1/share/{shareId}

Table 1 Path Parameters

Parameter

Mandatory

Type

Description

shareId

Yes

String

Definition:

Share ID, which is returned by the APIs for creating a share and querying the share list.

Constraints:

N/A

Range:

N/A

Default Value:

N/A

Request Parameters

Table 2 Request header parameters

Parameter

Mandatory

Type

Description

Authorization

Yes

String

Definition:

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}.

Constraints:

N/A

Range:

N/A

Default Value:

N/A

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

X-User-Id

Yes

String

Definition:

User ID on KooDrive, which is used for app authentication.

Constraints:

N/A

Range:

N/A

Default Value:

N/A

X-Date

Yes

String

Definition:

Date, which is used for app authentication. The format is yyyyMMdd'T'HHmmss'Z'.

Constraints:

The value must be within 15 minutes from the current time and cannot be later than the current time.

Range:

N/A

Default Value:

N/A

X-Hw-Agentname

Yes

String

Definition:

Carrier name.

Constraints:

N/A

Range:

N/A

Default Value:

N/A

Table 3 Request body parameters

Parameter

Mandatory

Type

Description

extractCode

No

String

Definition:

Set an access code.

Constraints:

A string of 8 characters

Range:

[0-9a-zA-Z]

Default Value:

N/A

comment

No

String

Definition:

Sharing message.

Constraints:

N/A

Range:

N/A

Default Value:

N/A

validDays

Yes

Integer

Definition:

Sharing validity period. The value 0 indicates that the sharing validity period is not set.

Constraints:

N/A

Range:

0 to 365

Default Value:

N/A

Response Parameters

Status code: 200

Table 4 Response body parameters

Parameter

Type

Description

code

String

Response code.

msg

String

Response information.

shareLink

shareLink object

Sharing link information.

Example Requests

PUT /koodrive/ose/v1/share/{shareId}

{
  "expireTime" : "2025-05-29T02:00:39.952Z",
  "extractCode" : "MDg2K0vU",
  "comment" : "123",
  "validDays" : 9
}

Example Responses

Status code: 200

OK

{
  "shareLink" : {
    "shareId" : "1689743054514187776",
    "shortUrl" : "1689743054514187777",
    "linkUrl" : "1689743054514187777",
    "shareTime" : "2025-05-20T01:37:49.052Z",
    "expireTime" : "2025-05-29T02:17:41.222Z",
    "scope" : 1,
    "extractCode" : "MDg2K0vU",
    "displayName" : "jpeg_20250513_103635.jpeg",
    "status" : 0,
    "comment" : "123",
    "ownerId" : "1681759180324844417",
    "containerId" : "IAAB5thdWzxEoAsiA1681759183084696448",
    "viewCnt" : 0,
    "downloadCnt" : 0,
    "saveCnt" : 0,
    "updateTime" : "2025-05-20T02:17:41.222Z"
  },
  "code" : 0,
  "msg" : "Success."
}

Status Codes

Status Code

Description

200

OK