Creating a Slow Query Log Download Task
Function
This API is used to create a slow query log download task. Before calling this API:
- Learn how to authenticate this API.
URI
POST https://{Endpoint}/v3/{project_id}/instances/{instance_id}/slow-log/download
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| project_id | Yes | String | Explanation: Project ID of a tenant in a region. For details about how to obtain the project ID, see Obtaining a Project ID. Restrictions: None Value range: The value can contain 32 characters. Only letters and digits are allowed. Default value: None |
| instance_id | Yes | String | Instance ID, which is compliant with the UUID format. |
Request Parameters
None
Response Parameters
| Parameter | Type | Description |
|---|---|---|
| list | Array of SlowLogDownloadInfo objects | Downloaded slow query log information. For details, see Table 3. |
| Parameter | Type | Description |
|---|---|---|
| id | String | Slow query log ID. |
| instance_id | String | Instance ID. |
| node_id | String | Node ID. |
| workflow_id | String | Workflow ID. |
| file_name | String | File name. |
| file_size | String | File size in bytes. |
| file_link | String | Link for downloading the file. |
| bucket_name | String | Bucket name |
| created_at | Long | Creation time. |
| updated_at | Long | Update time. |
| version | String | Version. |
| status | String | Status. |
| message | String | Message. |
Example Request
POST https://gaussdb-opengauss.eu-west-101.myhuaweicloud.eu/v3/0c8243400d37468bb4aed3cc94c2911d/instances/f9b5f9b296ec6808e067in14/slow-log/download
Example Response
When a request is delivered for the first time, the response is an empty list.
{
"list" : []
} {
"list" : [ {
"id" : "64d7bad3-6665-4590-baa2-eb5394e49625",
"instance_id" : "9b2f4cc6cd584c67bc179a2bfbb37f90in14",
"node_id" : "9d8c79cc41074452977a564b335220f5no14",
"workflow_id" : "7d77153c12dde-4f3c-a333-7d30503267f2",
"file_name" : "c7025305deb34ae9af1be94f698e7949_slowlog_download__9d8c79cc41074452977a564b335220f5no1420230823024331782",
"file_size" : "719.0",
"file_link" : "***",
"bucket_name" : null,
"created_at" : 1692758611782,
"updated_at" : 1692758611782,
"version" : null,
"status" : "EXPORTING",
"message" : null
}, {
"id" : "4712c3b1-d26a-49d4-9652-211d6ac106c5",
"instance_id" : "9b2f4cc6cd584c67bc179a2bfbb37f90in14",
"node_id" : "9d03b0a73ebd415eb2f692862f326cb7no14",
"workflow_id" : "7d77153c12dde-4805-bd0b-d70c803a873a",
"file_name" : "c7025305deb34ae9af1be94f698e7949_slowlog_download__9d03b0a73ebd415eb2f692862f326cb7no1420230823024331727",
"file_size" : "719.0",
"file_link" : "***",
"bucket_name" : null,
"created_at" : 1692758611727,
"updated_at" : 1692758611727,
"version" : null,
"status" : "EXPORTING",
"message" : null
} ]
} Status Code
- Normal
- Abnormal
For details, see Status Codes.
Error Code
For details, see Error Codes.