Help Center/ Relational Database Service/ API Reference/ API v3/ Log Information Queries/ Obtaining Links for Downloading Extended Logs (RDS for SQL Server)
Updated on 2026-08-25 GMT+08:00

Obtaining Links for Downloading Extended Logs (RDS for SQL Server)

Function

This API is used to obtain links for downloading extended logs.

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

Dependencies

rds:log:download

read

instance

- g:EnterpriseProjectId

- g:ResourceTag/<tag-key>

-

-

Constraints

This API is supported only for RDS for SQL Server.

URI

  • URI format

    POST /v3/{project_id}/instances/{instance_id}/xellog-download

  • Parameter description
    Table 1 Parameters

    Parameter

    Mandatory

    Description

    project_id

    Yes

    Definition

    Project ID of a tenant in a region.

    To obtain the value, see Obtaining a Project ID.

    Constraints

    N/A

    Range

    N/A

    Default Value

    N/A

    instance_id

    Yes

    Definition

    Instance ID.

    You can obtain the value of this parameter from id in Table 4 by calling the API for querying DB instances.

    Constraints

    N/A

    Range

    N/A

    Default Value

    N/A

Request

Table 2 Parameters

Parameter

Mandatory

Type

Description

file_name

Yes

String

Definition

Name of the file to be downloaded.

Constraints

N/A

Range

The value cannot be null or empty. It can contain only uppercase letters, lowercase letters, digits, and underscores (_) and ends with .xel.

You can obtain the file name from Querying Extended Logs (RDS for SQL Server).

Default Value

N/A

Example Request

Obtain links for downloading extended logs.

POST https://{endpoint}/v3/0483b6b16e954cb88930a360d2c4e663/instances/cee5265e1e5845649e354841234567dfin01/xellog-download

{
	"file_name":"sqlserver_xellog_name.xel"
}

Response

  • Normal response
    Table 3 Parameters

    Parameter

    Type

    Description

    list

    List

    Definition

    List of links for downloading extended logs. For details, see Table 4.

    count

    Integer

    Definition

    Number of extended log links.

    Range

    N/A

    Table 4 linkInfo field data structure description

    Parameter

    Type

    Description

    file_name

    String

    Definition

    Name of the generated file for downloading.

    Range

    N/A

    status

    String

    Definition

    Generation status of the link.

    Range

    • FINISH: The download link has been generated.
    • EXPORTING: The file is being generated.
    • FAILED: The log file fails to be prepared.

    file_size

    String

    Definition

    File size in KB.

    Range

    N/A

    file_link

    String

    Definition

    Download link.

    Range

    If the link generation status is EXPORTING or FAILED, no value is returned.

    create_at

    String

    Definition

    Generation time.

    Range

    N/A

    update_at

    String

    Definition

    Update time.

    Range

    N/A

  • Example normal response
    Generating links for downloading extended logs
    {
        "list": [
            {
                "file_name": "HkEngineEventFile_0_133337769850300000.xel",
                "status": "EXPORTING",
                "file_size": "0",
                "create_at": "2023-08-14T03:35:24+0000",
                "update_at": "2023-08-14T03:35:24+0000"
            }
        ],
        "count": 1
    }
    Links for downloading extended logs obtained successfully
    {
        "list": [
            {
                "file_name": "HkEngineEventFile_0_133337769850300000.xel",
                "status": "SUCCESS",
                "file_size": "0",
                "file_link": "https://obs.xxx:443/xxx-7a95af72c4d54a31ae0663263f0e35ea/6e22b18b43a74e4486264194f6e09f66_EL_HkEngineEventFile_0_133337769850300000.xel?xxx",
                "create_at": "2023-08-14T03:35:41+0000",
                "update_at": "2023-08-14T03:35:41+0000"
            }
        ],
        "count": 1
    }
  • Abnormal response

    For details, see Abnormal Response Results.

Status Code

Error Code

For details, see Error Codes.