Updated on 2024-08-28 GMT+08:00

Querying Extended Logs (RDS for SQL Server)

Function

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

  • Before calling an API, you need to understand the API in Authentication.

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

    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

    ID of the instance to be queried.

    offset

    No

    Index offset.

    If offset is set to N, the resource query starts from the N+1 piece of data. The value is 0 by default, indicating that the query starts from the first piece of data. The value must be a number but cannot be a negative number.

    limit

    No

    Number of records on each page. Its value ranges from 1 to 100. The default value is 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

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

    count

    Integer

    Total number of files.

    Table 3 SlowLogFile field data structure description

    Parameter

    Type

    Description

    file_name

    String

    File name.

    file_size

    String

    File size in KB.

  • 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 Request Results.

Status Code

Error Code

For details, see Error Codes.