Help Center/ Relational Database Service/ API Reference/ API v3 (Recommended)/ Backup and Restoration/ Querying Tables That Can Be Restored to a Specified Point in Time (RDS for PostgreSQL)
Updated on 2024-08-28 GMT+08:00

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 an API, you need to understand the API in Authentication.

URI

  • URI format

    POST /v3/{project_id}/{database_name}/instances/history/tables

  • Parameter description
    Table 1 Parameters

    Parameter

    Mandatory

    Description

    project_id

    Yes

    Project ID of a tenant in a region.

    For details about how to obtain the project ID, see Obtaining a Project ID.

    database_name

    Yes

    DB engine. The value is postgresql (case-insensitive).

Request

  • Parameter description
    Table 2 Parameters

    Parameter

    Mandatory

    Type

    Description

    instance_ids

    Yes

    Array of strings

    Instance IDs.

    restore_time

    Yes

    Long

    Restoration time point.

    database_name_like

    No

    String

    Database name, which can be used for fuzzy search.

    table_name_like

    No

    String

    Table name, which can be used for fuzzy search.

    instance_name_like

    No

    String

    Instance name, which can be used for fuzzy search.

  • 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

    Maximum number of tables that can be restored.

    instances

    Array of objects

    Instance information. For details, see Table 4.

    Table 4 Data structure of the instances field

    Parameter

    Type

    Description

    id

    String

    Instance ID.

    name

    String

    Instance name.

    total_tables

    Integer

    Number of tables that can be restored.

    databases

    Array of objects

    Database information. For details, see Table 5.

    Table 5 Data structure of the databases field

    Parameter

    Type

    Description

    name

    String

    Database name.

    total_tables

    Integer

    Number of tables that can be restored.

    schemas

    Array of objects

    Schema information. For details, see Table 6.

    Table 6 Data structure of the schemas field

    Parameter

    Type

    Description

    name

    String

    Schema name.

    total_tables

    Integer

    Number of tables that can be restored.

    tables

    Array of objects

    Table information. For details, see Table 7.

    Table 7 Data structure of the tables field

    Parameter

    Type

    Description

    name

    String

    Table name.

  • 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

Error Code

For details, see Error Codes.