Browse Platform API
Platform API

Search log records

Copy

Use this endpoint to search client log records registered by your application. It supports administration, customer support, and issue investigation workflows; it does not search OpenIM server runtime logs.

HTTP request

POST {API_ADDRESS}/third/logs/search

Request example

curl --request POST "${API_ADDRESS}/third/logs/search" \
  --header "Content-Type: application/json; charset=utf-8" \
  --header "operationID: ${OPERATION_ID}" \
  --header "token: ${ADMIN_TOKEN}" \
  --data-raw '{
  "keyword": "user_001",
  "startTime": 1719800000000,
  "endTime": 1719886400000,
  "pagination": {"pageNumber": 1, "showNumber": 20}
}'

Request body

ParameterRequiredTypeDescription
keywordNostringKeyword matched against searchable log record fields.
startTimeNointStart of the time range as a Unix timestamp in milliseconds. When both time values are 0, the server uses its default range.
endTimeNointEnd of the time range as a Unix timestamp in milliseconds.
paginationYesobjectPagination settings.
pagination.pageNumberYesintPage number, starting at 1.
pagination.showNumberYesintPositive number of records per page.

Response

{
  "errCode": 0,
  "errMsg": "",
  "errDlt": "",
  "data": {
    "logsInfos": [{
      "userID": "user_001",
      "platform": "Android",
      "url": "https://example.com/logs/openim.log",
      "createTime": 1719800000000,
      "nickname": "Tom",
      "logID": "1234567890",
      "filename": "openim.log",
      "systemType": "",
      "ex": "",
      "version": "1.0.0"
    }],
    "total": 1
  }
}
FieldTypeDescription
data.logsInfosarrayMatching client log records.
data.logsInfos[].logIDstringLog record ID used for deletion.
data.logsInfos[].urlstringRegistered log file URL.
data.logsInfos[].createTimeintRecord creation time in Unix milliseconds.
data.totalintTotal matching records.

This is a read-only operation. startTime must not be later than endTime. See Error codes for error handling.