Querying Tables That Can Be Restored to a Specified Point in Time (RDS for PostgreSQL)
Function
This API is used to query tables that can be restored to a specified point in time.
- Before calling this API, learn how to authenticate it.
- Before calling this API, learn about the request header parameters.
Authorization Information
- 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, no identity policy-based permissions are required for calling this API.
URI
- URI format
POST /v3/{project_id}/{database_name}/instances/history/tables
- 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
database_name
Yes
Definition
DB engine.
Constraints
N/A
Range
The value is postgresql (case-insensitive).
Default Value
N/A
Request
- Parameter description
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.
Constraints
N/A
Range
N/A
Default Value
N/A
database_name_like
No
String
Definition
Database name, which can be used for fuzzy search.
Constraints
N/A
Range
N/A
Default Value
N/A
table_name_like
No
String
Definition
Table name, which can be used for fuzzy search.
Constraints
N/A
Range
N/A
Default Value
N/A
instance_name_like
No
String
Definition
Instance name, which can be used for fuzzy search.
Constraints
N/A
Range
N/A
Default Value
N/A
- Example request
POST https://{endpoint}/v3/4879de6859e345c780f1a22d8bc6f229/postgresql/instances/history/tables { "instance_ids" : [ "f9e0b25a7b984a5cb193bebc98029914in03" ], "restore_time" : 1688554112000, "database_name_like" : "", "table_name_like" : "", "instance_name_like" : "" }
Response
- Normal response
Table 3 Parameters Parameter
Type
Description
table_limit
Integer
Definition
Maximum number of tables that can be restored.
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
Number of tables that can be restored.
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
Number of tables that can be restored.
Range
N/A
schemas
Array of objects
Definition
Schema information. For details, see Table 6.
Table 6 Data structure of the schemas field Parameter
Type
Description
name
String
Definition
Schema name.
Range
N/A
total_tables
Integer
Definition
Number of tables that can be restored.
Range
N/A
tables
Array of objects
Definition
Table information. For details, see Table 7.
- Example normal response
{ "instances" : [ { "id" : "70f639ffa8e343e1b7797c1705d4fe71in03", "name" : "rds-e1c8", "databases" : [ { "name" : "db1", "schemas" : [ { "name" : "public", "tables" : [ { "name" : "tb1" } ], "total_tables" : 1 }, { "name" : "schema1", "tables" : [ { "name" : "tb1" } ], "total_tables" : 1 } ], "total_tables" : 2 } ], "total_tables" : 2 } ], "table_limit" : 2000 } - Abnormal response
For details, see Abnormal Request Results.
Status Code
- Normal
- Abnormal
For details, see Status Codes.
Error Code
For details, see Error Codes.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot