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 Name | Type | Description Information | Required |
---|---|---|---|
Action | string | Corresponding API command name, the current API is GetUserOperationEvents . | Yes |
PublicKey | string | The user's public key can be obtained from Console (opens in a new tab) | Yes |
Signature | string | User signature generated based on public key and API command, see Signature Algorithm | Yes |
Request Parameters
Parameter Name | Type | Description Information | Required |
---|---|---|---|
ProjectId | string | Project ID. If not filled in, the default project is used, sub-accounts must be filled in. Please refer to the GetProjectList interface. | No |
BeginTime | int | Start Time (UNIX Timestamp) | No |
EndTime | int | End Time (UNIX Timestamp) | No |
MaxResults | int | Maximum number of records per query | No |
NextToken | string | Used to request the next page of query results. The request parameters must be consistent with the previous request. | No |
ResourceID | string | Resource ID, used to search for operation logs associated with a certain resource | No |
Response Field
Field Name | Type | Description Information | Required |
---|---|---|---|
RetCode | int | Return status code. If it is 0, it means successful return. If it is not 0, it means failure. | Yes |
Action | string | Operation command name. | Yes |
Message | string | Returns an error message, providing detailed description when RetCode is non-zero. | No |
NextToken | string | Used to request the next page of query results. The request parameters must be consistent with the previous request. | No |
Events | array[UserOperationEvent] | Operation Event List | No |
Data Model
UserOperationEvent
Field Name | Type | Description Information | Required |
---|---|---|---|
Region | string | Region | No |
Api | string | Operated API | No |
IsSuccess | boolean | Is it successful? | No |
OperateTime | int | Operation Time | No |
UserName | string | Username | No |
UserEmail | string | User Email | No |
RelatedResource | array[RelatedResource] | Resource associated with the operation event | No |
RelatedResource
Field Name | Type | Description Information | Required |
---|---|---|---|
ResourceId | string | Resource ID | No |
ResourceName | string | Resource Name | No |
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
}