tencent cloud

Feedback

GetAttackHistogram

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

1. API Description

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

This API is used to generate a bar chart for the generation time of attack logs.

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: GetAttackHistogram.
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
QueryString Yes String Lucene syntax.

3. Output Parameters

Parameter Name Type Description
Data Array of LogHistogramInfo Statistics details
Period Integer Time period size
TotalCount Integer Number of entries counted
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 Attack Log Statistical Details

Input Example

POST / HTTP/1.1
Host: waf.intl.tencentcloudapi.com
Content-Type: application/json
X-TC-Action: GetAttackHistogram
<Common request parameters>



{
    "Domain": "abc",
    "StartTime": "2020-09-22 00:00:00",
    "EndTime": "2020-09-22 00:00:00",
    "QueryString": "abc"
}

Output Example

{
    "Response": {
        "RequestId": "977c060f-4db5-4a48-95a1-bc4c7b141276",
        "Data": [
            {
                "Count": 0,
                "TimeStamp": 1598544000
            },
            {
                "Count": 0,
                "TimeStamp": 1598545800
            },
            {
                "Count": 0,
                "TimeStamp": 1598547600
            },
            {
                "Count": 0,
                "TimeStamp": 1598549400
            },
            {
                "Count": 0,
                "TimeStamp": 1598551200
            },
            {
                "Count": 0,
                "TimeStamp": 1598553000
            },
            {
                "Count": 0,
                "TimeStamp": 1598554800
            },
            {
                "Count": 0,
                "TimeStamp": 1598556600
            },
            {
                "Count": 0,
                "TimeStamp": 1598558400
            },
            {
                "Count": 0,
                "TimeStamp": 1598560200
            },
            {
                "Count": 0,
                "TimeStamp": 1598562000
            },
            {
                "Count": 0,
                "TimeStamp": 1598563800
            },
            {
                "Count": 0,
                "TimeStamp": 1598565600
            },
            {
                "Count": 0,
                "TimeStamp": 1598567400
            },
            {
                "Count": 0,
                "TimeStamp": 1598569200
            },
            {
                "Count": 0,
                "TimeStamp": 1598571000
            },
            {
                "Count": 0,
                "TimeStamp": 1598572800
            },
            {
                "Count": 0,
                "TimeStamp": 1598574600
            },
            {
                "Count": 0,
                "TimeStamp": 1598576400
            },
            {
                "Count": 0,
                "TimeStamp": 1598578200
            },
            {
                "Count": 0,
                "TimeStamp": 1598580000
            },
            {
                "Count": 0,
                "TimeStamp": 1598581800
            },
            {
                "Count": 17,
                "TimeStamp": 1598583600
            },
            {
                "Count": 0,
                "TimeStamp": 1598585400
            },
            {
                "Count": 0,
                "TimeStamp": 1598587200
            },
            {
                "Count": 0,
                "TimeStamp": 1598589000
            },
            {
                "Count": 0,
                "TimeStamp": 1598590800
            },
            {
                "Count": 0,
                "TimeStamp": 1598592600
            },
            {
                "Count": 0,
                "TimeStamp": 1598594400
            }
        ],
        "Period": 1800,
        "TotalCount": 17
    }
}

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.SQLSyntaxErr Syntax error: SQL search statements must follow specific syntax rules. Failure to do so, such as missing keywords, spelling errors, missing semicolons, etc., will cause SQL statements to not execute.
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.
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