Domain name for API request: mariadb.tencentcloudapi.com.
This API is used to query the slow query log list.
A maximum of 20 requests can be initiated per second for this API.
Note: This API supports Finance regions. If the common parameter Region is a Finance region, a domain name with the Finance region needs to be specified, for example: mariadb.ap-shanghai-fsi.tencentcloudapi.com
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 parameter. The value used for this API: DescribeDBSlowLogs. |
Version | Yes | String | Common parameter. The value used for this API: 2017-03-12. |
Region | Yes | String | Common parameter. For more information, please see the list of regions supported by the product. |
InstanceId | Yes | String | Instance ID in the format of tdsql-ow728lmc . |
Offset | Yes | Integer | Data entry number starting from which to return results |
Limit | Yes | Integer | Number of results to be returned |
StartTime | Yes | Timestamp | Query start time in the format of 2016-07-23 14:55:20 |
EndTime | No | Timestamp | Query end time in the format of 2016-08-22 14:55:20 |
Db | No | String | Specific name of database to be queried |
OrderBy | No | String | Sort by metric. Valid values: query_time_sum, query_count |
OrderByType | No | String | Sorting order. Valid values: desc, asc |
Slave | No | Integer | Whether to query slow queries of the secondary. 0: primary, 1: secondary |
Parameter Name | Type | Description |
---|---|---|
Data | Array of SlowLogData | Slow query log data |
LockTimeSum | Float | Sum of all statement lock durations |
QueryCount | Integer | Total number of statement queries |
Total | Integer | Total number of results |
QueryTimeSum | Float | Sum of all statement query durations |
RequestId | String | The unique request ID, which is returned for each request. RequestId is required for locating a problem. |
https://mariadb.tencentcloudapi.com/?Action=DescribeDBSlowLogs
&InstanceId=tdsql-ige1a5k3
&Offset=0
&Limit=20
&StartTime=2017-08-06 00:00:00
&EndTime=2017-08-07 23:59:59
&Slave=1
&<Common request parameters>
{
"Response": {
"RequestId": "1e74e824-6d2b-495d-b347-5250cdf8e964",
"InstanceId": "tdsql-ige1a5k3",
"Data": [
{
"CheckSum": "14090621765287179955",
"Db": "",
"FingerPrint": "replace into sysdb.statustable set ts = from_unixtime(?),ip=?,port=?",
"LockTimeAvg": "0.00",
"LockTimeMax": "0.00",
"LockTimeMin": "0.00",
"LockTimeSum": "0.00",
"QueryCount": "1",
"QueryTimeAvg": "1.13",
"QueryTimeMax": "1.13",
"QueryTimeMin": "1.13",
"QueryTimeSum": "1.13",
"RowsExaminedSum": "0.00",
"RowsSentSum": "0.00",
"TsMax": "2016-08-06 11:32:10",
"TsMin": "2016-08-06 11:32:10",
"User": "agent"
}
],
"LockTimeSum": 0,
"QueryCount": 1,
"QueryTimeSum": 1.13,
"Total": 1
}
}
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 |
---|---|
InternalError.CamAuthFailed | CAM authentication request failed. |
InternalError.DbOperationFailed | Failed to query the database. |
InternalError.GetInstanceInfoFailed | Failed to get the backend instance information. |
InternalError.GetSlowLogFailed | Failed to get the error log. |
InternalError.LogDBFailed | Failed to get slow logs. |
InvalidParameter.GenericParameterError | An error occurred while verifying parameter validity. |
InvalidParameter.IllegalTime | Incorrect time parameter. |
ResourceUnavailable.InstanceAlreadyDeleted | The database instance has been deleted. |
ResourceUnavailable.InstanceStatusAbnormal | Incorrect database instance status. Operations are not allowed. |
UnauthorizedOperation.PermissionDenied | You have no permission to manipulate this API or resource. |
Was this page helpful?