tencent cloud

APIs

DescribeTimingL4Data

다운로드
포커스 모드
폰트 크기
마지막 업데이트 시간: 2026-11-25 16:59:51

1. API Description

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

This API is used to query the L4 time series Data list.

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: DescribeTimingL4Data.
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 Start time.
EndTime Yes Timestamp ISO8601 End time. The query time range (EndTime - StartTime) must be up to 31 days.
MetricNames.N Yes Array of String Queried metric. Valid values:
  • l4Flow_flux: Total access traffic, unit: Byte, metric value type: Integer;
  • l4Flow_inFlux: Access inbound traffic, unit: Byte, metric value type: Integer;
  • l4Flow_outFlux: Access outbound traffic, unit: Byte, metric value type: Integer;
  • l4Flow_inBandwidth: Inbound bandwidth peak for access, unit: bps, metric value type: Integer;
  • l4Flow_outBandwidth: Outbound access bandwidth peak, unit: bps, metric value type: Integer;
  • l4Flow_connections: Number of concurrent connections, unit: count, metric value type: Integer;
  • l4Flow_newConnectionsRate: Rate of new connections, unit: connections/second, metric value type: Float, rounded to two decimal places.
Note:
  • Metrics of the Integer value type will return corresponding time series data from Data.N.TypeValue;
  • Metrics of the Float value type return corresponding time series data from Data.N.FloatTypeValue.
ZoneIds.N Yes Array of String Site ID. This parameter will change from selectable to required after May 30, 2024. For details, see the announcement: Tencent Cloud EdgeOne Cloud API Change Notification.
Import up to 100 site IDs. To query data of all sites under the Tencent Cloud root account, use * instead. To query account-level data, you must have permissions for all site resources of this interface.
ProxyIds.N No Array of String Layer-4 instance list. If not specified, it means select all instances.
Interval No String Time granularity of the query. Valid values:
  • min: 1 minute;
  • 5min: 5 minutes;
  • hour: 1 hour;
  • day: 1 day.
If this parameter is not input, the granularity will be automatically calculated based on the interval between the start time and end time. Specifically, data will be queried with a granularity of min, 5min, hour, and day respectively when the period is no more than 1 hour, no more than 2 days, no more than 7 days, and over 7 days.
Filters.N No Array of QueryCondition Filter criteria. The detailed Key values of filter criteria are as follows:
  • ruleId: Filter by forwarding rule ID.
  • proxyId: filter by L4 proxy instance ID.

3. Output Parameters

Parameter Name Type Description
TotalCount Integer Total number of entries in the query result.
Data Array of TimingDataRecord

List of L4 time series traffic data.
For different queried metrics, time series data is returned from different parameters based on the metric value type.
The existing value types are as follows:

  • Integer: Metrics of the Integer value type return corresponding time series data from Data.N.TypeValue.
    The corresponding queried metrics MetricName are:
    • l4Flow_flux: total access traffic;
    • l4Flow_inFlux: access inbound traffic;
    • l4Flow_outFlux: access outbound traffic;
    • l4Flow_inBandwidth: inbound bandwidth peak;
    • l4Flow_outBandwidth: outbound bandwidth peak;
    • l4Flow_connections: number of concurrent connections.
  • Float: Metrics of the Float value type return corresponding time series data from Data.N.FloatTypeValue.
    The corresponding queried metric MetricName is:
    • l4Flow_newConnectionsRate: rate of new connections.

This interface does not support dimension query. By default, data is aggregated by root account and returned, that is, Data.N.TypeKey = AppId. AppId is the unique identifier of the Tencent Cloud root account, and N is always equal to 1.

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 L4 time series concurrent connection metrics time series data

Query the time series data of the number of concurrent connections for all layer-4 instances under the selected site with ZoneId = zone-28kw53cmc6ky from 2025-10-01T08:00:00+08:00 to 2025-10-01T10:00:00+08:00.

Input Example

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

{
    "ZoneIds": [
        "zone-28kw53cmc6ky"
    ],
    "StartTime": "2025-10-01T08:00:00+08:00",
    "EndTime": "2025-10-01T10:00:00+08:00",
    "Interval": "hour",
    "MetricNames": [
        "l4Flow_connections"
    ]
}

Output Example

