tencent cloud

Feedback

SearchAttackLog

Last updated: 2024-11-27 09:47:41

1. API Description

Domain name for API request: waf.intl.tencentcloudapi.com.

The new version of the CLS API has parameter changes, with query changed to query_string to support Lucene syntax for API search queries.

A maximum of 10 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: SearchAttackLog.
Version Yes String Common Params. The value used for this API: 2018-01-25.
Region Yes String Common Params. For more information, please see the list of regions supported by the product. This API only supports: ap-guangzhou, ap-seoul.
Domain Yes String Queried domain: use all for all domains
StartTime Yes Timestamp Query start time
EndTime Yes Timestamp Query end time
Context Yes String API upgrade. Input an empty string for this field. Use the Page field for page turning.
QueryString Yes String Lucene syntax.
Count No Integer Number of queries: 10 by default, up to 100
Sort No String desc by default. Value can be set to desc or asc.
Page No Integer Page number, starting from 0

3. Output Parameters

Parameter Name Type Description
Count Integer Number of attack logs returned
Context String API upgrade: this field is invalid, defaults to returning an empty string
Data Array of AttackLogInfo Attack log array entry content
ListOver Boolean CLS API returned content
SqlFlag Boolean CLS API returned content, indicating whether to enable the new version index
RequestId String The unique request ID, generated by the server, will be returned for every request (if the request fails to reach the server for other reasons, the request will not obtain a RequestId). RequestId is required for locating a problem.

4. Example

Example1 Searching for Attack Log Details

This example shows you how to search for attack log details.

Input Example

https://waf.intl.tencentcloudapi.com/?Action=SearchAttackLog
&StartTime=2020-09-22 00:00:00
&EndTime=2020-09-22 00:00:00
&Domain=all
&Context=
&QueryString=method:GET
&Sort=desc
&<Common request parameters>

Output Example

{
    "Response": {
        "Count": 1,
        "Context": "cont",
        "ListOver": false,
        "SqlFlag": false,
        "Data": [
            {
                "Content": "{\"action\":1,\"args_name\":\"HTTP Header\"}",
                "FileName": "name",
                "Source": "sre",
                "TimeStamp": "2020-09-22 00:00:00"
            }
        ],
        "RequestId": "ead32d5d-a9ac-496f-b8e3-d3a92f1fb1ce"
    }
}

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
FailedOperation Operation failed.
FailedOperation.CLSDBOperationFailed Failed to call the CLS API.
FailedOperation.CLSInternalError CLS internal error.
InternalError Internal error.
InternalError.UnknownErr An internal error exists. Please contact us.
InvalidParameter.LogicErr Logical error: Logical errors in SQL search statements can also lead to mistakes, such as using incorrect operators, wrong conditions, etc.
InvalidParameter.QueryStringSyntaxErr Syntax error: Logical expression syntax analysis failed.
InvalidParameter.TypeMismatch Data type error: The data types in SQL search statements must match those in the database, otherwise it will lead to errors. For example, comparing a string with an integer, incorrect date format, etc.
UnsupportedOperation The operation is not supported.
Contact Us

Contact our sales team or business advisors to help your business.

Technical Support

Open a ticket if you're looking for further assistance. Our Ticket is 7x24 avaliable.

7x24 Phone Support