Help Center/ Document Database Service/ API Reference/ APIs V3.0 (Recommended)/ Backup and Restoration/ Obtaining the List of Databases That Can Be Restored
Updated on 2025-10-24 GMT+08:00

Obtaining the List of Databases That Can Be Restored

Function

This API is used to obtain the list of databases that can be restored.

Constraints

This API applies only to replica sets.

URI

  • URI format

    GET /v3/{project_id}/instances/{instance_id}/restore-database

  • URI example

    https://dds.ap-southeast-1.myhuaweicloud.com/v3/056538411200d4cd2f79c003c7606412/instances/d5833c2854a4486cb7960f829269e211in02/restore-database?restore_time=1607689584000&limit=10&offset=1

Table 1 Path parameters

Name

Mandatory

Type

Description

project_id

Yes

String

Definition

Project ID. To obtain the project ID, see Obtaining a Project ID.

Constraints

N/A

Range

N/A

Default Value

N/A

instance_id

Yes

String

Definition

Instance ID, which can be obtained by calling the API described in Querying Instances and Details. If you do not have an instance, call the API described in Creating a DB Instance to create one.

Constraints

N/A

Range

N/A

Default Value

N/A

Table 2 Query parameters

Name

Mandatory

Type

Description

restore_time

Yes

String

Definition

Restoration time point.

The value is a UNIX timestamp, in milliseconds. The time zone is UTC.

Constraints

N/A

Range

N/A

Default Value

N/A

offset

No

Integer

Definition

Index offset.

Constraints

The value must be greater than or equal to 0.

Range

N/A

Default Value

0. The query offset is 0 by default.

limit

No

Integer

Definition

Maximum records to be queried.

Constraints

N/A

Range

1100

Default Value

100: 100 instances are queried by default.

Request Parameters

Table 3 Request header parameters

Name

Mandatory

Type

Description

X-Auth-Token

Yes

String

Definition

User token obtained from IAM. For details, see Authentication.

Constraints

N/A

Range

N/A

Default Value

N/A

Response Parameters

Table 4 Parameter description

Name

Mandatory

Type

Description

databases

Yes

Array of String

Definition

Indicates the database list. Each element in the list indicates a database.

Range

N/A

total_count

Yes

Integer

Definition

Indicates the total number of databases.

Range

N/A

Example Requests

GET https://{endpoint}/v3/056538411200d4cd2f79c003c7606412/instances/d5833c2854a4486cb7960f829269e211in02/restore-database?restore_time=1607689584000&limit=10&offset=1

Example Responses

{
  "databases": [
    "test_db"
  ],
  "total_count": 1
}

Status Code

For more information, see Status Code.

Error Code

For more information, see Error Code.