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
|
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 |
|
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 1–100 Default Value 100: 100 instances are queried by default. |
Request 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
|
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.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.