Updated on 2024-09-04 GMT+08:00

Querying the Restoration Time Range

Function

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

If the backup retention period has been set to a long period, you are advised to set the query date by referring to Table 1.

URI

  • URI format

    GET /v3/{project_id}/instances/{instance_id}/restore-time?date=2020-12-26

  • Parameter description
    Table 1 Parameters

    Parameter

    Mandatory

    Type

    Description

    project_id

    Yes

    String

    Explanation:

    Project ID of a tenant in a region.

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

    Constraints:

    N/A

    Value range:

    N/A

    Default value:

    N/A

    instance_id

    Yes

    String

    Explanation:

    Instance ID.

    Constraints:

    N/A

    Value range:

    N/A

    Default value:

    N/A

    date

    No

    String

    Explanation:

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

    Constraints:

    N/A

    Value range:

    N/A

    Default value:

    N/A

Request

  • Request parameters

    None

  • URI example
    • Query all restoration time ranges of an instance.
      GET https://{endpoint}/v3/0483b6b16e954cb88930a360d2c4e663/instances/dsfae23fsfdsae3435in01/restore-time
    • Query the restoration time range based on a specified date.
      GET https://{endpoint}/v3/0483b6b16e954cb88930a360d2c4e663/instances/dsfae23fsfdsae3435in01/restore-time?date=2020-12-26

Response

  • Normal response
    Table 2 Parameters

    Parameter

    Type

    Description

    restore_time

    Array of objects

    Explanation:

    Restoration time ranges. For details, see Table 3.

    Table 3 restore_time field data structure description

    Parameter

    Type

    Description

    start_time

    Integer

    Explanation:

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

    Value range:

    N/A

    end_time

    Integer

    Explanation:

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

    Value range:

    N/A

  • Example normal response
    { 
    	"restore_time": [ 
    		{ 
    			"start_time": 1532001446987, 
    			"end_time": 1532742139000 
    		} 
    	] 
    }
  • Abnormal response

    For details, see Abnormal Request Results.

Status Code