Restoring Tables to a Specified Point in Time (RDS for PostgreSQL)
Function
This API is used to restore tables of a DB instance to a 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
- 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
Request
- Parameter description
Table 2 Parameters Parameter
Mandatory
Type
Description
instances
No
Array of objects
Definition
Table information. For details, see Table 3.
Constraints
N/A
Table 3 Data structure of the instances field Parameter
Mandatory
Type
Description
restore_time
No
Long
Definition
Point in time to which the tables are restored.
Constraints
N/A
Range
N/A
Default Value
N/A
instance_id
No
String
Definition
Instance ID.
Constraints
N/A
Range
You can obtain the value of this parameter from id in Table 4 by calling the API for querying tables that can be restored to a specified point in time.
Default Value
N/A
databases
No
Array of objects
Definition
Database information. For details, see Table 4.
Constraints
N/A
Table 4 Data structure of the databases field Parameter
Mandatory
Type
Description
database
No
String
Definition
Database name.
Constraints
N/A
Range
You can obtain the value of this parameter from name in Table 5 by calling the API for querying tables that can be restored to a specified point in time.
Default Value
N/A
schemas
No
Array of objects
Definition
Schema information. For details, see Table 5.
Constraints
N/A
Table 5 Data structure of the schemas field Parameter
Mandatory
Type
Description
schema
No
String
Definition
Schema information.
Constraints
N/A
Range
You can obtain the value of this parameter from name in Table 6 by calling the API for querying tables that can be restored to a specified point in time.
Default Value
N/A
tables
No
Array of objects
Definition
Table information. For details, see Table 6.
Constraints
N/A
Table 6 Data structure of the tables field Parameter
Mandatory
Type
Description
old_name
No
String
Definition
Original table name before the restoration.
Constraints
N/A
Range
You can obtain the value of this parameter from name in Table 7 by calling the API for querying tables that can be restored to a specified point in time.
Default Value
N/A
new_name
No
String
Definition
Table name after the restoration.
Constraints
N/A
Range
N/A
Default Value
N/A
- Example request
POST https://{endpoint}/v3/0483b6b16e954cb88930a360d2c4e663/instances/batch/restore/tables { "instances": [{ "restore_time": 1688556737000, "instance_id": "df29b535eec64ee1b286bd2c62871a9cin03", "databases": [{ "database": "data1", "schemas": [{ "schema": "schema1", "tables": [{ "old_name": "table1", "new_name": "table1_1688556737000" }] }], }] }] }
Response
- Normal response
Table 7 Parameters Parameter
Type
Description
restore_result
Array of objects
Definition
Table information. For details, see Table 8.
- Example normal response
{ "restore_result" : [ { "instance_id" : "df29b535eec64ee1b286bd2c62871a9cin03", "job_id" : "749d6254-f4f0-4f72-aa32-876e220d2496" } ] } - 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