Domain name for API request: postgres.intl.tencentcloudapi.com.
This API is used to query an error log.
A maximum of 100 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: DescribeDBErrlogs. |
| Version | Yes | String | Common Params. The value used for this API: 2017-03-12. |
| Region | Yes | String | Common Params. For more information, please see the list of regions supported by the product. |
| DBInstanceId | Yes | String | Instance ID. It can be obtained through the DescribeDBInstances API. |
| StartTime | Yes | Timestamp | Query start time, such as 2018-01-01 00:00:00. Log retention time defaults to 7 days. Start time cannot exceed the retention period. |
| EndTime | Yes | Timestamp | Query end time, in the format of 2018-01-01 00:00:00. |
| DatabaseName | No | String | Database name |
| SearchKeys.N | No | Array of String | Search keywords. |
| Limit | No | Integer | Number of results returned per page, with a value range of 1-100. The default value is |
| Offset | No | Integer | Data offset, which starts from 0. The default value is 0. |
| LogFilters.N | No | Array of LogFilter | Log filter criteria. Format is [{Type: "ApplicationName", Compare: "INC", Value: ["123"]}]. |
| Parameter Name | Type | Description |
|---|---|---|
| TotalCount | Integer | The number of logs queried. Maximum value is 10,000. |
| Details | Array of ErrLogDetail | Error log details collection. |
| 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. |
POST / HTTP/1.1
Host: postgres.intl.tencentcloudapi.com
Content-Type: application/json
X-TC-Action: DescribeDBErrlogs
<Common request parameters>
{
"DBInstanceId": "postgres-nykju5pj",
"StartTime": "2026-04-15 17:54:50",
"EndTime": "2026-04-17 17:54:50",
"LogFilters": [
{
"Type": "ApplicationName",
"Compare": "INC",
"Value": [
"slow_log_test"
]
}
]
}
{
"Response": {
"Details": [
{
"ApplicationName": "slow_log_test",
"ClientAddr": "10.15.255.3:59834",
"Database": "postgres",
"ErrMsg": "canceling statement due to user request,,,,0,,SET application_name='slow_log_test'; select pg_sleep(3);",
"ErrTime": "2026-04-17 11:00:38",
"ProcessId": 58892,
"SessionId": "69e1a253.e60c",
"SessionStartTime": "2026-04-17 11:00:35",
"SqlStateCode": "57014",
"UserName": "root",
"VirtualTransactionId": "1125/307"
}
],
"TotalCount": 1,
"RequestId": "fd225dcd-1f80-4db7-bd28-577a498631a7"
}
}
TencentCloud API 3.0 integrates SDKs that support various programming languages to make it easier for you to call APIs.
The following only lists the error codes related to the API business logic. For other error codes, see Common Error Codes.
| Error Code | Description |
|---|---|
| AuthFailure.UnauthorizedOperation | Authentication failed. |
| FailedOperation.CamSigAndAuthError | Authentication failed. Please try again later. If the problem persists, please contact customer service. |
| FailedOperation.DatabaseAccessError | Failed to access database management service. Please try again later. If the problem persists, please contact customer service. |
| FailedOperation.ESConnectError | Failed to access ES. Please try again later. If the problem persists, please contact customer service. |
| FailedOperation.FailedOperationError | Operation failed. Please try again later. |
| InternalError.DBError | Backend database execution error. |
| InternalError.HttpError | Service exception. please retry later. |
| InternalError.InternalHttpServerError | An exception occurred while executing the request. |
| InternalError.ListInstancesError | Instance does not exist |
| InternalError.SystemError | System error. When this error occurs, please contact customer service for assistance. |
| InvalidParameter | Parameter error. |
| InvalidParameter.ParameterCheckError | Failed to check the parameter. |
| InvalidParameterValue.InstanceNotExist | The current instance does not exist. |
| InvalidParameterValue.InterfaceNameNotFound | Incorrect ACTION. |
| InvalidParameterValue.InvalidParameterValueError | Incorrect parameter value |
| InvalidParameterValue.ParameterHandleError | Failed to process the parameter. Please check if the parameter value is valid. |
| InvalidParameterValue.ParameterValueExceedError | The maximum value of the parameter has been reached. |
| OperationDenied.CamDeniedError | This operation cannot be performed. |
| OperationDenied.InstanceAccessDeniedError | You do not have the permission to operate this resource. |
| ResourceNotFound.InstanceNotFoundError | The instance does not exist. |
| UnknownParameter.HttpError | Service exception. please retry later. |
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