DescribeTopFunctionAnalysisData
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.
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:
|
| 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:
|
| Interval | No | String | Query time granularity. Valid values:
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:
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.
- Tencent Cloud SDK 3.0 for Python
- Tencent Cloud SDK 3.0 for Java
- Tencent Cloud SDK 3.0 for PHP
- Tencent Cloud SDK 3.0 for Go
- Tencent Cloud SDK 3.0 for Node.js
- Tencent Cloud SDK 3.0 for .NET
- Tencent Cloud SDK 3.0 for C++
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. |