URI
POST /koodrive/ose/v1/share
Request Parameters
Table 2 Request body parameters Parameter | Mandatory | Type | Description |
|---|
scope | Yes | Integer | Definition: Sharing scope. Constraints: N/A Range: 1: external link sharing 3: access by specified enterprise users Default Value: N/A |
fileIds | Yes | Array of strings | Definition: File ID list. Constraints: The list length ranges from 1 to 100. Range: N/A Default Value: N/A |
containerId | Yes | String | Definition: Space ID. Constraints: N/A Range: N/A Default Value: N/A |
extractCode | No | String | Definition: Access code. Constraints: [0-9a-zA-Z]{8} Range: N/A Default Value: N/A |
expireTime | No | String | Definition: Expiration time. Constraints: The format is yyyy-MM-dd HH:mm:ss, for example, 2025-05-27 01:37:49. Range: N/A Default Value: N/A |
comment | No | String | Definition: Sharing message. Constraints: Less than 512 characters. Range: N/A Default Value: N/A |
validDays | Yes | Integer | Definition: Sharing validity period. Constraints: N/A Range: 1~365 Default Value: N/A |
expiredType | No | String | Definition: Invalidation type. Constraints: N/A Range: N/A Default Value: N/A |
phoneNumbers | No | Array of strings | Definition: User mobile number list. Constraints: N/A Range: N/A Default Value: N/A |
Response Parameters
Status code: 200
Table 3 Response body parameters Parameter | Type | Description |
|---|
code | String | Response code. |
msg | String | Response information. |
shareLink | shareLink object | Sharing link information. |
Table 4 shareLink Parameter | Type | Description |
|---|
shareId | String | Sharing ID. |
shortUrl | String | Sharing short code. |
linkUrl | String | Sharing link. |
extractCode | String | Access code. |
comment | String | Message. |
expireTime | String | Expiration time. |
Example Requests
POST /koodrive/ose/v1/share
{
"scope" : "1",
"fileIds" : [ "FryfD0bDk0aWSfrlCgZVJG7hxDMCY5hkl" ],
"containerId" : "IAAB5thdWzxEoAsiA1681759183084696448",
"permission" : {
"download" : true
},
"enabledCode" : false,
"extractCode" : "MDg2K0vU",
"expireTime" : "2025-04-29T20:01:20.000Z",
"expiredType" : "2",
"comment" : "",
"validDays" : 7
} Example Responses
Status code: 200
OK
{
"shareLink" : {
"shareId" : "1689743054514187776",
"shortUrl" : "1689743054514187777",
"linkUrl" : "1689743054514187777",
"extractCode" : "MDg2K0vU",
"comment" : "",
"expireTime" : "2025-05-27T01:37:49.052Z"
},
"code" : 0,
"msg" : "OK"
} Status Codes
Status Code | Description |
|---|
200 | OK |