Updated on 2024-07-30 GMT+08:00

Listing Related Files

Function

List files related to you.

URI

GET /koodrive/ose/v1/related

Table 1 Query Parameters

Parameter

Mandatory

Type

Description

pageSize

No

Integer

Number of records to be returned on each page. Default and maximum value: 100. It is possible that partial or empty result pages are returned before the end of the result list has been reached.

Maximum: 100

pageCursor

No

String

Current page cursor, which is obtained from nextCursor of the previous response.

sortType

No

Integer

Sorting type. 1: by operation time (default).

sortDirection

No

Integer

Sorting order. 1: ascending; 2: descending (default).

displayName

No

String

Fuzzy match by display name is supported.

relatedType

No

String

Related file type. 0: all; 1: shared with you. If this parameter is null or set to 0, all types are queried.

Request Parameters

Table 2 Request header parameters

Parameter

Mandatory

Type

Description

X-Traceid

No

String

Service trace ID, which contains 58 bits.

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

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.

Response Parameters

Status code: 200

Table 3 Response body parameters

Parameter

Type

Description

code

String

Response code.

msg

String

Response information.

nextCursor

String

Pagination cursor. If the cursor does not exist, the last record has been returned.

relatedToMeInfos

Array of RelatedToMeRecord objects

Sharing link list.

total

Long

Total number of records.

Table 4 RelatedToMeRecord

Parameter

Type

Description

operator

String

Operator name.

operateType

Integer

Operation type. 1: sharing.

operateTime

String

Operation time.

id

String

Record ID. If the operation type is sharing, the value is the sharing ID.

displayName

String

Display name.

files

Array of FileInfo objects

expireTime

String

Expiration time.

status

Integer

0: determined based on the expiration time. 1: The file has been deleted. 2: The space has expired (the space has been disabled or deleted or you do not have the space permission).

operatorId

String

Operator ID.

containerId

String

Space ID.

tenantId

String

Tenant ID.

Table 5 FileInfo

Parameter

Type

Description

id

String

File ID.

size

String

File size.

fileType

String

File type.

downloadLinks

Array of DownloadLink objects

Required by the image type (when fileType is set to 15).

recycled

Boolean

Whether the file is in the recycle bin.

Example Requests

Lists files related to you.

GET /koodrive/ose/v1/related?sortType=1&sortDirection=2&pageSize=2&pageCursor=&displayName=&relatedType=1

{
  "total" : 1,
  "relatedToMeInfos" : [ {
    "id" : "1427677119873431808",
    "operator" : "zujian1",
    "operatorId" : "1395664261493231745",
    "operateType" : 1,
    "operateTime" : "2024-05-23T11:39:35.000Z",
    "displayName" : "Content Not Reviewed.docx",
    "files" : [ {
      "id" : "Fv54zG8ha44HX2XRlrQlM76zD4KAN2uOB",
      "size" : 50383,
      "fileType" : "26",
      "recycled" : false,
      "downloadLinks" : [ {
        "usage" : "content",
        "downloadLink" : "https://b10-obs-ykj-uat-01.obs.cidc-rp-2006.joint.cmecloud.cn/6957916206ce4407ac9436567b14d719086?response-content-disposition=attachment%3B%20filename%2A%3DUTF-8%27%27%25E5%2586%2585%25E5%25AE%25B9%25E6%259C%25AA%25E5%25AE%25A1%25E6%25A0%25B8.docx&X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Date=20240523T113937Z&X-Amz-SignedHeaders=host&X-Amz-Expires=3600&X-Amz-Credential=MKRISPBZAJWFHNBJ5WLB%2F20240523%2Fcidc-rp-2006%2Fs3%2Faws4_request&X-Amz-Signature=e130a202a80157e63583bd7597452eb1d30a70c610db86be68717541114e2bd0"
      }, {
        "usage" : "thumbnail",
        "downloadLink" : "https://b10-obs-ykj-uat-01.obs.cidc-rp-2006.joint.cmecloud.cn/6957916206ce4407ac9436567b14d719086?x-image-process=image%2Fresize%2Cm_lfit%2Ch_128%2Cw_128&response-content-disposition=attachment%3B%20filename%2A%3DUTF-8%27%27%25E5%2586%2585%25E5%25AE%25B9%25E6%259C%25AA%25E5%25AE%25A1%25E6%25A0%25B8.docx&X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Date=20240523T113937Z&X-Amz-SignedHeaders=host&X-Amz-Expires=3600&X-Amz-Credential=MKRISPBZAJWFHNBJ5WLB%2F20240523%2Fcidc-rp-2006%2Fs3%2Faws4_request&X-Amz-Signature=e78515818612dbb024bf14300bd63bbb340e7f7476b988143089ce6d92d6d9f9"
      } ]
    } ],
    "expireTime" : "2024-05-30T11:39:35.000Z",
    "status" : 0,
    "containerId" : "IAAFfyRNd07vFgAAA1395504262720721025",
    "tenantId" : "d5ac574bd2934a69baa4f23c55daa8d4"
  } ],
  "code" : 0,
  "msg" : "OK"
}

Example Responses

Status code: 200

OK

{
  "code" : "string",
  "msg" : "string",
  "nextCursor" : "string",
  "relatedToMeInfos" : [ {
    "operator" : "string",
    "operateType" : 0,
    "operateTime" : "2024-06-03T02:25:41.085Z",
    "id" : "string",
    "displayName" : "string",
    "files" : [ {
      "id" : "string",
      "size" : "string",
      "fileType" : "string",
      "downloadLinks" : [ {
        "usage" : "string",
        "downloadLink" : "string"
      } ],
      "recycled" : true
    } ],
    "expireTime" : "2024-06-03T02:25:41.085Z",
    "status" : 0,
    "operatorId" : "string",
    "containerId" : "string",
    "tenantId" : "string"
  } ],
  "total" : 0
}

Status Codes

Status Code

Description

200

OK