Docs
api
Operation Log(ULog)
GetUserOperationEvents

Obtain User Operation Log - GetUserOperationEvents

Overview

Obtain User Operation Log

💡 Currently, only the logs from the past 365 days can be queried through this API.

Definition

Public Parameters

Parameter NameTypeDescription InformationRequired
ActionstringCorresponding API command name, the current API is GetUserOperationEvents.Yes
PublicKeystringThe user's public key can be obtained from Console (opens in a new tab)Yes
SignaturestringUser signature generated based on public key and API command, see Signature AlgorithmYes

Request Parameters

Parameter NameTypeDescription InformationRequired
ProjectIdstringProject ID. If not filled in, the default project is used, sub-accounts must be filled in. Please refer to the GetProjectList interface.No
BeginTimeintStart Time (UNIX Timestamp)No
EndTimeintEnd Time (UNIX Timestamp)No
MaxResultsintMaximum number of records per queryNo
NextTokenstringUsed to request the next page of query results. The request parameters must be consistent with the previous request.No
ResourceIDstringResource ID, used to search for operation logs associated with a certain resourceNo

Response Field

Field NameTypeDescription InformationRequired
RetCodeintReturn status code. If it is 0, it means successful return. If it is not 0, it means failure.Yes
ActionstringOperation command name.Yes
MessagestringReturns an error message, providing detailed description when RetCode is non-zero.No
NextTokenstringUsed to request the next page of query results. The request parameters must be consistent with the previous request.No
Eventsarray[UserOperationEvent]Operation Event ListNo

Data Model

UserOperationEvent

Field NameTypeDescription InformationRequired
RegionstringRegionNo
ApistringOperated APINo
IsSuccessbooleanIs it successful?No
OperateTimeintOperation TimeNo
UserNamestringUsernameNo
UserEmailstringUser EmailNo
RelatedResourcearray[RelatedResource]Resource associated with the operation eventNo

RelatedResource

Field NameTypeDescription InformationRequired
ResourceIdstringResource IDNo
ResourceNamestringResource NameNo

Example

Request Example

https://api.ucloud-global.com/?Action=GetUserOperationEvents
&ProjectId=DybfOwNo
&BeginTime=2
&EndTime=4
&MaxResults=7
&NextToken=nLgQPnKo
&ResourceID=CfrwODDl

Response Example

{
  "Action": "GetUserOperationEventsResponse",
  "Events": [
    {
      "Api": "kNELMpfb",
      "IsSuccess": true,
      "OperateTime": 2,
      "Region": "sLtsxECu",
      "RelatedResource": [
        {
          "ResourceId": "HcWkaBoa",
          "ResourceName": "yVfCJcnu"
        }
      ],
      "UserEmail": "oZHZSIVq",
      "UserName": "MMmTomWP"
    }
  ],
  "NextToken": "SpWAGVWQ",
  "RetCode": 0
}