Obtaining Links for Downloading Slow Query Logs
Function
This API is used to obtain links for downloading slow query logs. Before calling this API:
- Learn how to authenticate it.
- Obtain the required region and endpoint.
URI
POST /v3/{project_id}/instances/{instance_id}/{node_id}/slowlog-download
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| project_id | Yes | String | Definition Project ID of a tenant in a region. To obtain this value, see Obtaining a Project ID. Constraints N/A Range The value contains 32 characters. Only letters and digits are allowed. Default Value N/A |
| instance_id | Yes | String | Definition Instance ID, which uniquely identifies an instance. Constraints N/A Range The value contains 36 characters with a suffix of in07. Only letters and digits are allowed. Default Value N/A |
| node_id | Yes | String | Definition Node ID. Constraints N/A Range The value contains 36 characters, starting with a UUID and ending with no07. Only letters and digits are allowed. Default Value N/A |
Request Parameters
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| X-Auth-Token | Yes | String | Definition User token. To obtain this value, call the IAM API for obtaining a user token. The value of X-Subject-Token in the response header is the token value. Constraints N/A Range N/A Default Value N/A |
| X-Language | No | String | Definition Request language type. Constraints N/A Range Default Value en-us |
Response Parameters
Status code: 200
| Parameter | Type | Description |
|---|---|---|
| list | Array of DownloadSlowLogFileItem objects | Definition Links for downloading slow query logs. |
| count | Integer | Definition Number of slow query logs. Range N/A |
| Parameter | Type | Description |
|---|---|---|
| job_id | String | Definition Task ID. Range N/A |
| file_name | String | Definition File name. Range N/A |
| status | String | Definition Download status. Range |
| file_size | String | Definition File size, in KB. Range N/A |
| file_link | String | Definition Download link. The link is valid for 5 minutes. Range N/A |
| create_at | Long | Definition Creation time. Range N/A |
| updated_at | Long | Definition Update time. Range N/A |
Status code: 400
| Parameter | Type | Description |
|---|---|---|
| error_code | String | Error code. |
| error_msg | String | Error message. |
Status code: 500
| Parameter | Type | Description |
|---|---|---|
| error_code | String | Error code. |
| error_msg | String | Error message. |
Example Request
Obtaining links for downloading slow query logs
POST https://{endpoint}/v3/054e292c9880d4992f02c0196d3ea468/instances/6754902da1f447269c6979b0590102a5in07/941d21130b3c4899ad1a752a0945befdno07/slowlog-download Example Response
Status code: 200
Success.
{
"list" : [ {
"job_id" : "73a5f4df-a111-4e09-b543-5ff3863eda71",
"file_name" : "62b83dfd385f4d96afa6c7afd36dad7b_gaussdbformysql_slowlog_download_20240816081247776",
"status" : "SUCCESS",
"file_size" : 0,
"file_link" : "https://obs.xxxxxx.xxxxx.huawei.com:443/dbsbucket-0-xxxxx-ea3ffcbdb5cc4b5789a77884f9******/62b83dfd385f4d96afa6c7afd36dad7b_gaussdbformysql_slowlog_download_20240816081247776?AWSAccessKeyId=********************&Expires=1723796280&response-cache-control=no-cache%2Cno-store&Signature=51RXPvQJg2RSolfqCHOqF5********",
"create_at" : 1723795967769,
"updated_at" : 1723795980907
} ],
"count" : 1
} Status Code
For details, see Status Codes.
Error Code
For details, see Error Codes.