tencent cloud

文档反馈

DescribeWebManagedRulesData

最后更新时间:2023-05-25 17:35:56
This document is currently invalid. Please refer to the documentation page of the product.

1. API Description

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

This API is used to query the WAF attack data recorded over time.

A maximum of 100 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: DescribeWebManagedRulesData.
Version Yes String Common Params. The value used for this API: 2022-09-01.
Region No String Common Params. This parameter is not required.
StartTime Yes Timestamp ISO8601 The start time.
EndTime Yes Timestamp ISO8601 The end time.
MetricNames.N Yes Array of String List of statistical metric. Values:
  • waf_interceptNum: Requests blocked by WAF.
  • ZoneIds.N No Array of String List of sites to be queried. All sites will be selected if this field is not specified.
    Domains.N No Array of String List of subdomain names to be queried. All subdomain names will be selected if this field is not specified.
    QueryCondition.N No Array of QueryCondition The key of the parameter QueryCondition, which is used to specify a filter. Values:
  • action: The action;
  • Interval No String The query time granularity. Values:
  • min: 1 minute;
  • 5min: 5 minute;
  • hour: 1 hour;
  • day: 1 day.
  • If this field is not specified, the granularity will be determined based on the interval between the start time and end time as follows: 1-minute granularity applies for a 1-hour interval, 5-minute granularity for a 2-day interval, 1-hour granularity for a 7-day interval, and 1-day granularity for an interval of over 7 days.
    Area No String Data storage region. Values:
  • overseas: Global (outside the Chinese mainland);
  • mainland: Chinese mainland.
  • If this field is not specified, the data storage region will be determined based on the user’s location.

    3. Output Parameters

    Parameter Name Type Description
    Data Array of SecEntry The list of WAF attack data recorded over time.
    Note: This field may return null, indicating that no valid values can be obtained.
    TotalCount Integer Total number of query results.
    RequestId String The unique request ID, which is returned for each request. RequestId is required for locating a problem.

    4. Example

    Example1 Querying the WAF attack data recorded over time

    Input Example

    POST / HTTP/1.1
    Host: teo.tencentcloudapi.com
    Content-Type: application/json
    X-TC-Action: DescribeWebManagedRulesData
    <Common request parameters>
    
    {
        "MetricNames": [
            "waf_interceptNum"
        ],
        "Interval": "min",
        "ZoneIds": [
            "zone-21xfqlh4qjee"
        ],
        "StartTime": "2020-09-22T00:00:00+00:00",
        "Domains": [
            "www.baidu.com"
        ],
        "EndTime": "2020-09-22T00:00:00+00:00",
        "Area": "overseas"
    }
    

    Output Example

    {
        "Response": {
            "TotalCount": 10,
            "Data": [
                {
                    "Value": [
                        {
                            "Max": 10,
                            "Metric": "xx",
                            "Avg": 10.0,
                            "Detail": [
                                {
                                    "Timestamp": 1657411200,
                                    "Value": 10
                                }
                            ],
                            "Sum": 10.0
                        }
                    ],
                    "Key": "www.baidu.com"
                }
            ],
            "RequestId": "23dd59e1-0d8a-4fa2-a9f9-9f20195523c6"
        }
    }
    

    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.
    LimitExceeded The quota limit has been reached.
    ResourceNotFound The resource doesn’t exist.