Updated on 2026-02-12 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

Definition:

Number of results returned on each page. It is possible that partial or empty result pages are returned before the end of the result list has been reached.

Constraints:

N/A

Range:

The minimum value is 1 and the maximum value is 100.

Default Value:

100

pageCursor

No

String

Definition:

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

Constraints:

N/A

Range:

N/A

Default Value:

N/A

sortType

No

Integer

Definition:

Sorting type.

  • 1: related operation time

Constraints:

N/A

Range:

N/A

Default Value:

1

sortDirection

No

Integer

Definition:

Sorting direction. 1: ascending 2: descending

Constraints:

N/A

Range:

N/A

Default Value:

2

displayName

No

String

Definition:

Display name. Fuzzy match by display name is supported.

Constraints:

N/A

Range:

N/A

Default Value:

N/A

relatedType

No

String

Definition:

Related type.

Constraints:

N/A

Range:

  • 0: all

  • 1: shared with me

Default Value:

0

imageProcess

No

String

Definition:

Image operation, which can be used to specify the thumbnail size. For details, see https://support.huaweicloud.com/en-us/usermanual-obs/obs_01_0430.html.

Constraints:

N/A

Range:

N/A

Default Value:

image/resize,m_lfit,h_128,w_128

Request Parameters

Table 2 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

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

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

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

File list.

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

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