API
  • History
  • Introduction
  • API Category
  • Making API Requests
    • Request Structure
    • Common Params
    • Signature v3
    • Signature
    • Responses
  • Site APIs
    • CreateZone
    • DescribeIdentifications
    • ModifyZone
    • DeleteZone
    • ModifyZoneStatus
    • CheckCnameStatus
    • IdentifyZone
    • DescribeZones
    • VerifyOwnership
    • ExportZoneConfig
    • ImportZoneConfig
    • DescribeZoneConfigImportResult
  • Acceleration Domain Management APIs
    • CreateAccelerationDomain
    • DescribeAccelerationDomains
    • ModifyAccelerationDomain
    • ModifyAccelerationDomainStatuses
    • DeleteAccelerationDomains
    • CreateSharedCNAME
    • BindSharedCNAME
    • DeleteSharedCNAME
  • Site Acceleration Configuration APIs
    • CreateRule
    • DeleteRules
    • DescribeHostsSetting
    • DescribeRules
    • DescribeRulesSetting
    • DescribeZoneSetting
    • ModifyRule
    • ModifyZoneSetting
  • Edge Function APIs
    • CreateFunction
    • DescribeFunctions
    • ModifyFunction
    • CreateFunctionRule
    • DeleteFunction
    • DescribeFunctionRules
    • ModifyFunctionRule
    • ModifyFunctionRulePriority
    • DeleteFunctionRules
    • DescribeFunctionRuntimeEnvironment
    • HandleFunctionRuntimeEnvironment
  • Alias Domain APIs
    • CreateAliasDomain
    • DescribeAliasDomains
    • ModifyAliasDomain
    • ModifyAliasDomainStatus
    • DeleteAliasDomain
  • Security Configuration APIs
    • CreateSecurityIPGroup
    • DescribeSecurityIPGroup
    • ModifySecurityIPGroup
    • DeleteSecurityIPGroup
    • DescribeOriginProtection
    • DescribeSecurityTemplateBindings
    • ModifySecurityPolicy
    • BindSecurityTemplateToEntity
    • DescribeSecurityIPGroupInfo
  • Layer 4 Application Proxy APIs
    • CreateL4Proxy
    • ModifyL4Proxy
    • ModifyL4ProxyStatus
    • DescribeL4Proxy
    • DeleteL4Proxy
    • CreateL4ProxyRules
    • ModifyL4ProxyRules
    • ModifyL4ProxyRulesStatus
    • DescribeL4ProxyRules
    • DeleteL4ProxyRules
    • CreateApplicationProxy
    • ModifyApplicationProxy
    • ModifyApplicationProxyStatus
    • DescribeApplicationProxies
    • DeleteApplicationProxy
    • CreateApplicationProxyRule
    • ModifyApplicationProxyRule
    • ModifyApplicationProxyRuleStatus
    • DeleteApplicationProxyRule
  • Content Management APIs
    • CreatePurgeTask
    • DescribePurgeTasks
    • CreatePrefetchTask
    • DescribePrefetchTasks
    • DescribeContentQuota
  • Data Analysis APIs
    • DescribeDDoSAttackData
    • DescribeDDoSAttackEvent
    • DescribeDDoSAttackTopData
    • DescribeOverviewL7Data
    • DescribeTimingL4Data
    • DescribeTimingL7AnalysisData
    • DescribeTopL7AnalysisData
    • DescribeTimingL7CacheData
    • DescribeTopL7CacheData
  • Log Service APIs
    • DownloadL7Logs
    • DownloadL4Logs
    • CreateCLSIndex
    • CreateRealtimeLogDeliveryTask
    • ModifyRealtimeLogDeliveryTask
    • DeleteRealtimeLogDeliveryTask
    • DescribeRealtimeLogDeliveryTasks
  • Billing APIs
    • CreatePlan
    • UpgradePlan
    • RenewPlan
    • ModifyPlan
    • IncreasePlanQuota
    • DestroyPlan
    • CreatePlanForZone
    • BindZoneToPlan
    • DescribeBillingData
    • DescribeAvailablePlans
  • Certificate APIs
    • DescribeDefaultCertificates
    • ModifyHostsCertificate
  • Load Balancing APIs
    • CreateOriginGroup
    • ModifyOriginGroup
    • DeleteOriginGroup
    • DescribeOriginGroup
    • CreateLoadBalancer
    • ModifyLoadBalancer
    • DeleteLoadBalancer
    • DescribeLoadBalancerList
    • DescribeOriginGroupHealthStatus
  • Custom Response Page APIs
    • CreateCustomizeErrorPage
    • DescribeCustomErrorPages
    • ModifyCustomErrorPage
    • DeleteCustomErrorPage
  • DNS Record APIs
    • CreateDnsRecord
    • DeleteDnsRecords
    • DescribeDnsRecords
    • ModifyDnsRecordsStatus
    • ModifyDnsRecords
  • Diagnostic Tool APIs
    • DescribeIPRegion
  • Version Management APIs
    • CreateConfigGroupVersion
    • DeployConfigGroupVersion
    • DescribeConfigGroupVersionDetail
    • DescribeConfigGroupVersions
    • DescribeDeployHistory
    • DescribeEnvironments
  • Data Types
  • Error Codes

