Browse Platform API
Platform API

Upload log records

Copy

Use this endpoint to register local client logs that your application has already collected and uploaded to object storage or a file service. OpenIM stores the file URL and client metadata so that the record can be searched later. This endpoint does not receive the log file itself.

HTTP request

POST {API_ADDRESS}/third/logs/upload

Request example

curl --request POST "${API_ADDRESS}/third/logs/upload" \
  --header "Content-Type: application/json; charset=utf-8" \
  --header "operationID: ${OPERATION_ID}" \
  --header "token: ${ADMIN_TOKEN}" \
  --data-raw '{
  "platform": 2,
  "fileURLs": [{
    "filename": "openim.log",
    "URL": "https://example.com/logs/openim.log"
  }],
  "appFramework": "flutter",
  "version": "1.0.0",
  "ex": ""
}'
Keep management tokens on trusted backend services. Do not ship them in client code.

Request body

ParameterRequiredTypeDescription
platformYesintSource client platform. See PlatformID.
fileURLsYesarrayLog files that have already been uploaded.
fileURLs[].filenameYesstringLog filename.
fileURLs[].URLYesstringLog file URL accessible to the OpenIM server.
appFrameworkNostringClient framework, such as flutter or react-native.
versionNostringClient or application version.
exNostringExtension data.

Response

{
  "errCode": 0,
  "errMsg": "",
  "errDlt": ""
}

errCode === 0 means that the log index record was registered. It does not mean that OpenIM uploaded or validated the file contents. See Error codes for error handling.

Permissions and limits

  • platform and fileURLs are required.
  • Every fileURLs[].URL must be accessible to the OpenIM server.
  • Keep array sizes within the limits configured for your deployment.