tencent cloud

文档反馈

DescribeTimingL7AnalysisData

最后更新时间:2024-04-09 10:26:06

    1. API Description

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

    This API is used to query the L7 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: DescribeTimingL7AnalysisData.
    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 Indicator list. Values:
  • l7Flow_outFlux: Edgeone response traffic;
  • l7Flow_inFlux: Edgeone request traffic;
  • l7Flow_outBandwidth: Edgeone response bandwidth;
  • l7Flow_inBandwidth: Edgeone request bandwidth;
  • l7Flow_request: Number of access requests;
  • l7Flow_flux: Uplink + downlink traffic of access requests;< li>
  • l7Flow_bandwidth: Uplink + downlink bandwidth of access requests.
  • ZoneIds.N No Array of String ZoneId set. This parameter is required.
    Interval No String The query granularity. Values:
  • min: 1 minute;
  • 5min: 5 minutes;
  • hour: 1 hour;
  • day: 1 day.
  • If this field is not specified, the granularity will be determined based on the query period.
    Period ≤ 1 hour: min;
    1 hour < Period ≤ 2 days: 5min;
    2 days < period ≤ 7 days: hour;
    Period > 7 days: day.
    Filters.N No Array of QueryCondition Filters
  • country
    Filter by the Country/Region. The country/region follows ISO 3166 specification.
  • province
    Filter by the specified province name. It’s only available when Area is mainland.
  • isp
    : Filter by the specified ISP. It’s only available when Area is mainland.
    Values:
    2: CTCC;
    26: CUCC;
    1046: CMCC;
    3947: CTT;
    38: CERNET;
    43: GWBN;
    0: Others.
  • domain
    : Filter by the specified sub-domain name, such as test.example.com
  • url:
    Filter by the specified URL path (such as /content or content/test.jpg).
    If this parameter is specified, the max query period is the last 30 days.
    The max data query scope stated in the service package specifications of the site (if ZoneIds specified) becomes invalid.
  • referer:
    Filter by the specified Referer header, such as example.com.
    If this parameter is specified, the max query period is the last 30 days.
    Themax data query scope stated in the service package specifications of the site (if ZoneIds specified) becomes invalid.
  • resourceType:
    Filter by the specified resource file type, such as jpg, css.
    Note that if this parameter is specified, the max data query period is the last 30 days.
    The data query scope stated in the specifications of service package related with the ZoneIds becomes invalid.
  • protocol:
    Filter by the specified HTTP protocol version
    Values:
    HTTP/1.0: HTTP 1.0;
    HTTP/1.1: HTTP 1.1;
    HTTP/2.0: HTTP 2.0;
    HTTP/3.0: HTTP 3.0;
    WebSocket: WebSocket.
  • socket:
    Filter by the specified HTTP protocol type
    Values:
    HTTP: HTTP protocol;
    HTTPS: HTTPS protocol;
    QUIC: QUIC protocol.
  • statusCode
    Filter by [strong> Status Code/strong>]. lt;br> If you only fill in statusCode parameter, you can query data of nearly 30 days at most;
    If statusCode+Zonelds parameter is filled in at the same time, the supported query data range is the smaller of a href="https://www.tencentcloud.com/document/product/1552/77380?from_cn_redirect=1#edgeone-.E5.A5.97.E9.A4.90"> Maximum query range of data analysis/a> and 30 days supported by package. lt;br> The corresponding Value options are as follows:
    1XX: Status code of type 1xx;
    100:100 status code;
    101:101 status code;
    102:102 status code;
    2XX: Status code of type 2xx;
    200:200 status code;
    201:201 status code;
    202:202 status code;
    203:203 status code;
    204:204 status code;
    205:205 status code;
    206:206 status code;
    207:207 status code;
    3XX: Status code of type 3xx;
    300:300 status code;
    301:301 status code;
    302:302 status code;
    303:303 status code;
    304:304 status code;
    305:305 status code;
    307:307 status code;
    4XX: Status code of type 4xx;
    400:400 status code;
    401:401 status code;
    402:402 status code;
    403:403 status code;
    404:404 status code;
    405:405 status code;
    406:406 status code;
    407:407 status code;
    408:408 status code;
    409:409 status code;
    410:410 status code;
    411:411 status code;
    412:412 status code;
    412:413 Status Code;
    414:414 status code;
    415:415 status code;
    416:416 status code;
    417:417 status code;
    422:422 status code;
    423:423 status code;
    424:424 status code;
    426:426 status code;
    451:451 status code;
    5XX: Status code of type 5xx;
    500:500 status code;
    501:501 status code;
    502:502 status code;
    503:503 status code;
    504:504 status code;
    505:505 status code;
    506:506 status code;
    507:507 status code;
    510:510 status code;
    514:514 status code;
    544:544 Status Code.& lt
  • browserType:
    Filter by the specified browser type.
    If this parameter is specified, the max query period is the last 30 days.
    The max data query scope stated in the service package specifications of the site (if ZoneIds specified) becomes invalid.

  • Values:
    Firefox: Firefox browser;
    Chrome: Chrome browser;
    Safari: Safari browser;
    MicrosoftEdge: Microsoft Edge browser;
    IE: IE browser;
    Opera: Opera browser;
    QQBrowser: QQ browser;
    LBBrowser: LB browser;
    MaxthonBrowser: Maxthon browser;
    SouGouBrowser: Sogou browser;
    BIDUBrowser: Baidu browser;
    TaoBrowser: Tao browser;
    UBrowser: UC browser;
    Other: Other browsers;
    Empty: The browser type is not specified;
    Bot: Web crawler.
  • deviceType:
    Filter by the device type.
    If this parameter is specified, the max query period is the last 30 days.
    The max data query scope stated in the service package specifications of the site (if ZoneIds specified) becomes invalid.
    Values:
    TV: TV;
    Tablet: Tablet;
    Mobile: Mobile phone;
    Desktop: Desktop device;
    Other: Other device;
    Empty: Device type not specified.
  • operatingSystemType:
    Filter by the operating system.
    If this parameter is specified, the max query period is the last 30 days.
    The max data query scope stated in the service package specifications of the site (if ZoneIds specified) becomes invalid.
    Values:
    Linux: Linux OS;
    MacOS: Mac OS;
    Android: Android OS;
    IOS: iOS OS;
    Windows: Windows OS;
    NetBSD: NetBSD OS;
    ChromiumOS: Chromium OS;
    Bot: Web crawler:
    Other: Other OS;
    Empty: The OS is not specified.
  • tlsVersion:
    Filter by the TLS version.
    If this parameter is specified, the max query period is the last 30 days.
    The max data query scope stated in the service package specifications of the site (if ZoneIds specified) becomes invalid.
    Values:
    TLS1.0: TLS 1.0;
    TLS1.1: TLS 1.1;
    TLS1.2: TLS 1.2;
    TLS1.3: TLS 1.3.
  • ipVersion
    Filter by the specified IP version.
    Values:
    4: IPv4;
    6: IPv6.
  • tagKey
    Filter by the Tag Key.
  • tagValue
    Filter by the Tag Value.
  • Area No String Geolocation scope. Values:
  • overseas: Regions outside the Chinese mainland
  • mainland: Chinese mainland
  • global: Global
  • If this field is not specified, the default value global is used.

    3. Output Parameters

    Parameter Name Type Description
    TotalCount Integer Total number of query results.
    Data Array of TimingDataRecord The list of L7 traffic data recorded over time.
    Note: This field may return null, indicating that no valid values can be obtained.
    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 Querying Time Sequence Traffic Data Based on the Protocol

    Obtain the indicator for the number of requests based on the protocol filtering conditions.

    Input Example

    POST / HTTP/1.1
    Host: teo.tencentcloudapi.com
    Content-Type: application/json
    X-TC-Action: DescribeTimingL7AnalysisData
    <Common request parameters>
    
    {
        "EndTime": "2022-08-29T19:17:59+08:00",
        "Interval": "day",
        "Area": "mainland",
        "StartTime": "2022-07-31T00:00:00+08:00",
        "MetricNames": [
            "l7Flow_request"
        ],
        "Filters": [
            {
                "Key": "protocol",
                "Operator": "equals",
                "Value": [
                    "HTTP/1.0",
                    "HTTP/1.1"
                ]
            }
        ],
        "ZoneIds": [
            "zone-2o7b38ba1hvr"
        ]
    }
    

    Output Example

    {
        "Response": {
            "RequestId": "141a7ccd-9713-43a2-91d5-1b47692d0609",
            "Data": [
                {
                    "TypeKey": "251227260",
                    "TypeValue": [
                        {
                            "Avg": 803,
                            "Detail": [
                                {
                                    "Timestamp": 1659139200,
                                    "Value": 0
                                },
                                {
                                    "Timestamp": 1661731200,
                                    "Value": 0
                                }
                            ],
                            "Max": 7921,
                            "MetricName": "l7Flow_request",
                            "Sum": 24918
                        }
                    ]
                }
            ],
            "TotalCount": 1
        }
    }
    

    Example2 Querying Time Sequence Traffic Data based on the Tag

    Obtain the indicator for the number of requests based on the filtering conditions of tags.

    Input Example

    POST / HTTP/1.1
    Host: teo.tencentcloudapi.com
    Content-Type: application/json
    X-TC-Action: DescribeTimingL7AnalysisData
    <Common request parameters>
    
    {
        "EndTime": "2022-08-29T19:17:59+08:00",
        "Interval": "day",
        "Area": "mainland",
        "StartTime": "2022-07-31T00:00:00+08:00",
        "MetricNames": [
            "l7Flow_request"
        ],
        "Filters": [
            {
                "Key": "tagKey",
                "Operator": "equals",
                "Value": [
                    "test1"
                ]
            },
            {
                "Key": "tagValue",
                "Operator": "equals",
                "Value": [
                    "a.com",
                    "b.com"
                ]
            }
        ],
        "ZoneIds": [
            "zone-2o7b38ba1hvr"
        ]
    }
    

    Output Example

    {
        "Response": {
            "RequestId": "141a7ccd-9713-43a2-91d5-1b47692d0609",
            "Data": [
                {
                    "TypeKey": "251227260",
                    "TypeValue": [
                        {
                            "Avg": 803,
                            "Detail": [
                                {
                                    "Timestamp": 1659139200,
                                    "Value": 0
                                },
                                {
                                    "Timestamp": 1661731200,
                                    "Value": 0
                                }
                            ],
                            "Max": 7921,
                            "MetricName": "l7Flow_request",
                            "Sum": 24918
                        }
                    ]
                }
            ],
            "TotalCount": 1
        }
    }
    

    Example3 Querying L7 Data Analysis Time Sequence Traffic Data

    Query the data of the indicator for the number of L7 traffic requests.

    Input Example

    POST / HTTP/1.1
    Host: teo.tencentcloudapi.com
    Content-Type: application/json
    X-TC-Action: DescribeTimingL7AnalysisData
    <Common request parameters>
    
    {
        "EndTime": "2022-08-29T19:17:59+08:00",
        "Interval": "day",
        "Area": "mainland",
        "StartTime": "2022-07-31T00:00:00+08:00",
        "MetricNames": [
            "l7Flow_request"
        ],
        "ZoneIds": [
            "zone-2o7b38ba1hvr"
        ]
    }
    

    Output Example

    {
        "Response": {
            "RequestId": "141a7ccd-9713-43a2-91d5-1b47692d0609",
            "Data": [
                {
                    "TypeKey": "251227260",
                    "TypeValue": [
                        {
                            "Avg": 803,
                            "Detail": [
                                {
                                    "Timestamp": 1659139200,
                                    "Value": 0
                                },
                                {
                                    "Timestamp": 1661731200,
                                    "Value": 0
                                }
                            ],
                            "Max": 7921,
                            "MetricName": "l7Flow_request",
                            "Sum": 24918
                        }
                    ]
                }
            ],
            "TotalCount": 1
        }
    }
    

    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.
    InternalError.ProxyServer An unknown error occurred in the backend server.
    InvalidParameter Parameter error.
    InvalidParameterValue Invalid parameter value.
    LimitExceeded The quota limit has been reached.
    LimitExceeded.QueryTimeLimitExceeded Query time limit exceeded.
    OperationDenied Operation denied.
    ResourceNotFound The resource doesn’t exist.
    ResourceUnavailable The resource is unavailable.
    UnauthorizedOperation.CamUnauthorized CAM is not authorized.