Help Center/ Relational Database Service/ API Reference/ API v3 (Recommended)/ Backup and Restoration/ Querying Databases That Can Be Restored to a Specified Point in Time
Updated on 2026-02-04 GMT+08:00

Querying Databases That Can Be Restored to a Specified Point in Time

Function

This API is used to query databases that can be restored to a specified point in time.

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:backup:list

list

-

-

-

-

Constraints

This API is only available to RDS for MySQL and RDS for PostgreSQL.

URI

  • URI format

    POST /v3/{project_id}/{engine}/instances/history/databases

  • Parameter description
    Table 1 Parameters

    Parameter

    Mandatory

    Description

    project_id

    Yes

    Definition

    Project ID of a tenant in a region.

    Constraints

    The value cannot be empty.

    Range

    To obtain the value, see Obtaining a Project ID.

    Default Value

    N/A

    engine

    Yes

    Definition

    DB engine.

    Constraints

    N/A

    Range

    The value can be mysql or postgresql (case-insensitive).

    Default Value

    N/A

Request

Table 2 Parameters

Parameter

Mandatory

Type

Description

instance_ids

Yes

Array of strings

Definition

Instance IDs.

Constraints

N/A

Range

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

Default Value

N/A

restore_time

Yes

Long

Definition

Restoration time point. A timestamp in milliseconds is used.

Constraints

N/A

Range

N/A

Default Value

N/A

database_name_like

No

String

Definition

Database name, which can be used for fuzzy query. The database name cannot contain Chinese characters.

Constraints

N/A

Range

N/A

Default Value

N/A

instance_name_like

No

String

Definition

Instance name, which can be used for fuzzy query.

Constraints

N/A

Range

N/A

Default Value

N/A

Example Request

Query the databases that can be restored to a specified point in time of an RDS for MySQL instance.

 {
   "instance_ids" : [ "5d742eda6e574ff3a003191638ef8c51in01" ],  
   "restore_time" : 1688554422000,  
   "database_name_like" : "",  
   "instance_name_like" : ""  
}

Response

  • Normal response
    Table 3 Parameters

    Parameter

    Type

    Description

    database_limit

    Integer

    Definition

    Maximum number of databases that can be restored for a single instance. If the number of databases queried exceeds this limit, only the databases within this limit are returned in the response.

    Range

    N/A

    table_limit

    Integer

    Definition

    Maximum number of tables in all databases that can be restored for a single instance. If the number of tables queried exceeds this limit, only the databases whose total number of tables is within this limit are returned in the response.

    Range

    N/A

    instances

    Array of objects

    Definition

    Instance information. For details, see Table 4.

    Table 4 Data structure of the instances field

    Parameter

    Type

    Description

    id

    String

    Definition

    Instance ID.

    Range

    N/A

    name

    String

    Definition

    Instance name.

    Range

    N/A

    total_tables

    Integer

    Definition

    Total number of tables in all restorable databases of the instance. This value cannot exceed the value of table_limit.

    Range

    N/A

    databases

    Array of objects

    Definition

    Database information. For details, see Table 5.

    Table 5 Data structure of the databases field

    Parameter

    Type

    Description

    name

    String

    Definition

    Database name.

    Range

    N/A

    total_tables

    Integer

    Definition

    Total number of tables in the database. This value cannot exceed the value of table_limit.

    Range

    N/A

  • Example normal response

    Querying databases that can be restored to a specified point in time:

    {
        "instances": [
            {
                "id": "5d742eda6e574ff3a003191638ef8c51in01",
                "name": "AUTO-GENERATED-INSTANCE-57-HA-LOCALSSD",
                "databases": [
                    {
                        "name": "dbtest",
                        "total_tables": 1
                    },
                    {
                        "name": "dbtest_restore",
                        "total_tables": 1
                    }
                ],
                "total_tables": 2
            }
        ],
        "database_limit": 2000,
        "table_limit": 20000
    }
  • Abnormal response

    For details, see Abnormal Request Results.

Status Code

Error Code

For details, see Error Codes.