Updated on 2023-12-13 GMT+08:00

Querying DCS Instance Restoration Records

Function

This API is used to query the restoration records of a specified DCS instance.

URI

GET /v1.0/{project_id}/instances/{instance_id}/restores?start={start}&limit={limit}&beginTime={beginTime}&endTime={endTime}

Table 1 describes the parameters.
Table 1 Parameter description

Parameter

Type

Mandatory

Description

project_id

String

Yes

Project ID. For details on how to obtain the value of this parameter, see Obtaining a Project ID.

instance_id

String

Yes

DCS instance ID.

start

Integer

No

Start sequence number of the restoration record to be queried. By default, this parameter is set to 1.

limit

Integer

No

Number of restoration records displayed on each page. The minimum value of this parameter is 1. If this parameter is not specified, 10 restoration records are displayed on each page by default.

beginTime

String

No

Start time of the period to be queried. Format: yyyyMMddHHmmss, for example, 20170718235959.

endTime

String

No

End time of the period to be queried. Format: yyyyMMddHHmmss, for example, 20170718235959.

Request

Request parameters

None

Example request

GET https://{dcs_endpoint}/v1.0/{project_id}/instances/{instance_id}/restores?start={start}&limit={limit}&beginTime={beginTime}&endTime={endTime}

Response

Response parameters

Table 2 describes the response parameters.
Table 2 Parameter description

Parameter

Type

Description

restore_record_response

Array

Array of the restoration records.

total_num

Integer

Number of obtained backup records.

Table 3 restore_record_response parameter description

Parameter

Type

Description

status

String

Restoration status

  • waiting: DCS instance restoration is waiting to begin.
  • restoring: DCS instance restoration is in progress.
  • succeed: DCS instance restoration succeeded.
  • failed: DCS instance restoration failed.

progress

String

Restoration progress

restore_id

String

ID of the restoration record

backup_id

String

ID of the backup record

restore_remark

String

Description of DCS instance restoration

backup_remark

String

Description of DCS instance backup

created_at

String

Time at which the restoration task is created

updated_at

String

Time at which DCS instance restoration completed

restore_name

String

Name of the restoration record

backup_name

String

Name of the backup record

error_code

String

Error code returned if DCS instance restoration fails. For details about error codes, see Table 4.

Example response
{
    "restore_record_response": [
        {
            "status": "succeed",
            "progress": "100.00",
            "restore_id": "a6155972-800c-4170-a479-3231e907d2f6",
            "backup_id": "f4823e9e-fe9b-4ffd-be79-4e5d6de272bb",
            "restore_remark": "doctest",
            "backup_remark": null,
            "created_at": "2017-07-18T21:41:20.721Z",
            "updated_at": "2017-07-18T21:41:35.182Z",
            "restore_name": "restore_20170718214120",
            "backup_name": "backup_20170718000002",
            "sourceInstanceId":"dcb96c22-fd6f-41c0-88b5-544784558dd9",
            "sourceInstanceName":"Test-DCS-MS-3-f79a983f",
            "error_code": null
        }
    ],
    "total_num": 1
}

Status Code

Table 4 describes the status code of successful operations. For details about other status codes, see Table 1.

Table 4 Status code

Status Code

Description

200

DCS instance restoration record queried successfully.