Querying the Restoration Time Ranges

Function

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

Constraints

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?date={yyyy-mm-dd}

  • Parameter description

    Table 1 Parameter description

    Name

    Mandatory

    Description

    project_id

    Yes

    Specifies the project ID of a tenant in a region.

    instance_id

    Yes

    Specifies the instance ID, which can be obtained by calling the API for querying instances. If you do not have an instance, you can call the API used for creating an instance.

    date

    Yes

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

Requests

Responses

  • Parameter description

    Table 2 Parameter description

    Name

    Type

    Description

    restore_time

    Array of objects

    Indicates the restoration time ranges. For details, see Table 3.

    Table 3 restore_time parameters

    Name

    Type

    Description

    start_time

    Long

    Indicates 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

    Indicates 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
        }
      ]
    }
    

Status Code

Status Code:200.

For more information, see Status Code.

Error Code

For more information, see Error Code.