Help Center/ GaussDB/ API Reference/ APIs (Recommended)/ Log Management/ Querying Downloaded Slow Query Log Information
Updated on 2025-08-11 GMT+08:00

Querying Downloaded Slow Query Log Information

Function

This API is used to query downloaded slow query log information. Before calling this API:

URI

GET /v3/{project_id}/instances/{instance_id}/slow-log/download

Table 1 URI parameters

Parameter

Mandatory

Type

Description

project_id

Yes

String

Definition

Project ID of a tenant in a region.

To obtain the value, see Obtaining a Project ID.

Constraints

N/A

Range

The value can contain 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 can contain 36 characters. Only letters and digits are allowed.

Default Value

N/A

Request Parameters

None

Response Parameters

Table 2 Response body parameters

Parameter

Type

Description

list

Array of SlowLogDownloadInfo objects

Definition

Downloaded slow query log information. For details, see Table 3.

Table 3 SlowLogDownloadInfo field data structure description

Parameter

Type

Description

id

String

Definition

Slow query log ID.

Range

N/A

instance_id

String

Definition

Instance ID.

Range

N/A

node_id

String

Definition

Node ID.

Range

N/A

workflow_id

String

Definition

Workflow ID.

Range

N/A

file_name

String

Definition

File name.

Range

N/A

file_size

String

Definition

File size in bytes.

Range

N/A

file_link

String

Definition

Link for downloading the file.

Range

N/A

bucket_name

String

Definition

Bucket name

Range

N/A

created_at

Long

Definition

Creation time.

Range

N/A

updated_at

Long

Definition

Update time.

Range

N/A

version

String

Definition

Version.

Range

N/A

status

String

Definition

Status.

Range

N/A

message

String

Definition

Message.

Range

N/A

Example Request

GET https://gaussdb-opengauss.ap-southeast-1.myhuaweicloud.com/v3/0483b6b16e954cb88930a360d2c4e663/instances/cc6fd964d93f4003851dfc29d57d30a5in14/slow-log/download

Example Response

{ 
  "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" : "success", 
    "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" : "success", 
    "message" : null 
  } ] 
}

Status Codes

Error Codes

For details, see Error Codes.