tencent cloud

Feedback

LookUpEvents

Last updated: 2023-01-04 11:44:59
This document is currently invalid. Please refer to the documentation page of the product.

1. API Description

Domain name for API request: cloudaudit.tencentcloudapi.com.

This API is used to search for operation logs to help query relevant operation information.

A maximum of 20 requests can be initiated per second for this API.

We recommend you to use API Explorer
Try it
API Explorer provides a range of capabilities, including online call, signature authentication, SDK code generation, and API quick search. It enables you to view the request, response, and auto-generated examples.

2. Input Parameters

The following request parameter list only provides API request parameters and some common parameters. For the complete common parameter list, see Common Request Parameters.

Parameter Name Required Type Description
Action Yes String Common Params. The value used for this API: LookUpEvents.
Version Yes String Common Params. The value used for this API: 2019-03-19.
Region Yes String Common Params. For more information, please see the list of regions supported by the product.
StartTime Yes Integer Start time
EndTime Yes Integer End time
LookupAttributes.N No Array of LookupAttribute Search criteria
NextToken No String Credential for viewing more logs
MaxResults No Integer Maximum number of logs to be returned
Mode No String CloudAudit mode. Valid values: standard, quick. Default value: standard

3. Output Parameters

Parameter Name Type Description
NextToken String Credential for viewing more logs
Note: This field may return null, indicating that no valid values can be obtained.
Events Array of Event Logset
Note: This field may return null, indicating that no valid values can be obtained.
ListOver Boolean Whether the logset ends
Note: This field may return null, indicating that no valid values can be obtained.
RequestId String The unique request ID, which is returned for each request. RequestId is required for locating a problem.

4. Example

Example1 Searching for log

This example shows you how to search for operation logs to help query relevant operation information.

Input Example

https://cloudaudit.tencentcloudapi.com/?Action=LookUpEvents
&EndTime=1553056687
&LookupAttributes.0.AttributeKey=AccessKeyId
&LookupAttributes.0.AttributeValue=XXXX
&StartTime=1553056487
&<Common request parameters>

Output Example

