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

Querying Audit Logs

Function

Querying audit logs.

URI

POST /koodrive/ose/v1/auditlog

Request Parameters

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

language

No

String

Definition:

Language code.

Constraints:

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

Range:

The value must comply with the internationalization specifications.

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.

Constraints:

The format is yyyyMMDD'T'HHmmss'Z', for example, 20251103T070140Z.

Range:

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

Default Value:

N/A

Table 2 Request body parameters

Parameter

Mandatory

Type

Description

operTimeFrom

No

String

Definition:

Operation start time.

Constraints:

N/A

Range:

N/A

Default Value:

N/A

operTimeTo

No

String

Definition:

Operation end time.

Constraints:

N/A

Range:

N/A

Default Value:

N/A

operatorName

No

String

Definition:

Operator account name.

Constraints:

N/A

Range:

N/A

Default Value:

N/A

operations

No

Array of strings

Definition:

Operation type to be searched for. Multiple operation types can be filtered.

Constraints:

N/A

Range:

N/A

Default Value:

N/A

excludedOperations

No

Array of strings

Definition:

Operation types to be excluded. Multiple operation types can be filtered.

Constraints:

N/A

Range:

N/A

Default Value:

N/A

operateResult

No

String

Definition:

Operation result.

Constraints:

N/A

Range:

N/A

Default Value:

N/A

operatorIP

No

String

Definition:

Operator IP address.

Constraints:

N/A

Range:

N/A

Default Value:

N/A

pageInfo

No

PageInfo object

Definition:

Pagination information.

Constraints:

N/A

Range:

N/A

Default Value:

N/A

sortInfo

No

SortInfo object

Definition:

Sorting information.

Constraints:

N/A

Range:

N/A

Default Value:

N/A

Table 3 PageInfo

Parameter

Mandatory

Type

Description

pageSize

Yes

Integer

Definition:

Page size.

Constraints:

N/A

Range:

1–100

Default Value:

10

pageNum

Yes

Integer

Definition:

Page number information.

Constraints:

N/A

Range:

N/A

Default Value:

N/A

Table 4 SortInfo

Parameter

Mandatory

Type

Description

sortType

No

Integer

Definition:

Sorting type.

Constraints:

N/A

Range:

1: operation time (default)

Default Value:

1

sortDirection

No

Integer

Definition:

Sorting direction.

Constraints:

N/A

Range:

1: ascending 2: descending (default)

Default Value:

2

Response Parameters

Status code: 200

Table 5 Response body parameters

Parameter

Type

Description

code

String

Response code.

msg

String

Response message.

total

Integer

Total number of lists.

logInfoList

Array of LogInfo objects

Audit log list.

Table 6 LogInfo

Parameter

Type

Description

logId

String

Log ID.

tenantId

String

Tenant ID.

operatorName

String

Operator account name.

operatorId

String

Operator ID.

operateTime

String

Operation time.

operation

String

Operation type.

resource

String

Operation object, which is a resource ID.

operateResult

Integer

Operation result.

operatorIP

String

Operator IP address.

message

String

Failure cause.

Example Requests

Example request for querying audit logs by page.

http://10.32.45.165:8080/koodrive/ose/v1/auditlog

{
  "operTimeFrom" : "2025-01-01T00:00:01.000Z",
  "operTimeTo" : "2026-01-01T00:00:01.000Z",
  "operatorName" : "",
  "operations" : [ ],
  "excludedOperations" : [ ],
  "operateResult" : "",
  "operatorIp" : "",
  "pageInfo" : {
    "pageSize" : 10,
    "pageNum" : 0
  },
  "sortInfo" : {
    "sortType" : 1,
    "sortDirection" : 2
  }
}

Example Responses

Status code: 200

Response to the request for querying audit logs by page.

