Help Center/ TaurusDB/ API Reference/ APIs (Recommended)/ Log Management/ Obtaining Links for Downloading DDL Logs
Updated on 2026-06-12 GMT+08:00

Obtaining Links for Downloading DDL Logs

Function

This API is used to obtain links for downloading DDL logs of a specified instance. Before calling this API:

Calling Method

For details, see Calling APIs.

Authorization Information

Each account has all the permissions required to call all APIs, but IAM users must be assigned the required permissions.

  • If you are using role/policy-based authorization, see Permissions and Supported Actions for details on the required permissions.
  • If you are using identity policy-based authorization, the following identity policy-based permissions are required.

    Action

    Access Level

    Resource Type (*: required)

    Condition Key

    Alias

    Dependency

    gaussdbformysql:log:download

    Write

    instance *

    • g:EnterpriseProjectId

    • g:ResourceTag/<tag-key>

    gaussdb:log:download

    -

URI

POST /v3/{project_id}/instances/{instance_id}/ddl-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 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.

To obtain this value, see Querying DB Instances.

Constraints

N/A

Range

The value contains 36 characters. Only letters, digits, and underscores (_) are allowed.

Default Value

N/A

Request Parameters

Table 2 Request header 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

  • en-us: English

  • zh-cn: Chinese

Default Value

en-us

Table 3 Request body parameter

Parameter

Mandatory

Type

Description

log_ids

Yes

Array of strings

Definition

List of DDL log file IDs.

To obtain this value, see Querying DDL Logs That Can Be Downloaded.

Constraints

A maximum of 10 IDs are allowed.

Response Parameters

Status code: 200

Table 4 Response body parameter

Parameter

Type

Description

list

Array of DownLoadFileInfoItem objects

Definition

Details about the download link of each log file.

Table 5 DownLoadFileInfoItem

Parameter

Type

Description

id

String

Definition

Log file ID.

Range

N/A

file_name

String

Definition

Log file name.

Range

N/A

file_size

Integer

Definition

Log file size, in bytes.

Range

N/A

download_url

String

Definition

Link for downloading the log file.

Range

N/A

expire_time

String

Definition

Link expiration time, in yyyy-MM-dd HH:mm:ss format.

Range

N/A

Status code: 400

Table 6 Response body parameters

Parameter

Type

Description

error_code

String

Error code.

error_msg

String

Error message.

Status code: 500

Table 7 Response body parameters

Parameter

Type

Description

error_code

String

Error code.

error_msg

String

Error message.

Example Request

Obtaining links for downloading DDL logs

POST https://{endpoint}/v3/619d3e78f61b4be68bc5aa0b59edcf7b/instances/7e8dfe8f580043d4a424f65b51c0e1f0in07/ddl-log/download

{
  "log_ids" : [ "3541f39c185et4591ac5f602f60b28622br07" ]
}

Example Response

Status code: 200

Success.

[ {
  "download_url" : "https://dbs-0-cn-southwest-244-*************-common.***.********.**********.huawei.com:443/**************_7e8dfe8f580043d4a424f65b51c0e1f0in07/20260325/OmaLog/20260325190036_OmaLog?AWSAccessKeyId=****************&Expires=1774533318&response-cache-control=no-cache%2Cno-store&Signature=*************",
  "file_name" : "20260326090259_OmaLog",
  "file_size" : 1024000,
  "expire_time" : "2026-03-26 12:00:00"
} ]

Status Code

For details, see Status Codes.

Error Code

For details, see Error Codes.