doc-exports/docs/dcs/api-ref/dcs-api-0312023.html
Chen, Junjie 5e34f6ce26 DCS API-REF Initial Version
Reviewed-by: Hasko, Vladimir <vladimir.hasko@t-systems.com>
Co-authored-by: Chen, Junjie <chenjunjie@huawei.com>
Co-committed-by: Chen, Junjie <chenjunjie@huawei.com>
2022-12-09 16:44:56 +00:00

260 lines
19 KiB
HTML

<a name="dcs-api-0312023"></a><a name="dcs-api-0312023"></a>
<h1 class="topictitle1">Querying DCS Instance Restoration Records</h1>
<div id="body1500349379438"><div class="section" id="dcs-api-0312023__section20779854161013"><h4 class="sectiontitle">Function</h4><p id="dcs-api-0312023__p525111820230">This API is used to query the restoration records of a specified DCS instance.</p>
</div>
<div class="section" id="dcs-api-0312023__section10627123311133"><h4 class="sectiontitle">URI</h4><p id="dcs-api-0312023__p571963810239">GET /v1.0/{project_id}/instances/{instance_id}/restores?start={start}&amp;limit={limit}&amp;beginTime={beginTime}&amp;endTime={endTime}</p>
<div class="p" id="dcs-api-0312023__p939123033811"><a href="#dcs-api-0312023__table1899262913382">Table 1</a> describes the parameters.
<div class="tablenoborder"><a name="dcs-api-0312023__table1899262913382"></a><a name="table1899262913382"></a><table cellpadding="4" cellspacing="0" summary="" id="dcs-api-0312023__table1899262913382" frame="border" border="1" rules="all"><caption><b>Table 1 </b>Parameter description</caption><thead align="left"><tr id="dcs-api-0312023__row1599115293389"><th align="left" class="cellrowborder" valign="top" width="25%" id="mcps1.3.2.3.2.2.5.1.1"><p id="dcs-api-0312023__p15991152913819">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="14.000000000000002%" id="mcps1.3.2.3.2.2.5.1.2"><p id="dcs-api-0312023__p129916298387">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="15%" id="mcps1.3.2.3.2.2.5.1.3"><p id="dcs-api-0312023__p13991142913384">Mandatory</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="46%" id="mcps1.3.2.3.2.2.5.1.4"><p id="dcs-api-0312023__p1991329193814">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="dcs-api-0312023__row11992929163813"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.2.3.2.2.5.1.1 "><p id="dcs-api-0312023__p1256118557236">project_id</p>
</td>
<td class="cellrowborder" valign="top" width="14.000000000000002%" headers="mcps1.3.2.3.2.2.5.1.2 "><p id="dcs-api-0312023__p1756110555237">String</p>
</td>
<td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.2.3.2.2.5.1.3 "><p id="dcs-api-0312023__p195611055112314">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="46%" headers="mcps1.3.2.3.2.2.5.1.4 "><p id="dcs-api-0312023__p19561175562312">Project ID.</p>
</td>
</tr>
<tr id="dcs-api-0312023__row1802105014239"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.2.3.2.2.5.1.1 "><p id="dcs-api-0312023__p7562555122310">instance_id</p>
</td>
<td class="cellrowborder" valign="top" width="14.000000000000002%" headers="mcps1.3.2.3.2.2.5.1.2 "><p id="dcs-api-0312023__p25629552238">String</p>
</td>
<td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.2.3.2.2.5.1.3 "><p id="dcs-api-0312023__p4562135513237">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="46%" headers="mcps1.3.2.3.2.2.5.1.4 "><p id="dcs-api-0312023__p45621055152310">DCS instance ID.</p>
</td>
</tr>
<tr id="dcs-api-0312023__row319585116234"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.2.3.2.2.5.1.1 "><p id="dcs-api-0312023__p1562155502313">start</p>
</td>
<td class="cellrowborder" valign="top" width="14.000000000000002%" headers="mcps1.3.2.3.2.2.5.1.2 "><p id="dcs-api-0312023__p5562135519239">Integer</p>
</td>
<td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.2.3.2.2.5.1.3 "><p id="dcs-api-0312023__p356265542319">No</p>
</td>
<td class="cellrowborder" valign="top" width="46%" headers="mcps1.3.2.3.2.2.5.1.4 "><p id="dcs-api-0312023__p12562455202313">Start sequence number of the restoration record to be queried. By default, this parameter is set to <strong id="dcs-api-0312023__b418831779">1</strong>.</p>
</td>
</tr>
<tr id="dcs-api-0312023__row5563551152313"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.2.3.2.2.5.1.1 "><p id="dcs-api-0312023__p75621955142315">limit</p>
</td>
<td class="cellrowborder" valign="top" width="14.000000000000002%" headers="mcps1.3.2.3.2.2.5.1.2 "><p id="dcs-api-0312023__p14562115582312">Integer</p>
</td>
<td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.2.3.2.2.5.1.3 "><p id="dcs-api-0312023__p12562115515234">No</p>
</td>
<td class="cellrowborder" valign="top" width="46%" headers="mcps1.3.2.3.2.2.5.1.4 "><p id="dcs-api-0312023__p11562145515237">Number of restoration records displayed on each page. The minimum value of this parameter is <strong id="dcs-api-0312023__b698477872">1</strong>. If this parameter is not specified, 10 restoration records are displayed on each page by default.</p>
</td>
</tr>
<tr id="dcs-api-0312023__row1473645152319"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.2.3.2.2.5.1.1 "><p id="dcs-api-0312023__p15631055162314"><span style="color:#222222;">beginTime</span></p>
</td>
<td class="cellrowborder" valign="top" width="14.000000000000002%" headers="mcps1.3.2.3.2.2.5.1.2 "><p id="dcs-api-0312023__p1956395502312">String</p>
</td>
<td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.2.3.2.2.5.1.3 "><p id="dcs-api-0312023__p14563115522319">No</p>
</td>
<td class="cellrowborder" valign="top" width="46%" headers="mcps1.3.2.3.2.2.5.1.4 "><p id="dcs-api-0312023__p16563175562318">Start time of the period to be queried. Format: yyyyMMddHHmmss, for example, 20170718235959.</p>
</td>
</tr>
<tr id="dcs-api-0312023__row1690510515236"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.2.3.2.2.5.1.1 "><p id="dcs-api-0312023__p6563755122319"><span style="color:#222222;">endTime</span></p>
</td>
<td class="cellrowborder" valign="top" width="14.000000000000002%" headers="mcps1.3.2.3.2.2.5.1.2 "><p id="dcs-api-0312023__p7563175512318">String</p>
</td>
<td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.2.3.2.2.5.1.3 "><p id="dcs-api-0312023__p8563145519235">No</p>
</td>
<td class="cellrowborder" valign="top" width="46%" headers="mcps1.3.2.3.2.2.5.1.4 "><p id="dcs-api-0312023__p1564355172311">End time of the period to be queried. Format: yyyyMMddHHmmss, for example, 20170718235959.</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
<div class="section" id="dcs-api-0312023__section17412144620133"><h4 class="sectiontitle">Request</h4><p class="msonormal" id="dcs-api-0312023__p036841715408"><strong id="dcs-api-0312023__b4757160171310">Request parameters</strong></p>
<p id="dcs-api-0312023__p20886145122416">None</p>
<p id="dcs-api-0312023__p18178425164011"><strong id="dcs-api-0312023__b1676518310134">Example request</strong></p>
<pre class="screen" id="dcs-api-0312023__screen263810492113">GET https://{dcs_endpoint}/v1.0/{project_id}/instances/{instance_id}/restores?start={start}&amp;limit={limit}&amp;beginTime={beginTime}&amp;endTime={endTime}</pre>
</div>
<div class="section" id="dcs-api-0312023__section1417213312142"><h4 class="sectiontitle">Response</h4><p class="msonormal" id="dcs-api-0312023__p193854910404"><strong id="dcs-api-0312023__b342738141320">Response parameters</strong></p>
<div class="msonormal" id="dcs-api-0312023__p1799214576389"><a href="#dcs-api-0312023__table1861319576383">Table 2</a> describes the response parameters.
<div class="tablenoborder"><a name="dcs-api-0312023__table1861319576383"></a><a name="table1861319576383"></a><table cellpadding="4" cellspacing="0" summary="" id="dcs-api-0312023__table1861319576383" frame="border" border="1" rules="all"><caption><b>Table 2 </b>Parameter description</caption><thead align="left"><tr id="dcs-api-0312023__row1961225712388"><th align="left" class="cellrowborder" valign="top" width="25%" id="mcps1.3.4.3.2.2.4.1.1"><p id="dcs-api-0312023__p136126577389">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="12%" id="mcps1.3.4.3.2.2.4.1.2"><p id="dcs-api-0312023__p76121757113816">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="63%" id="mcps1.3.4.3.2.2.4.1.3"><p id="dcs-api-0312023__p26121157123820">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="dcs-api-0312023__row166121557203812"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.3.2.2.4.1.1 "><p id="dcs-api-0312023__p4952127112514">restore_record_response</p>
</td>
<td class="cellrowborder" valign="top" width="12%" headers="mcps1.3.4.3.2.2.4.1.2 "><p id="dcs-api-0312023__p12952175251">Array</p>
</td>
<td class="cellrowborder" valign="top" width="63%" headers="mcps1.3.4.3.2.2.4.1.3 "><p id="dcs-api-0312023__p16952576257">Array of the restoration records.</p>
</td>
</tr>
<tr id="dcs-api-0312023__row378033719215"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.3.2.2.4.1.1 "><p id="dcs-api-0312023__p1490220481211">total_num</p>
</td>
<td class="cellrowborder" valign="top" width="12%" headers="mcps1.3.4.3.2.2.4.1.2 "><p id="dcs-api-0312023__p390214481123">Integer</p>
</td>
<td class="cellrowborder" valign="top" width="63%" headers="mcps1.3.4.3.2.2.4.1.3 "><p id="dcs-api-0312023__p3902248726">Number of obtained backup records.</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="dcs-api-0312023__table8487183718255" frame="border" border="1" rules="all"><caption><b>Table 3 </b>restore_record_response parameter description</caption><thead align="left"><tr id="dcs-api-0312023__row14488193732512"><th align="left" class="cellrowborder" valign="top" width="27%" id="mcps1.3.4.4.2.4.1.1"><p id="dcs-api-0312023__p1348853762517">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="21%" id="mcps1.3.4.4.2.4.1.2"><p id="dcs-api-0312023__p4488123742513">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="52%" id="mcps1.3.4.4.2.4.1.3"><p id="dcs-api-0312023__p348853716256">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="dcs-api-0312023__row1048833719252"><td class="cellrowborder" valign="top" width="27%" headers="mcps1.3.4.4.2.4.1.1 "><p id="dcs-api-0312023__p114001551142519">status</p>
</td>
<td class="cellrowborder" valign="top" width="21%" headers="mcps1.3.4.4.2.4.1.2 "><p id="dcs-api-0312023__p10400185162514">String</p>
</td>
<td class="cellrowborder" valign="top" width="52%" headers="mcps1.3.4.4.2.4.1.3 "><p id="dcs-api-0312023__p04001251102510">Restoration status</p>
<ul id="dcs-api-0312023__ul19239161818492"><li id="dcs-api-0312023__li162401918184913"><strong id="dcs-api-0312023__b128611546141815">waiting</strong>: DCS instance restoration is waiting to begin.</li><li id="dcs-api-0312023__li1424311819490"><strong id="dcs-api-0312023__b17952140548">restoring</strong>: DCS instance restoration is in progress. </li><li id="dcs-api-0312023__li1724581816495"><strong id="dcs-api-0312023__b93131151542">succeed</strong>: DCS instance restoration succeeded. </li><li id="dcs-api-0312023__li122481718104910"><strong id="dcs-api-0312023__b6563172615544">failed</strong>: DCS instance restoration failed.</li></ul>
</td>
</tr>
<tr id="dcs-api-0312023__row010184317256"><td class="cellrowborder" valign="top" width="27%" headers="mcps1.3.4.4.2.4.1.1 "><p id="dcs-api-0312023__p240075117259">progress</p>
</td>
<td class="cellrowborder" valign="top" width="21%" headers="mcps1.3.4.4.2.4.1.2 "><p id="dcs-api-0312023__p240011517257">String</p>
</td>
<td class="cellrowborder" valign="top" width="52%" headers="mcps1.3.4.4.2.4.1.3 "><p id="dcs-api-0312023__p8400135112252">Restoration progress</p>
</td>
</tr>
<tr id="dcs-api-0312023__row1519594318252"><td class="cellrowborder" valign="top" width="27%" headers="mcps1.3.4.4.2.4.1.1 "><p id="dcs-api-0312023__p0400195102512">restore_id</p>
</td>
<td class="cellrowborder" valign="top" width="21%" headers="mcps1.3.4.4.2.4.1.2 "><p id="dcs-api-0312023__p174001751132512">String</p>
</td>
<td class="cellrowborder" valign="top" width="52%" headers="mcps1.3.4.4.2.4.1.3 "><p id="dcs-api-0312023__p740075111253">ID of the restoration record</p>
</td>
</tr>
<tr id="dcs-api-0312023__row16385543152519"><td class="cellrowborder" valign="top" width="27%" headers="mcps1.3.4.4.2.4.1.1 "><p id="dcs-api-0312023__p1840055192511">backup_id</p>
</td>
<td class="cellrowborder" valign="top" width="21%" headers="mcps1.3.4.4.2.4.1.2 "><p id="dcs-api-0312023__p13400105118252">String</p>
</td>
<td class="cellrowborder" valign="top" width="52%" headers="mcps1.3.4.4.2.4.1.3 "><p id="dcs-api-0312023__p74001851152520">ID of the backup record</p>
</td>
</tr>
<tr id="dcs-api-0312023__row856044319253"><td class="cellrowborder" valign="top" width="27%" headers="mcps1.3.4.4.2.4.1.1 "><p id="dcs-api-0312023__p1140010519258">restore_remark</p>
</td>
<td class="cellrowborder" valign="top" width="21%" headers="mcps1.3.4.4.2.4.1.2 "><p id="dcs-api-0312023__p640018510255">String</p>
</td>
<td class="cellrowborder" valign="top" width="52%" headers="mcps1.3.4.4.2.4.1.3 "><p id="dcs-api-0312023__p64001151182518">Description of DCS instance restoration</p>
</td>
</tr>
<tr id="dcs-api-0312023__row1272674352515"><td class="cellrowborder" valign="top" width="27%" headers="mcps1.3.4.4.2.4.1.1 "><p id="dcs-api-0312023__p13400195111259">backup_remark</p>
</td>
<td class="cellrowborder" valign="top" width="21%" headers="mcps1.3.4.4.2.4.1.2 "><p id="dcs-api-0312023__p144001851182519">String</p>
</td>
<td class="cellrowborder" valign="top" width="52%" headers="mcps1.3.4.4.2.4.1.3 "><p id="dcs-api-0312023__p5400195113258">Description of DCS instance backup</p>
</td>
</tr>
<tr id="dcs-api-0312023__row284015436258"><td class="cellrowborder" valign="top" width="27%" headers="mcps1.3.4.4.2.4.1.1 "><p id="dcs-api-0312023__p740005102516">created_at</p>
</td>
<td class="cellrowborder" valign="top" width="21%" headers="mcps1.3.4.4.2.4.1.2 "><p id="dcs-api-0312023__p1400351112519">String</p>
</td>
<td class="cellrowborder" valign="top" width="52%" headers="mcps1.3.4.4.2.4.1.3 "><p id="dcs-api-0312023__p0400751152514">Time at which the restoration task is created</p>
</td>
</tr>
<tr id="dcs-api-0312023__row5985114332513"><td class="cellrowborder" valign="top" width="27%" headers="mcps1.3.4.4.2.4.1.1 "><p id="dcs-api-0312023__p040105102512">updated_at</p>
</td>
<td class="cellrowborder" valign="top" width="21%" headers="mcps1.3.4.4.2.4.1.2 "><p id="dcs-api-0312023__p040195119251">String</p>
</td>
<td class="cellrowborder" valign="top" width="52%" headers="mcps1.3.4.4.2.4.1.3 "><p id="dcs-api-0312023__p8401185112516">Time at which DCS instance restoration completed</p>
</td>
</tr>
<tr id="dcs-api-0312023__row2015594462514"><td class="cellrowborder" valign="top" width="27%" headers="mcps1.3.4.4.2.4.1.1 "><p id="dcs-api-0312023__p1240115114252">restore_name</p>
</td>
<td class="cellrowborder" valign="top" width="21%" headers="mcps1.3.4.4.2.4.1.2 "><p id="dcs-api-0312023__p74015519256">String</p>
</td>
<td class="cellrowborder" valign="top" width="52%" headers="mcps1.3.4.4.2.4.1.3 "><p id="dcs-api-0312023__p19401851162515">Name of the restoration record</p>
</td>
</tr>
<tr id="dcs-api-0312023__row139417445256"><td class="cellrowborder" valign="top" width="27%" headers="mcps1.3.4.4.2.4.1.1 "><p id="dcs-api-0312023__p8401165142516">backup_name</p>
</td>
<td class="cellrowborder" valign="top" width="21%" headers="mcps1.3.4.4.2.4.1.2 "><p id="dcs-api-0312023__p440116515254">String</p>
</td>
<td class="cellrowborder" valign="top" width="52%" headers="mcps1.3.4.4.2.4.1.3 "><p id="dcs-api-0312023__p6401351102519">Name of the backup record</p>
</td>
</tr>
<tr id="dcs-api-0312023__row20613124832310"><td class="cellrowborder" valign="top" width="27%" headers="mcps1.3.4.4.2.4.1.1 "><p id="dcs-api-0312023__p126141948192314">sourceInstanceID</p>
</td>
<td class="cellrowborder" valign="top" width="21%" headers="mcps1.3.4.4.2.4.1.2 "><p id="dcs-api-0312023__p17614184852314">String</p>
</td>
<td class="cellrowborder" valign="top" width="52%" headers="mcps1.3.4.4.2.4.1.3 "><p id="dcs-api-0312023__p36141348182319">Source instance ID.</p>
</td>
</tr>
<tr id="dcs-api-0312023__row14491853112318"><td class="cellrowborder" valign="top" width="27%" headers="mcps1.3.4.4.2.4.1.1 "><p id="dcs-api-0312023__p349185382311">sourceInstanceName</p>
</td>
<td class="cellrowborder" valign="top" width="21%" headers="mcps1.3.4.4.2.4.1.2 "><p id="dcs-api-0312023__p4492053132313">String</p>
</td>
<td class="cellrowborder" valign="top" width="52%" headers="mcps1.3.4.4.2.4.1.3 "><p id="dcs-api-0312023__p11494534236">Source instance name.</p>
</td>
</tr>
<tr id="dcs-api-0312023__row1455424418252"><td class="cellrowborder" valign="top" width="27%" headers="mcps1.3.4.4.2.4.1.1 "><p id="dcs-api-0312023__p94011151172510">error_code</p>
</td>
<td class="cellrowborder" valign="top" width="21%" headers="mcps1.3.4.4.2.4.1.2 "><p id="dcs-api-0312023__p13401351162517">String</p>
</td>
<td class="cellrowborder" valign="top" width="52%" headers="mcps1.3.4.4.2.4.1.3 "><p id="dcs-api-0312023__p940115517252">Error code returned if DCS instance restoration fails. For details about error codes, see <a href="dcs-api-0312022.html#dcs-api-0312022__table1255361919491">Table 4</a>.</p>
</td>
</tr>
</tbody>
</table>
</div>
<div class="msonormal" id="dcs-api-0312023__p279219520416"><strong id="dcs-api-0312023__b197201116121311">Example response</strong><pre class="screen" id="dcs-api-0312023__screen147861266287">{
"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
}</pre>
</div>
</div>
<div class="section" id="dcs-api-0312023__section4860101417132"><h4 class="sectiontitle">Status Code</h4><p id="dcs-api-0312023__p586081451311"><a href="#dcs-api-0312023__table486141410130">Table 4</a> describes the status code of successful operations. For details about other status codes, see <a href="dcs-api-0312043.html#dcs-api-0312043__table5210141351517">Table 1</a>.</p>
<div class="tablenoborder"><a name="dcs-api-0312023__table486141410130"></a><a name="table486141410130"></a><table cellpadding="4" cellspacing="0" summary="" id="dcs-api-0312023__table486141410130" frame="border" border="1" rules="all"><caption><b>Table 4 </b>Status code</caption><thead align="left"><tr id="dcs-api-0312023__row18616141139"><th align="left" class="cellrowborder" valign="top" width="15.98%" id="mcps1.3.5.3.2.3.1.1"><p id="dcs-api-0312023__p1986191418133">Status Code</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="84.02%" id="mcps1.3.5.3.2.3.1.2"><p id="dcs-api-0312023__p18861111415138">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="dcs-api-0312023__row786131451312"><td class="cellrowborder" valign="top" width="15.98%" headers="mcps1.3.5.3.2.3.1.1 "><p id="dcs-api-0312023__p6861114181311">200</p>
</td>
<td class="cellrowborder" valign="top" width="84.02%" headers="mcps1.3.5.3.2.3.1.2 "><p id="dcs-api-0312023__p6330445162818">DCS instance restoration record queried successfully.</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="dcs-api-0514005.html">Backup and Restoration APIs</a></div>
</div>
</div>