{
    "Response": {
        "Events": [
            {
                "CloudAuditEvent": "{\"actionType\":\"Read\",\"apiErrorCode\":\"\",\"apiErrorMessage\":\"\",\"apiVersion\":\"2.0\",\"errorCode\":0,\"errorMessage\":\"permission verify\",\"eventID\":\"e92a92fc259c4a9333d2a7ce64d1ef201\",\"eventName\":\"LookupEvents\",\"eventRegion\":\"ap-guangzhou\",\"eventSource\":\"cloudaudit.api.tencentyun.com/v2/index.php\",\"eventTime\":\"2019-03-20 12:36:27\",\"eventType\":\"ConsoleCall\",\"eventVersion\":2,\"httpMethod\":\"POST\",\"region\":\"\",\"requestID\":\"15936031437374_1553056587.6815_v2\",\"requestParameters\":\"{\"Action\":\"LookupEvents\",\"EndTime\":\"1553097599\",\"MaxResults\":\"10\",\"Nonce\":\"36881\",\"Region\":\"gz\",\"RequestClient\":\"SDK_NODEJS_0.2.1\",\"RequestOperator\":\"1150691759\",\"RequestSource\":\"MC\",\"SecretId\":\"XXX\",\"StartTime\":\"1552406400\",\"Timestamp\":\"1553056583\",\"Token\":\"147d2c5b0319541a13d9fe6ceb5af2aae9b67f6610001\",\"seqId\":\"cdb9c38c-7031-bb13-6a9c-cd7641734c8f\"}\",\"resourceName\":\"\",\"resourceType\":\"cloudaudit\",\"resources\":\"\",\"sourceIPAddress\":\"59.37.125.124\",\"userAgent\":\"\",\"userIdentity\":{\"userName\":\"root\",\"type\":\"Root\",\"secretId\":\"XXX\",\"accountId\":1150691759,\"principalId\":1150691759,\"sessionContext\":{\"expireTime\":\"2019-03-20 13:04:46\",\"hasPolicyFilter\":0,\"extraInfo\":\"\",\"interfaceName\":\"\",\"ownerUin\":1150691759,\"ua\":\"27513f02ea3ab649f0cacb6476df54eb\",\"mfa\":0,\"userIp\":\"59.37.125.124\",\"mfaExpireTime\":\"2019-03-20 12:34:46\",\"uin\":1150691759,\"token\":\"147d2c5b0319541a13d9fe6ceb5af2aae9b67f6610001\",\"appId\":1251840716,\"policyFilter\":\"\"}}}",
                "EventId": "e92a92fc259c4a9333d2a7ce64d1ef201",
                "EventName": "LookupEvents",
                "EventTime": "2019-03-20 12:36:27",
                "SecretId": "XXX",
                "ErrorCode": 0,
                "RequestID": "15936031437374_1553056587.6815_v2",
                "AccountID": 1150691759,
                "SourceIPAddress": "59.37.125.124",
                "EventSource": "cloudaudit.api.tencentyun.com/v2/index.php",
                "EventRegion": "ap-guangzhou",
                "Resources": {
                    "ResourceName": "",
                    "ResourceType": "cloudaudit"
                },
                "Username": "root",
                "ResourceTypeCn": "CloudAudit",
                "EventNameCn": "Search for logs"
            }
        ],
        "NextToken": "DnF1ZXJ5VGhlbkZldGNoDwAAAAAAACBuFjNoRHJ5YTd4U1B5YWY4c1ZmMmxBQWcAAAAAAAAgnBZZZkZoYy04LVJJeVpJNnZJS2hIVTdRAAAAAAAAI1QWYk5mQmZXTzhTWXFNZjFMVlhHY1RjdwAAAAAAAB9sFmhZbV8xbm1FUXE2NGVDQndWSlNoMncAAAAAAAAd9BZOelN1aGMycFNydUVEQ0dQbzdCcEZBAAAAAAAALroWMTh4c00xalhRbk9wR0NsYWZvV20tQQAAAAAAACCdFllmRmhjLTgtUkl5Wkk2dklLaEhVN1EAAAAAAAAuuRYxOHhzTTFqWFFuT3BHQ2xhZm9XbS1BAAAAAAAAIJ4WWWZGaGMtOC1SSXlaSTZ2SUtoSFU3UQAAAAAAAB81FnN5aTBfTWJKU25HdXZuMWxsRkdJZ3cAAAAAAAApMhZ1UjdybjlCY1NRYUZVYWRub2x4YW9RAAAAAAAAHzQWc3lpMF9NYkpTbkd1dm4xbGxGR0lndwAAAAAAAB31Fk56U3VoYzJwU3J1RURDR1BvN0JwRkEAAAAAAAAfbRZoWW1fMW5tRVFxNjRlQ0J3VkpTaDJ3AAAAAAAAH24WaFltXzFubUVRcTY0ZUNCd1ZKU2gydw==",
        "ListOver": true,
        "RequestId": "91e2998d-edc0-4ba0-a76d-cebbbfd99391"
    }
}

5. Developer Resources

SDK

TencentCloud API 3.0 integrates SDKs that support various programming languages to make it easier for you to call APIs.

Command Line Interface

6. Error Code

The following only lists the error codes related to the API business logic. For other error codes, see Common Error Codes.

Error Code Description
InternalError.SearchError An internal error occurred. Submit a ticket for assistance.
InvalidParameter.Time The parameter must contain the start time and end time and must be an integer timestamp (accurate down to the second).
InvalidParameterValue.MaxResult The maximum number of entries returned in one search is 50.
InvalidParameterValue.Time The start time cannot be after the end time.
InvalidParameterValue.attributeKey Valid values of AttributeKey: RequestId, EventName, ReadOnly, Username, ResourceType, ResourceName, AccessKeyId
LimitExceeded.OverTime Only entries for the last 7 days can be searched for.