Updated on 2025-08-28 GMT+08:00

Querying Audit Logs

Function

Query audit logs.

URI

POST /koodrive/ose/v1/auditlog

Request Parameters

Table 1 Request body parameters

Parameter

Mandatory

Type

Description

operTimeFrom

No

String

Operation start time.

operTimeTo

No

String

Operation end time.

operatorName

No

String

Operator account name.

operations

No

Array of strings

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

excludedOperations

No

Array of strings

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

operateResult

No

String

Operation result.

operatorIP

No

String

Operator IP address.

pageInfo

No

PageInfo object

Pagination information.

sortInfo

No

SortInfo object

Sorting information.

Table 2 PageInfo

Parameter

Mandatory

Type

Description

pageSize

Yes

Integer

Value range: 1 to 100. Default value: 10.

pageNum

Yes

Integer

Page number information.

Table 3 SortInfo

Parameter

Mandatory

Type

Description

sortType

No

Integer

Sorting type. 1: operation time (default).

sortDirection

No

Integer

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

Response Parameters

Status code: 200

Table 4 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 5 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 permission.",
    "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