DescribeTimingL4Data

1. API Description

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

This API is used to query the time series Data list of Layer 4.

.

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 NameRequiredTypeDescription
ActionYesStringCommon Params. The value used for this API: DescribeTimingL4Data.
VersionYesStringCommon Params. The value used for this API: 2022-09-01.
RegionNoStringCommon Params. This parameter is not required.
StartTimeYesTimestamp ISO8601The start time.
EndTimeYesTimestamp ISO8601End time. the query time range (EndTime - StartTime) must be less than or equal to 31 days.
MetricNames.NYesArray of StringQuery metrics. valid values:.
  • l4Flow_flux: specifies the total access traffic. measurement unit: Byte. metric value type: Integer.
  • .
  • l4Flow_inFlux: specifies access inbound traffic. measurement unit: Byte. metric value type: Integer.
  • .
  • l4Flow_outFlux: access outbound traffic. measurement unit: Byte. metric value type: Integer.
  • .
  • l4Flow_inBandwidth: specifies the inbound bandwidth peak of the visit. measurement unit: bps. metric value type: Integer.
  • .
  • l4Flow_outBandwidth: specifies the outbound bandwidth peak. measurement unit: bps. metric value type: Integer.
  • .
  • l4Flow_connections: specifies the number of concurrent connections, measurement unit: unit, metric value type: Integer.
  • .
  • l4Flow_newConnectionsRate: the rate of new connections, measurement unit: per second, metric value type: Float, rounded to two decimal places.
note:
  • metrics of Integer type will return corresponding time series Data from Data.N.TypeValue;
  • .
  • Metrics with Float value type will return corresponding time series Data from Data.N.FloatTypeValue.
.
ZoneIds.NYesArray of StringSite ID. this parameter will change from selectable to required after may 30, 2024. for details, see the announcement: tencent cloud EdgeOne: tencentcloud API change notification.
Import up to 100 site ids. to query all site data under the tencent cloud root account, use * as a replacement. querying account-level data requires permission for all site resources of this api.
ProxyIds.NNoArray of StringList of L4 proxy IDs. All L4 proxies will be selected if this field is not specified.
IntervalNoStringTime 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 inferred 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.NNoArray of QueryConditionFilter criteria. the detailed Key values of filter criteria are as follows:.
  • ruleId: filter by forwarding rule ID.
  • .
  • proxyId: filters by l4 proxy instance ID.
.

3. Output Parameters

Parameter NameTypeDescription
TotalCountIntegerTotal number of query results.
DataArray of TimingDataRecord

Layer 4 time series traffic Data list.
for different queried metrics, time series Data is returned from different parameters based on the value type.
currently, there are the following two value types:

  • Integer: metrics with Integer value type return corresponding time series Data from Data.N.TypeValue.
    queried metrics MetricName include:
    • 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 with Float value type return corresponding time series Data from Data.N.FloatTypeValue.
    queried metrics MetricName include:
    • l4Flow_newConnectionsRate: rate of new connections.
  • .

This API does not support dimension query for now. it aggregates and returns Data by root account by default, which means Data.N.TypeKey = AppId. AppId is the unique id of the tencent cloud root account, and N always equals 1.

.
Note: This field may return null, which indicates a failure to obtain a valid value.
RequestIdStringThe 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 Series Data for the Four-Layer Concurrent Connection Metric

Query the time series data of concurrent connections for all layer-4 instances under the selected 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_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 Based on Layer-4 Proxy Rule ID

Query the time series data of total access traffic for the layer-4 instance forwarding rule with RuleId = rule-033950bf-6fc4-11ed-8ab2-525400a22580 under the selected 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 for the New Connection Rate Based on the Layer 4 Instance ID

Query the time series data of the rate of new connections for the layer-4 instance with ProxyId = sid-3kr5me8zidha at the selected site where ZoneId = zone-28kw53cmc6ky during the period 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 metrics MetricNames is Float, the time series data corresponding to 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 CodeDescription
FailedOperationOperation failed.
InternalError.ProxyServerAn unknown error occurred in the backend server.
InternalError.RouteErrorThe backend routing address is incorrect.
LimitExceededThe quota limit has been reached.
ResourceNotFoundThe resource doesn’t exist.
ResourceUnavailableThe resource is unavailable.
UnauthorizedOperation.CamUnauthorizedCAM is not authorized.