Help Center/ Relational Database Service/ API Reference/ Historical APIs/ API v3/ Shrinking Database Logs (Not Recommended)
Updated on 2025-12-09 GMT+08:00

Shrinking Database Logs (Not Recommended)

Function

This API is used to shrink database logs of an RDS for SQL Server instance.

This API is out-of-date and may no longer be maintained in the future. You are advised to switch workloads to the new API (Shrinking Database Logs (RDS for SQL Server)).

URI

  • URI format

    POST /v3/{project_id}/instances/{instance_id}/db_shrink

  • Parameter description
    Table 1 Parameters

    Parameter

    Mandatory

    Description

    project_id

    Yes

    Project ID of a tenant in a region.

    To obtain the value, see Obtaining a Project ID.

    instance_id

    Yes

    Instance ID.

Request

Table 2 Parameters

Parameter

Mandatory

Type

Description

db_name

Yes

String

Database name.

Example Request

Shrinking database logs

POST https://{endpoint}/v3/0483b6b16e954cb88930a360d2c4e663/instances/161e33e453954e21acfff65bfa3dbfebin04/db_shrink
{
    "db_name": "test1"
}

Response

  • Normal response
    Table 3 Parameters

    Parameter

    Type

    Description

    resp

    String

    Returns successful if the invoking is successful, or returns failed if the invoking fails.

Status Code

Error Code

For details, see Error Codes.