{
  "total" : 184645,
  "logInfoList" : [ {
    "logId" : "1734826883142633601",
    "tenantId" : "ee33a28d0f454801b4532233258822e4",
    "operatorName" : "lrz1209",
    "operatorId" : "1605107125384798848",
    "operateTime" : "2025-07-21T09:58:48.000Z",
    "operation" : "getFile",
    "resource" : "FnNpiVn_Vkqt3sG2mc6lPC4qc419xV-Wr",
    "operateResult" : 0,
    "operatorIP" : "127.0.0.1"
  }, {
    "logId" : "1734826882849032320",
    "tenantId" : "ee33a28d0f454801b4532233258822e4",
    "operatorName" : "lrz1209",
    "operatorId" : "1605107125384798848",
    "operateTime" : "2025-07-21T09:58:33.000Z",
    "operation" : "getFile",
    "resource" : "resource is null",
    "operateResult" : 1,
    "message" : "The maximum size of the thumbnail field is 5.",
    "operatorIP" : "127.0.0.1"
  }, {
    "logId" : "1734826882530265216",
    "tenantId" : "ee33a28d0f454801b4532233258822e4",
    "operatorName" : "lrz1209",
    "operatorId" : "1605107125384798848",
    "operateTime" : "2025-07-21T09:58:25.000Z",
    "operation" : "getFile",
    "resource" : "resource is null",
    "operateResult" : 1,
    "message" : "No permissions.",
    "operatorIP" : "127.0.0.1"
  }, {
    "logId" : "1734859178008241024",
    "tenantId" : "ee33a28d0f454801b4532233258822e4",
    "operatorName" : "hid42638091",
    "operatorId" : "1605107117323346560",
    "operateTime" : "2025-07-21T07:35:30.000Z",
    "operation" : "SearchFile",
    "resource" : "1",
    "operateResult" : 0,
    "operatorIP" : "10.69.250.244"
  }, {
    "logId" : "1734859177127437185",
    "tenantId" : "ee33a28d0f454801b4532233258822e4",
    "operatorName" : "hid42638091",
    "operatorId" : "1605107117323346560",
    "operateTime" : "2025-07-21T07:35:29.976Z",
    "operation" : "GetUser",
    "resource" : "1605107117323346560",
    "operateResult" : 0,
    "operatorIP" : "10.69.250.244"
  }, {
    "logId" : "1734859176976442112",
    "tenantId" : "ee33a28d0f454801b4532233258822e4",
    "operatorName" : "hid42638091",
    "operatorId" : "1605107117323346560",
    "operateTime" : "2025-07-21T07:35:29.958Z",
    "operation" : "getSpaceByContainerId",
    "resource" : "1605107117323346560",
    "operateResult" : 0,
    "operatorIP" : "10.69.250.244"
  }, {
    "logId" : "1734859174552134529",
    "tenantId" : "ee33a28d0f454801b4532233258822e4",
    "operatorName" : "hid42638091",
    "operatorId" : "1605107117323346560",
    "operateTime" : "2025-07-21T07:35:29.669Z",
    "operation" : "GetUser",
    "resource" : "1605107117323346560",
    "operateResult" : 0,
    "operatorIP" : "10.69.250.244"
  }, {
    "logId" : "1734859174426305280",
    "tenantId" : "ee33a28d0f454801b4532233258822e4",
    "operatorName" : "hid42638091",
    "operatorId" : "1605107117323346560",
    "operateTime" : "2025-07-21T07:35:29.654Z",
    "operation" : "getSpaceByContainerId",
    "resource" : "1605107117323346560",
    "operateResult" : 0,
    "operatorIP" : "10.69.250.244"
  }, {
    "logId" : "1734859171641287553",
    "tenantId" : "ee33a28d0f454801b4532233258822e4",
    "operatorName" : "hid42638091",
    "operatorId" : "1605107117323346560",
    "operateTime" : "2025-07-21T07:35:29.322Z",
    "operation" : "GetUser",
    "resource" : "1605107117323346560",
    "operateResult" : 0,
    "operatorIP" : "10.69.250.244"
  }, {
    "logId" : "1734859171481903872",
    "tenantId" : "ee33a28d0f454801b4532233258822e4",
    "operatorName" : "hid42638091",
    "operatorId" : "1605107117323346560",
    "operateTime" : "2025-07-21T07:35:29.303Z",
    "operation" : "getSpaceByContainerId",
    "resource" : "1605107117323346560",
    "operateResult" : 0,
    "operatorIP" : "10.69.250.244"
  } ],
  "code" : 0,
  "msg" : "success"
}

Status Codes

Status Code

Description

200

Response to the request for querying audit logs by page.