{
    "Response": {
        "RequestId": "e12e0659-ae34-4140-9878-4a61db0c3639",
        "Data": [
            {
                "TypeKey": "251227260",
                "TypeValue": [
                    {
                        "Avg": 16,
                        "Detail": [
                            {
                                "Timestamp": 1759276800,
                                "Value": 15
                            },
                            {
                                "Timestamp": 1759280400,
                                "Value": 17
                            },
                            {
                                "Timestamp": 1759284000,
                                "Value": 0
                            }
                        ],
                        "Max": 17,
                        "MetricName": "l4Flow_connections",
                        "Sum": 32
                    }
                ]
            }
        ],
        "TotalCount": 1
    }
}

Example2 Query total access traffic time series data by layer-4 proxy rule ID

Query the total access traffic time series data of the L4 instance forwarding rule with RuleId = rule-033950bf-6fc4-11ed-8ab2-525400a22580 under the site with ZoneId = zone-28kw53cmc6ky during the period from 2025-10-01T08:00:00+08:00 to 2025-10-01T10:00:00+08:00.

Input Example

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

{
    "ZoneIds": [
        "zone-28kw53cmc6ky"
    ],
    "StartTime": "2025-10-01T08:00:00+08:00",
    "EndTime": "2025-10-01T10:00:00+08:00",
    "Interval": "hour",
    "MetricNames": [
        "l4Flow_flux"
    ],
    "Filters": [
        {
            "Key": "ruleId",
            "Operator": "equals",
            "Value": [
                "rule-033950bf-6fc4-11ed-8ab2-525400a22580"
            ]
        }
    ]
}

Output Example

{
    "Response": {
        "RequestId": "962792de-3bfe-483d-99a7-3cfde0467495",
        "Data": [
            {
                "TypeKey": "251227260",
                "TypeValue": [
                    {
                        "Avg": 5640,
                        "Detail": [
                            {
                                "Timestamp": 1671669600,
                                "Value": 3900
                            },
                            {
                                "Timestamp": 1671669900,
                                "Value": 7400
                            },
                            {
                                "Timestamp": 1671670800,
                                "Value": 5620
                            }
                        ],
                        "Max": 7400,
                        "MetricName": "l4Flow_flux",
                        "Sum": 16920
                    }
                ]
            }
        ],
        "TotalCount": 1
    }
}

Example3 Querying time series data of the new connection rate based on the Layer 4 instance ID

Query the time series data of the number of new connections rate for the layer-4 instance with ProxyId = sid-3kr5me8zidha under the site with ZoneId = zone-28kw53cmc6ky from 2025-10-01T08:00:00+08:00 to 2025-10-01T10:00:00+08:00.
Note: Since the value type of l4Flow_newConnectionsRate in the queried metric MetricNames is Float, the time series data for the l4Flow_newConnectionsRate metric is returned from Data.N.FloatTypeValue.

Input Example

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

{
    "ZoneIds": [
        "zone-28kw53cmc6ky"
    ],
    "StartTime": "2025-10-01T08:00:00+08:00",
    "EndTime": "2025-10-01T10:00:00+08:00",
    "Interval": "hour",
    "MetricNames": [
        "l4Flow_newConnectionsRate"
    ],
    "Filters": [
        {
            "Key": "proxyId",
            "Operator": "equals",
            "Value": [
                "sid-3kr5me8zidha"
            ]
        }
    ]
}

Output Example

{
    "Response": {
        "RequestId": "962792de-3bfe-483d-99a7-3cfde0467495",
        "Data": [
            {
                "TypeKey": "251227260",
                "TypeValue": [],
                "FloatTypeValue": [
                    {
                        "Avg": 1.56,
                        "Detail": [
                            {
                                "Timestamp": 1671669600,
                                "Value": 1.08
                            },
                            {
                                "Timestamp": 1671669900,
                                "Value": 2.05
                            },
                            {
                                "Timestamp": 1671670800,
                                "Value": 1.56
                            }
                        ],
                        "Max": 2.05,
                        "MetricName": "l4Flow_newConnectionsRate",
                        "Sum": 4.69
                    }
                ]
            }
        ],
        "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 Unknown error occurs on the real server.
InternalError.RouteError Backend service routing address error.
LimitExceeded The quota limit is exceeded.
ResourceNotFound The resource does not exist.
ResourceUnavailable Resources are unavailable.
UnauthorizedOperation.CamUnauthorized Unauthorized Cam operation.

도움말 및 지원

문제 해결에 도움이 되었나요?

피드백