Queries statistical logs, such as application error logs, the rankings of hotwords, and slow query logs.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request headers

This operation uses only the common request headers. For more information, see Common request parameters.

Request syntax

GET /v4/openapi/app-groups/[appGroupIdentity]/statistic-logs/[moduleName] HTTP/1.1

Request parameters

Parameter Type Position Required Example Description
appGroupIdentity String Path Yes app_group_name

The name of the application.

moduleName String Path Yes hot

The name of the module. Valid values:

  • hot: the rankings of hotwords
  • error: application error logs
  • slow-log: slow query logs

Only hot is supported.

startTime Integer Query No 1582214400

The beginning of the time range to query.

Default value: the timestamp of 00:00 on the current day.

stopTime Integer Query No 1682222400

The end of the time range to query.

Default value: the timestamp of 00:00 on the current day.

pageNumber Integer Query No 1

The number of the page to return. Default value: 1.

pageSize Integer Query No 10

The number of items to return on each page. Default value: 10.

columns String Query No wordsTopPv

The fields to query.

Example: columns=wordsTopPv.

For more information, see Metrics in statistical reports.

Response parameters

Parameter Type Example Description
requestId String F76ACE3D-E510-EE2C-B7B1-39B3136A61EE

The ID of the request.

result List [ { "rawQuery":"Taobao", "pv":100 } ]

The return result. For more information, see:

totalCount Long 1

The total number of the queried logs.

Parameters of hotwords rankings

Parameter

Type

Description

rawQuery

String

The hotword.

pv

Integer

The page views (PVs).

Examples

Sample requests

GET /v4/openapi/app-groups/my_app/statistic-logs/hot?columns=wordsTopPv&startTime=1591459200

Sample success responses

XML format

<requestId>F76ACE3D-E510-EE2C-B7B1-39B3136A61EE</requestId>
<result>
    <rawQuery>Taobao</rawQuery>
    <pv>100</pv>
</result>
<totalCount>1</totalCount>

JSON format

{
    "requestId": "F76ACE3D-E510-EE2C-B7B1-39B3136A61EE",
    "result": {
        "rawQuery": "Taobao",
        "pv": 100
    },
    "totalCount": 1
}

Error codes

For a list of error codes, visit the API Error Center.