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

Querying Extended Logs (RDS for SQL Server)

Function

This API is used to query extended logs of a DB instance.

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:getErrorLogs

list

instance

- g:EnterpriseProjectId

- g:ResourceTag/<tag-key>

-

-

Constraints

This API is supported only for RDS for SQL Server.

URI

  • URI format

    GET /v3/{project_id}/instances/{instance_id}/xellog-files

  • 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

    offset

    No

    Definition

    Index offset. The query starts from the next piece of data indexed by this parameter.

    Constraints

    N/A

    Range

    The value must be a non-negative number.

    Default Value

    0: The query starts from the first data record.

    limit

    No

    Definition

    Number of records (query results) displayed on each page.

    Constraints

    N/A

    Range

    An integer ranging from 1 to 100

    Default Value

    10

Request

  • Request parameters

    None

  • URI example

    GET https://{endpoint}/v3/0483b6b16e954cb88930a360d2c4e663/instances/cee5265e1e5845649e354841234567dfin01/xellog-files

Response

  • Normal response
    Table 2 Parameters

    Parameter

    Type

    Description

    list

    Array of objects

    Definition

    Extended log file information. For details, see Table 3.

    count

    Integer

    Definition

    Total number of files.

    Range

    N/A

    Table 3 SlowLogFile field data structure description

    Parameter

    Type

    Description

    file_name

    String

    Definition

    File name.

    Range

    N/A

    file_size

    String

    Definition

    File size in KB.

    Range

    N/A

  • Example normal response
    { 
      "list" : [ { 
        "file_name" : "SQLTrace.xel", 
        "file_size" : "1024" 
      }, { 
        "file_name" : "SQLTrace2.xel", 
        "file_size" : "1024" 
      } ], 
      "count" : 2 
    }
  • Abnormal response

    For details, see Abnormal Response Results.

Status Code

Error Code

For details, see Error Codes.