tencent cloud

DescribeRestoreTask
Last updated: 2025-10-28 22:48:53
DescribeRestoreTask
Last updated: 2025-10-28 22:48:53

1. API Description

Domain name for API request: sqlserver.intl.tencentcloudapi.com.

This API is used to query the list of rollback tasks.

A maximum of 20 requests can be initiated per second for this API.

We recommend you to use API Explorer
Try it
API Explorer provides a range of capabilities, including online call, signature authentication, SDK code generation, and API quick search. It enables you to view the request, response, and auto-generated examples.

2. Input Parameters

The following request parameter list only provides API request parameters and some common parameters. For the complete common parameter list, see Common Request Parameters.

Parameter Name Required Type Description
Action Yes String Common Params. The value used for this API: DescribeRestoreTask.
Version Yes String Common Params. The value used for this API: 2018-03-28.
Region Yes String Common Params. For more information, please see the list of regions supported by the product. This API only supports: ap-bangkok, ap-beijing, ap-chengdu, ap-chongqing, ap-guangzhou, ap-hongkong, ap-jakarta, ap-nanjing, ap-seoul, ap-shanghai, ap-shanghai-fsi, ap-shenzhen-fsi, ap-singapore, ap-tokyo, eu-frankfurt, na-ashburn, na-siliconvalley, sa-saopaulo.
InstanceId Yes String Source Instance ID.
StartTime Yes String Start time.
EndTime Yes String End time.
RestoreType No Integer Rollback method. 0 - roll back by time point; 1 - roll back by backup set.
TargetRegion No String Region where the target instance is located for rollback.
TargetType No Integer Type of the target instance for rollback. 0 - current instance; 1 - existing instance; 2 - new instance.
Status No Integer Rollback status, 0: initialized; 1: running; 2: successful; 3: failed.
Offset No Integer The number of returned entries per page in pagination mode. Value range: 1-100. The default value is 20.
Limit No Integer Page number in pagination mode. The default value is 0.
OrderBy No String Sorting field. restoreTime - rollback time; startTime-task start time; endTime-task end time. By default, the results are sorted in descending order by task start time.
OrderByType No String Sorting rule. desc - descending order; asc - ascending order. The default value is desc.
FlowId No Integer Asynchronous rollback task ID.

3. Output Parameters

Parameter Name Type Description
TotalCount Integer Total number of rollback tasks.
Tasks Array of RestoreTask Rollback task record list.
RequestId String The unique request ID, generated by the server, will be returned for every request (if the request fails to reach the server for other reasons, the request will not obtain a RequestId). RequestId is required for locating a problem.

4. Example

Example1 Querying the List of Rollback Tasks

This example shows you how to query the list of rollback tasks.

Input Example

POST / HTTP/1.1
Host: sqlserver.intl.tencentcloudapi.com
Content-Type: application/json
X-TC-Action: DescribeRestoreTask
<Common request parameters>

{
    "InstanceId": "mssql-aju981jo",
    "RestoreType": 0,
    "TargetRegion": "ap-shanghai",
    "TargetType": 2,
    "Status": 1,
    "StartTime": "2023-04-12: 00:00:00",
    "EndTime": "2023-04-12: 00:00:00",
    "Offset": 0,
    "Limit": 10,
    "OrderBy": "startTime",
    "OrderByType": "desc"
}

Output Example

{
    "Response": {
        "RequestId": "88310080-925d-11ed-981b-c7bf72df626c",
        "Tasks": [
            {
                "TargetInstanceId": "mssql-892932uiu",
                "TargetInstanceName": "andy",
                "TargetInstanceStatus": 2,
                "TargetRegion": "ap-guangzhou",
                "TargetType": 0,
                "EndTime": "0000-00-00 00:00:00",
                "RestoreId": 1012,
                "RestoreTime": "2023-01-12 16:22:48",
                "RestoreType": 0,
                "StartTime": "2023-01-12 16:22:55",
                "Status": 0,
                "FlowId": 100
            }
        ],
        "TotalCount": 1
    }
}

5. Developer Resources

SDK

TencentCloud API 3.0 integrates SDKs that support various programming languages to make it easier for you to call APIs.

Command Line Interface

6. Error Code

The following only lists the error codes related to the API business logic. For other error codes, see Common Error Codes.

Error Code Description
FailedOperation.DBError Database error.
FailedOperation.GcsError The operation failed or the network timed out.
InvalidParameter.InputIllegal Input error.
ResourceNotFound.InstanceNotFound The instance does not exist.
UnauthorizedOperation.PermissionDenied CAM authentication error.
Was this page helpful?
You can also Contact Sales or Submit a Ticket for help.
Yes
No

Feedback