tencent cloud

文档反馈

DescribeSingleL7AnalysisData

最后更新时间:2023-05-25 17:35:58
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 statistical calculation result of an L7 traffic metric. In common cases, only one value is returned for the query of statistical calculation results.

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: DescribeSingleL7AnalysisData.
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 The query metric. Values:
  • l7Flow_singleIpRequest: Number of requests from a single IP.
  • ZoneIds.N No Array of String List of sites
    If it’s not specified, all sites are selected by default, and the query period must be within the last 30 days.
    Enter the IDs of sites to query. The maximum query period is determined by the max data query period of the bound plan.
    Filters.N No Array of QueryCondition Filters
  • country:
    Filter by the specified country code. ISO 3166 country codes are used.
  • domain:
    u2003u2003 Filter by the specified sub-domain name, such as test.example.com
  • protocol:
    Filter by the specified HTTP protocol version
    Values:
    u2003u2003 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:
    u2003u2003 Filter by the specified HTTP protocol type
    u2003u2003 Values:
    u2003u2003 HTTP: HTTP protocol;
    u2003u2003 HTTPS: HTTPS protocol;
    u2003u2003 QUIC: QUIC protocol.
  • tagKey:
    u2003u2003 Filter by the specified tag key
  • tagValue:
    u2003u2003 Filter by the specified tag value
  • 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.
    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 SingleDataRecord The list of L7 dimensional data.
    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 Querying the statistical calculation result of L7 traffic

    Input Example

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

    Output Example

    {
        "Response": {
            "RequestId": "4f9b86cc-d62b-4a69-a640-52f6f3cb628e",
            "Data": [
                {
                    "TypeKey": "251227260",
                    "TypeValue": [
                        {
                            "DetailData": 65,
                            "MetricName": "l7Flow_singleIpRequest"
                        }
                    ]
                }
            ],
            "TotalCount": 1
        }
    }
    

    Example2 Querying the statistical calculation result by the specified HTTP protocol

    Input Example

    POST / HTTP/1.1
    Host: teo.tencentcloudapi.com
    Content-Type: application/json
    X-TC-Action: DescribeSingleL7AnalysisData
    <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_singleIpRequest"
        ],
        "Filters": [
            {
                "Key": "protocol",
                "Operator": "equals",
                "Value": [
                    "HTTP/1.0",
                    "HTTP/1.1",
                    "HTTP/2.0",
                    "HTTP/3"
                ]
            }
        ]
    }
    

    Output Example

    {
        "Response": {
            "RequestId": "7672fcf7-2e69-478d-85a4-6b980ce5882f",
            "Data": [
                {
                    "TypeKey": "1310708577",
                    "TypeValue": [
                        {
                            "DetailData": 77,
                            "MetricName": "l7Flow_singleIpRequest"
                        }
                    ]
                }
            ],
            "TotalCount": 1
        }
    }
    

    Example3 Querying the statistical calculation result by the specified tag

    Input Example

    POST / HTTP/1.1
    Host: teo.tencentcloudapi.com
    Content-Type: application/json
    X-TC-Action: DescribeSingleL7AnalysisData
    <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_singleIpRequest"
        ],
        "Filters": [
            {
                "Key": "tagKey",
                "Operator": "equals",
                "Value": [
                    "test"
                ]
            },
            {
                "Key": "tagValue",
                "Operator": "equals",
                "Value": [
                    "a.com",
                    "b.com"
                ]
            }
        ]
    }
    

    Output Example

    {
        "Response": {
            "RequestId": "962792de-3bfe-483d-99a7-3cfde0467495",
            "Data": [
                {
                    "TypeKey": "1310708577",
                    "TypeValue": [
                        {
                            "DetailData": 20,
                            "MetricName": "l7Flow_singleIpRequest"
                        }
                    ]
                }
            ],
            "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.
    ResourceNotFound The resource doesn’t exist.
    ResourceUnavailable The resource is unavailable.
    UnauthorizedOperation.CamUnauthorized CAM is not authorized.