tencent cloud

APIs

DescribeLogAnalysisDetail

Baixar
Modo Foco
Tamanho da Fonte
Última atualização: 2026-11-25 16:58:44

1. API Description

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

This API is used to query log analysis details. The data comes from the log data pushed by real-time log push tasks under the site with the destination "log-analysis".

A maximum of 10 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: DescribeLogAnalysisDetail.
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

Zone ID.

Area Yes String

Data ownership region. Available values:

  • mainland: within the Chinese mainland;
  • overseas: global (excluding the Chinese mainland).
Note: If the site service area is "global availability zone", query the data of mainland and overseas separately to obtain all data.

StartTime Yes Timestamp ISO8601

Start time. Example value: 2020-04-29T00:00:00Z. The maximum supported span from the query start time to this day varies by package version. For more 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.

LogType No String

Log type. Available values:

  • l7-access-logs: L7 access log;
  • web-attack: managed rule log.
Defaults to l7-access-logs.

Condition No String

Log match condition, with a maximum length of 12 KB.

Limit No Integer

Paginated query limit. Default value: 20, maximum value: 100.

Offset No Integer

Paginated query offset. Default value: 0.

Sort No String

Whether raw logs are returned in time sequence; available values:

  • asc: ascending;
  • desc: descending.
Default to desc.

3. Output Parameters

Parameter Name Type Description
LogDetail Array of LogItem

List of log details that meet the log match conditions.

TotalCount Integer

Total number of logs that meet the log match condition.

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 Query log analysis details

Query the details of the L7 access log data for the selected site with ID "zone-2z55fgysdtmc", associated region Chinese mainland, from 2025-07-10 00:00:00 to 2025-07-11 00:00:00 UTC+8, in reverse chronological order.
Log match condition: The request domain name is "www.example.com" and the hit status is "hit" or "miss".

Input Example

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

{
    "ZoneId": "zone-2z55fgysdtmc",
    "Area": "mainland",
    "StartTime": "2025-07-10T00:00:00+08:00",
    "EndTime": "2025-07-11T00:00:00+08:00",
    "LogType": "l7-access-logs",
    "Condition": "${RequestHost} in ['www.example.com'] AND ${EdgeCacheStatus} in ['hit','miss']",
    "Limit": 100,
    "Offset": 0,
    "Sort": "desc"
}

Output Example

{
    "Response": {
        "RequestId": "88e4f1a4-ee44-42e9-8aa8-a9b1631ecc5e",
        "LogDetail": [
            {
                "Timestamp": 1752137534000,
                "LogJson": "{\"RequestID\":\"13719873400581239472\",\"RequestSSLProtocol\":\"-\",\"RequestScheme\":\"HTTPS\",\"LogTime\":\"2025-07-10T08:52:14Z\",\"EdgeResponseStatusCode\":404,\"ClientIP\":\"0.0.0.0\",\"RequestHost\":\"www.example.com\",\"RequestProtocol\":\"HTTP/1.1\",\"EdgeCacheStatus\": \"hit\",\"RequestUA\":\"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/127.0.0.0 Safari/537.36\",\"EdgeServerIP\":\"0.0.0.0\"}"
            },
            {
                "Timestamp": 1752135679000,
                "LogJson": "{\"RequestID\":\"13719873400528347025\",\"RequestSSLProtocol\":\"-\",\"RequestScheme\":\"HTTPS\",\"LogTime\":\"2025-07-10T08:21:19Z\",\"EdgeResponseStatusCode\":200,\"ClientIP\":\"0.0.0.0\",\"RequestHost\":\"www.example.com\",\"RequestProtocol\":\"HTTP/1.1\",\"EdgeCacheStatus\": \"hit\",\"RequestUA\":\"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/127.0.0.0 Safari/537.36\",\"EdgeServerIP\":\"0.0.0.0\"}"
            },
            {
                "Timestamp": 1752134456000,
                "LogJson": "{\"RequestID\":\"13719873400520394827\",\"RequestSSLProtocol\":\"-\",\"RequestScheme\":\"HTTPS\",\"LogTime\":\"2025-07-10T08:00:56Z\",\"EdgeResponseStatusCode\":200,\"ClientIP\":\"0.0.0.0\",\"RequestHost\":\"www.example.com\",\"RequestProtocol\":\"HTTP/1.1\",\"EdgeCacheStatus\": \"hit\",\"RequestUA\":\"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/127.0.0.0 Safari/537.36\",\"EdgeServerIP\":\"0.0.0.0\"}"
            },
            {
                "Timestamp": 1752131866310,
                "LogJson": "{\"RequestID\":\"13719873400524368235\",\"RequestSSLProtocol\":\"-\",\"RequestScheme\":\"HTTPS\",\"LogTime\":\"2025-07-10T07:16:40Z\",\"EdgeResponseStatusCode\":200,\"ClientIP\":\"0.0.0.0\",\"RequestHost\":\"www.example.com\",\"RequestProtocol\":\"HTTP/1.1\",\"EdgeCacheStatus\": \"hit\",\"RequestUA\":\"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/127.0.0.0 Safari/537.36\",\"EdgeServerIP\":\"0.0.0.0\"}"
            }
        ],
        "TotalCount": 4
    }
}

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

There is no error code related to the API business logic. For other error codes, please see Common Error Codes.

Ajuda e Suporte

Esta página foi útil?

comentários