Updated on 2022-12-08 GMT+08:00

Obtaining Links for Downloading Slow Query Logs

Function

This API is used to obtain links for downloading slow query logs.

URI

  • URI format

    POST https://{Endpoint}/v3/{project_id}/instances/{instance_id}/slowlog-download

  • Example

    https://rds.my-kualalumpur-1.alphaedge.tmone.com.my/v3/0483b6b16e954cb88930a360d2c4e663/instances/cee5265e1e5845649e354841234567dfin01/slowlog-download

  • Parameter description
    Table 1 Parameter description

    Name

    Mandatory

    Description

    project_id

    Yes

    Specifies the 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

    Specifies the ID of the DB instance to be queried.

Request

  • Parameter description
    Table 2 Parameter description

    Name

    Mandatory

    Type

    Description

    request_id

    Yes

    String

    Specifies the request ID in UUID format for obtaining slow query logs.

    file_name

    No

    String

    Specifies the name of the file to be downloaded.

    This parameter is mandatory when the DB engine is SQL Server.

  • Request example
    {
    	"request_id":"6e0e7ee2-a3b5-4bc1-a5a8-cb2987ac4771",
    	"file_name":"sqlserver_slowlog_name"
    }

Response

  • Normal response
    Table 3 Parameter description

    Name

    Type

    Description

    list

    List

    Indicates the links for downloading slow query logs. For details, see Table 4.

    status

    String

    Indicates the status of generating links for downloading slow query logs.

    • FINISH: The download link has been generated.
    • CREATING: A file is being generated and the download link is to be prepared.
    • FAILED: Log files fail to be prepared.

    count

    Integer

    Indicates the number of links for downloading slow query logs.

    Table 4 linkInfo field data structure description

    Name

    Type

    Description

    workflow_id

    String

    Indicates the task ID.

    file_name

    String

    Indicates the name of the generated file for downloading slow query logs.

    status

    String

    Indicates the generation status of the current link.

    file_size

    String

    Indicates the file size.

    file_link

    String

    Indicates the download link.

    create_at

    Long

    Indicates the generation time.

    update_at

    Long

    Indicates the update time.

Status Code

For details, see Status Codes.

Error Code

For details, see Error Codes.