Domain name for API request: teo.intl.tencentcloudapi.com.
This API is used to query log analysis statistics results. Users append an SQL aggregation statement after the query statement ([retrieval condition] | [SQL statement]). The backend executes the aggregation and returns columnar statistics results (column definition + data row).
A maximum of 20 requests can be initiated per second for this API.
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: DescribeLogAnalysisStatistics. |
| Version | Yes | String | Common Params. The value used for this API: 2022-09-01. |
| Region | No | String | Common Params. This parameter is not required. |
| ZoneId | Yes | String | Site ID. |
| Area | Yes | String | Data ownership region. Available values:
|
| LogType | Yes | String | Log type. Available values:
|
| StartTime | Yes | Timestamp ISO8601 | Start time. Example value: 2020-04-29T00:00:00Z. The maximum span from the query start time to this day varies by package version. For details, see Package Selection Comparison. |
| EndTime | Yes | Timestamp ISO8601 | End time, for example, 2020-04-30T00:00:00Z. The maximum time span from start time to end time per request is 31 days. |
| Query | Yes | String | Statistical query statement, composed of [retrieval criteria] | [SQL statement]. The SQL segment after the pipe character "|" is required. The retrieval criteria segment can be empty (for example, | SELECT ...), which means aggregation on full data. Maximum length: 12 KB. Default SQL Limit: 100. Maximum Limit: 10000. With retrieval criteria: Without retrieval criteria: |
| Parameter Name | Type | Description |
|---|---|---|
| Columns | Array of String | Column names in the log analysis statistical result, corresponding to the fields in the SELECT part of the SQL in the input parameter Query. |
| Records | Array of StatisticsRecord | Rows of data in the log analysis statistics result. The value index in each row corresponds one-to-one with the column index. |
| 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. |
This example shows you how to query the statistical results of Layer 7 Access Logs for a query site (ZoneId = zone-3qcox8or8ccl) on the Chinese mainland from 2026-07-14T00:00:00Z to 2026-07-18T00:00:00Z. The statistical statement is: select EdgeCacheStatus as status, count(*) as cnt group by status limit 2, and the filter condition is cache status = cache miss or other.
POST / HTTP/1.1
Host: teo.intl.tencentcloudapi.com
Content-Type: application/json
X-TC-Action: DescribeLogAnalysisStatistics
<Common request parameters>
{
"ZoneId": "zone-3qcox8or8ccl",
"Area": "mainland",
"LogType": "l7-access-logs",
"StartTime": "2026-07-14T00:00:00Z",
"EndTime": "2026-07-18T00:00:00Z",
"Query": "${EdgeCacheStatus} in ['miss','other'] | select EdgeCacheStatus as status, count(*) as cnt group by status limit 2"
}
{
"Response": {
"Columns": [
"status"
],
"Records": [
{
"Record": [
"miss"
]
}
],
"RequestId": "6d5d22a3-7977-4fb9-b649-c796fd9cf358"
}
}
This example shows you how to query the statistical results of Layer 7 Access Logs for the Chinese mainland at the query site (ZoneId = zone-3qcox8or8ccl) from 2026-07-14T00:00:00Z to 2026-07-18T00:00:00Z. The statistical statement is: select count(*) as cnt, with no filter conditions.
POST / HTTP/1.1
Host: teo.intl.tencentcloudapi.com
Content-Type: application/json
X-TC-Action: DescribeLogAnalysisStatistics
<Common request parameters>
{
"ZoneId": "zone-3qcox8or8ccl",
"Area": "mainland",
"LogType": "l7-access-logs",
"StartTime": "2026-07-14T00:00:00Z",
"EndTime": "2026-07-18T00:00:00Z",
"Query": "* | select count(*) as cnt"
}
{
"Response": {
"Columns": [
"cnt"
],
"Records": [
{
"Record": [
"5"
]
}
],
"RequestId": "d3c0b5e3-b3fa-433e-97e5-9274c5d3167f"
}
}
TencentCloud API 3.0 integrates SDKs that support various programming languages to make it easier for you to call APIs.
There is no error code related to the API business logic. For other error codes, please see Common Error Codes.
Esta página foi útil?
Você também pode entrar em contato com a Equipe de vendas ou Enviar um tíquete em caso de ajuda.
comentários