List of Log Operations

Last Updated on : 2024-12-25 08:21:12download

Get the list of log operations, and support fuzzy search by the start time, end time, and operation content.

API address

GET: /v1.0/iot-03/audit/operate-logs

Request parameter

Parameter nameTypeINRequiredDescription
reqAuditLogPageReq falseThe list of auditing logs on pages.

Description of req

Parameter nameTypeINRequiredDescription
start_timeLong falseThe start time.
end_timeLong falseThe end time.
operate_typeString falseThe operation type.
key_wordsString falseThe keywords of search.
last_idString falseThe number of the last value.
last_record_timeLong falseThe logging time of the last value.
sizeInteger falseThe total number of entries.
merchant_codeString falseThe code of a specified merchant.
extString falseThe extension field.

Return parameter

Parameter nameTypeDescription
resultCursorPageThe list of results.

Description of result

Parameter nameTypeDescription
last_row_keyStringThe row key of the last entry on the page.
listListThe returned result.
has_moreBooleanSpecifies whether to return the next page.

Description of list

Parameter nameTypeDescription
idStringThe log number.
record_timeLongThe logging time.
uidStringThe unique number of a specified user.
usernameStringThe name of a specified user.
operate_typeStringThe operation type.
operate_contentStringThe operation content.
user_idStringThe ID of a specified user.
roleStringThe role.
accountStringThe account.
operate_geo_infoStringThe geographic location of a specified user.
operate_ip_infoStringThe IP address.
client_idStringThe project number.
merchant_codeStringThe code of a merchant.
extStringThe extension field.
project_codeStringThe project code.

Request example

GET: /v1.0/iot-03/audit/operate-logs?size=20&start_time=1627747200000&end_time=1628524800000

Return example

{
    "result": {
        "list": [
            {
                "ext": "kuozhan",
                "merchant_code": "tuya",
                "operate_type": "Logout 2",
                "role": "admin3",
                "project_code": "p1622691151775t7pu9v",
                "client_id": "eqtpvy5ramzuwgpcl***",
                "operate_content": "Log out of System 2",
                "uid": "bay1616159871313fFcE",
                "user_id": "user2",
                "id": "77f58bfd8df62890_9223370408028725***",
                "operate_ip_info": "192.168.1.9",
                "operate_geo_info": "Shenzhen City, Guangdong Province",
                "record_time": 1628826050134,
                "account": "18036142***",
                "username": "***"
            }
        ],
        "has_more": false
    },
    "t": 1628826135152,
    "success": true
}

Error code

For more information, see error code.