tencent cloud

APIs

DescribeTopFunctionAnalysisData

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

1. API Description

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

This API is used to query the topN data of Edge Functions by a specified dimension. Note that the data returned by this API has a delay of about 10 minutes. We recommend that you query the data generated at least 10 minutes before the current time.

A maximum of 20 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: DescribeTopFunctionAnalysisData.
Version Yes String Common Params. The value used for this API: 2022-09-01.
Region No String Common Params. This parameter is not required.
ZoneIds.N Yes Array of String

Set of site IDs. Enter at least one site ID.

StartTime Yes Timestamp ISO8601

Start time.

EndTime Yes Timestamp ISO8601 End time. The query time range (EndTime - StartTime) must be no longer than 7 days.
MetricName Yes String The metric to query. Valid values:
  • function_requestCount_functionResult: counts Edge Function requests by the dimension of execution result.
  • function_requestCount_functionName: counts Edge Function requests by the dimension of function name.
  • function_requestCount_domain: counts Edge Function requests by the dimension of domain name.
Limit No Integer

Number of top data entries to query. The maximum value is 1000. If not specified, the default value is 10, indicating that the top 10 data entries are queried.

Filters.N No Array of QueryCondition Filter conditions. The maximum number of values in Filters.Value is 20. The detailed filter condition keys are as follows:
  • domain: filters by subdomain name. Example value: www.example.com.
  • function-name: filters by Edge Function name. Example value: test051301-zone-2r2fdoxxxx-130000000.
  • function-result: filters by Edge Function execution result. Valid values for the corresponding Value:
    • success: success.
    • fail: failure.
Interval No String Query time granularity. Valid values:
  • min: 1 minute.
  • 5min: 5 minutes.
  • hour: 1 hour.
  • day: 1 day.
If this parameter is not specified, the granularity is automatically inferred based on the interval between the start time and the end time. The specific rules are as follows: within 2 hours, the granularity is min; within 2 days, the granularity is 5min; within 7 days, the granularity is hour; longer than 7 days, the granularity is day.
Area No String The region the data belongs to. Valid values:
  • overseas: data from the global area (excluding the Chinese mainland).
  • mainland: data from the Chinese mainland.
  • global: global data.
If this parameter is not specified, the default value is global.

3. Output Parameters

Parameter Name Type Description
TotalCount Integer

Total number of query results.

Data Array of TopDataRecord

List of topN data by the statistical dimension specified by MetricName.

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 Top Function Name Request Count Data for a Specified Domain

Input Example

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

{
    "ZoneIds": [
        "zone-2mzegj4vln5f"
    ],
    "StartTime": "2022-07-31T00:00:00+08:00",
    "EndTime": "2022-08-29T19:17:59+08:00",
    "MetricName": "function_requestCount_functionName",
    "Area": "mainland",
    "Interval": "day",
    "Limit": "1",
    "Filters": [
        {
            "Key": "domain",
            "Operator": "equals",
            "Value": [
                "www.baidu.com"
            ]
        }
    ]
}

Output Example

{
    "Response": {
        "RequestId": "7c499897-8ad9-4a2d-884e-6154f283d723",
        "Data": [
            {
                "DetailData": [
                    {
                        "Key": "test051301-zone-2mzegj4vln5f-13000000",
                        "Value": 1210001
                    }
                ],
                "TypeKey": "251227260"
            }
        ],
        "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.
InvalidParameter Parameter error.
InvalidParameterValue Parameter value error.
LimitExceeded The quota limit is exceeded.
LimitExceeded.QueryTimeLimitExceeded Query time range exceeds the limit.
OperationDenied Operation denied.
ResourceNotFound The resource does not exist.
ResourceUnavailable Resources are unavailable.
UnauthorizedOperation.CamUnauthorized Unauthorized Cam operation.
UnauthorizedOperation.NoPermission The sub-account does not have operation permissions. Add the required permissions and try again.

도움말 및 지원

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

피드백