Updated on 2023-11-24 GMT+08:00

Querying the Restoration Time Ranges

Description

This API is used to query the restoration time range of a DB instance.

Restrictions

Currently, this API only supports replica set instances and cluster instances 4.0.

URI

  • URI format

    GET https://{Endpoint}/v3/{project_id}/instances/{instance_id}/restore-time

  • URI example

    https://dds.ap-southeast-1.myhuaweicloud.com/v3/056538411200d4cd2f79c003c7606412/instances/d5833c2854a4486cb7960f829269e211in02/restore-time?date=2020-12-12

Requests

Parameter description

Table 1 Request parameters

Name

Type

IN

Mandatory

Description

X-Auth-Token

string

header

Yes

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

Content-Type

string

header

Yes

MIME type of the request body. You are advised to use the default value application/json. For APIs used to upload objects or images, the value can vary depending on the flow type.

X-Language

string

header

No

Language

project_id

string

path

Yes

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

instance_id

String

path

Yes

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.

date

string

query

Yes

The date to be queried. The value is in the yyyy-mm-dd format, and the time zone is UTC.

Responses

  • Parameter description
    Table 2 Parameter description

    Name

    Type

    Mandatory

    Description

    restore_time

    Array of objects

    Yes

    The restoration time ranges. For details, see Table 3.

    Table 3 restore_time description

    Name

    Type

    Mandatory

    Description

    start_time

    Long

    Yes

    The start time of the restoration time range in the UNIX timestamp format. The unit is millisecond and the time zone is UTC.

    end_time

    Long

    Yes

    The end time of the restoration time range in the UNIX timestamp format. The unit is millisecond and the time zone is UTC.

  • Response example
    {
      "restore_time": [
        {
          "start_time": 1607731200000,
          "end_time": 1607756414000
        },
        {
          "start_time": 1607756825000,
          "end_time": 1607761999000
        },
        {
          "start_time": 1607762943000,
          "end_time": 1607817599000
        }
      ]
    }

SDK

Click Document Database Service DDS SDK to download the SDK or view the SDK document. To learn how to install and authenticate an SDK, read the Usage section.

Status Code

For more information, see Status Code.

Error Code

For more information, see Error Code.