This API is used to obtain links for downloading slow query logs.
You need to do this API in two steps:
For MySQL and PostgreSQL:
For SQLServer:
Name |
Mandatory |
Description |
---|---|---|
project_id |
Yes |
Specifies the project ID of a tenant in a region. For details about how to obtain the project ID, see Obtaining a Project ID. |
instance_id |
Yes |
Specifies the ID of the DB instance to be queried. |
Name |
Mandatory |
Type |
Description |
---|---|---|---|
file_name |
No |
String |
Specifies the name of the file to be downloaded. This parameter is mandatory for SQL Server. The value is SQLTrace.trc |
POST https://rds.eu-de.otc.t-systems.com/v3/0483b6b16e954cb88930a360d2c4e663/instances/cee5265e1e5845649e354841234567dfin01/slowlog-download
step 1 request:
{}
step 2 request:
{}
For SQLServer:
step 1 request:
{ "file_name":"SQLTrace.trc" }
step 2 request:
{ "file_name":"SQLTrace.trc" }
Name |
Type |
Description |
---|---|---|
list |
List |
Indicates the links for downloading slow query logs. For details, see Table 4. |
status |
String |
Indicates the status of generating links for downloading slow query logs.
|
count |
Integer |
Indicates the number of links for downloading slow query logs. |
Name |
Type |
Description |
---|---|---|
workflow_id |
String |
Indicates the workflow ID. |
file_name |
String |
Indicates the name of the generated file for downloading slow query logs. |
status |
String |
Indicates the generation status of the current link.
|
file_size |
String |
Indicates the file size. |
file_link |
String |
Indicates the download link. This link is valid for 5 minutes. |
create_at |
Long |
Indicates the generation time. |
{ "list": [ { "workflow_id": "0202bf1a-4181-48b9-bdd8-27ea4cef05b2", "file_name": "054bc98b0a80d39b1faec01373f2f339_slowlog_download_20211117091141667", "status": "EXPORTING", "create_at": 1637140301659 } ], "status": "CREATING", "count": 1 }
{ "list": [ { "workflow_id": "0202bf1a-4181-48b9-bdd8-27ea4cef05b2", "file_name": "054bc98b0a80d39b1faec01373f2f339_slowlog_download_20211117091141667", "status": "SUCCESS", "file_size": "922", "file_link": "https://rdsbucket.opxxx.svc.rds.xxxxx", "create_at": 1637140315066 } ], "status": "FINISH", "count": 1 }
For details, see Abnormal Request Results.
For details, see Status Codes.
For details, see Error Codes.