doc-exports/docs/drs/api-ref/drs_03_0132.html
Wang , Deng Ke 231618c804 DRS API 2.0.38SP23 version
Reviewed-by: gtema <artem.goncharov@gmail.com>
Co-authored-by: Wang , Deng Ke <wangdengke2@huawei.com>
Co-committed-by: Wang , Deng Ke <wangdengke2@huawei.com>
2022-11-24 16:49:13 +00:00

248 lines
16 KiB
HTML

<a name="drs_03_0132"></a><a name="drs_03_0132"></a>
<h1 class="topictitle1">Resuming or Retrying Tasks in Batches</h1>
<div id="body5906013382"><div class="section" id="drs_03_0132__section10901108384"><h4 class="sectiontitle">Function</h4><ul id="drs_03_0132__ul995311118294"><li id="drs_03_0132__li109531511102914">This API is used to retry failed tasks.</li><li id="drs_03_0132__li7953511132917">In the dual-active DR scenario, the parent task cannot call the API.</li></ul>
</div>
<div class="section" id="drs_03_0132__section490008388"><h4 class="sectiontitle">URI</h4><p id="drs_03_0132__p29010014380">POST /v3/{project_id}/jobs/batch-retry-task</p>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="drs_03_0132__table1693002381" frame="border" border="1" rules="all"><caption><b>Table 1 </b>Path parameters</caption><thead align="left"><tr id="drs_03_0132__row792140183816"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.2.3.2.5.1.1"><p id="drs_03_0132__p12931306389">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.2.3.2.5.1.2"><p id="drs_03_0132__p13931902383">Mandatory</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.2.3.2.5.1.3"><p id="drs_03_0132__p16942093812">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="40%" id="mcps1.3.2.3.2.5.1.4"><p id="drs_03_0132__p1994110163810">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="drs_03_0132__row129280123818"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.3.2.5.1.1 "><p id="drs_03_0132__p179511003817">project_id</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.3.2.5.1.2 "><p id="drs_03_0132__p09560173818">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.3.2.5.1.3 "><p id="drs_03_0132__p7969053810">String</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.2.3.2.5.1.4 "><p id="drs_03_0132__p18968011386">Project ID of a tenant in a region</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="section" id="drs_03_0132__section196906381"><h4 class="sectiontitle">Request Parameters</h4>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="drs_03_0132__HeaderParameter" frame="border" border="1" rules="all"><caption><b>Table 2 </b>Request header parameters</caption><thead align="left"><tr id="drs_03_0132__row5985014389"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.2.2.5.1.1"><p id="drs_03_0132__p1810018063810">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.2.2.5.1.2"><p id="drs_03_0132__p51001015385">Mandatory</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.2.2.5.1.3"><p id="drs_03_0132__p14101100123819">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="40%" id="mcps1.3.3.2.2.5.1.4"><p id="drs_03_0132__p21014015382">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="drs_03_0132__row8985093814"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.2.5.1.1 "><p id="drs_03_0132__p0101503386">Content-Type</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.2.5.1.2 "><p id="drs_03_0132__p141025043816">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.2.5.1.3 "><p id="drs_03_0132__p710211023812">String</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.3.2.2.5.1.4 "><p id="drs_03_0132__p192381984411">The content type.</p>
<p id="drs_03_0132__p123256415450">The default value is <strong id="drs_03_0132__b1171113116445">application/json</strong>.</p>
</td>
</tr>
<tr id="drs_03_0132__row4988018386"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.2.5.1.1 "><p id="drs_03_0132__p16103140113816">X-Auth-Token</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.2.5.1.2 "><p id="drs_03_0132__p141049012385">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.2.5.1.3 "><p id="drs_03_0132__p1310540173813">String</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.3.2.2.5.1.4 "><p id="drs_03_0132__p18105180193816">User token obtained from IAM.</p>
</td>
</tr>
<tr id="drs_03_0132__row1698200103816"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.2.5.1.1 "><p id="drs_03_0132__p310600183812">X-Language</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.2.5.1.2 "><p id="drs_03_0132__p13107180203820">No</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.2.5.1.3 "><p id="drs_03_0132__p2010714053820">String</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.3.2.2.5.1.4 "><p id="drs_03_0132__p4869125616598">Request language type</p>
<p id="drs_03_0132__p68691956125917">Default value: <strong id="drs_03_0132__b1786912566599">en-us</strong></p>
<p id="drs_03_0132__p1386915625912">Values:</p>
<ul id="drs_03_0132__ul1586965613591"><li id="drs_03_0132__li1886915655910"><strong id="drs_03_0132__b158691656145912">en-us</strong></li><li id="drs_03_0132__li17869125685916"><strong id="drs_03_0132__b12869175615914">zh-cn</strong></li></ul>
</td>
</tr>
</tbody>
</table>
</div>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="drs_03_0132__requestParameter" frame="border" border="1" rules="all"><caption><b>Table 3 </b>Request body parameters</caption><thead align="left"><tr id="drs_03_0132__row13109100183815"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.3.2.5.1.1"><p id="drs_03_0132__p1411115013382">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.3.2.5.1.2"><p id="drs_03_0132__p31122011388">Mandatory</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.3.2.5.1.3"><p id="drs_03_0132__p16113500387">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="40%" id="mcps1.3.3.3.2.5.1.4"><p id="drs_03_0132__p10113120173816">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="drs_03_0132__row61094073819"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.1 "><p id="drs_03_0132__p181141505388">jobs</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.2 "><p id="drs_03_0132__p1114130183811">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.3 "><p id="drs_03_0132__p17115190103819">Array of <a href="#drs_03_0132__request_RetryInfo">RetryInfo</a> objects</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.3.3.2.5.1.4 "><p id="drs_03_0132__p1411619017386">List of requests for resuming upload tasks in batches.</p>
</td>
</tr>
</tbody>
</table>
</div>
<div class="tablenoborder"><a name="drs_03_0132__request_RetryInfo"></a><a name="request_RetryInfo"></a><table cellpadding="4" cellspacing="0" summary="" id="drs_03_0132__request_RetryInfo" frame="border" border="1" rules="all"><caption><b>Table 4 </b>RetryInfo</caption><thead align="left"><tr id="drs_03_0132__row14117130153819"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.4.2.5.1.1"><p id="drs_03_0132__p201181004383">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.4.2.5.1.2"><p id="drs_03_0132__p1711810033820">Mandatory</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.4.2.5.1.3"><p id="drs_03_0132__p11119006389">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="40%" id="mcps1.3.3.4.2.5.1.4"><p id="drs_03_0132__p511960113814">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="drs_03_0132__row311719017382"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.4.2.5.1.1 "><p id="drs_03_0132__p181195015388">job_id</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.4.2.5.1.2 "><p id="drs_03_0132__p1612011014385">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.4.2.5.1.3 "><p id="drs_03_0132__p181201807389">String</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.3.4.2.5.1.4 "><p id="drs_03_0132__p21248013812">Task ID.</p>
</td>
</tr>
<tr id="drs_03_0132__row11178019388"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.4.2.5.1.1 "><p id="drs_03_0132__p412513043815">is_sync_re_edit</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.4.2.5.1.2 "><p id="drs_03_0132__p81251108385">No</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.4.2.5.1.3 "><p id="drs_03_0132__p112616014387">Boolean</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.3.4.2.5.1.4 "><p id="drs_03_0132__p512918083811">This parameter is mandatory when a task is resumed or retried and must be set to <strong id="drs_03_0132__b220015591247">true</strong>.</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="section" id="drs_03_0132__section1312990193819"><h4 class="sectiontitle">Response Parameters</h4><p id="drs_03_0132__p61301801389"><strong id="drs_03_0132__b31303013816">Status code: 200</strong></p>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="drs_03_0132__responseParameter" frame="border" border="1" rules="all"><caption><b>Table 5 </b>Response body parameters</caption><thead align="left"><tr id="drs_03_0132__row11317073819"><th align="left" class="cellrowborder" valign="top" width="19.79%" id="mcps1.3.4.3.2.4.1.1"><p id="drs_03_0132__p151321902386">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20.21%" id="mcps1.3.4.3.2.4.1.2"><p id="drs_03_0132__p131331018385">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="60%" id="mcps1.3.4.3.2.4.1.3"><p id="drs_03_0132__p1613311015388">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="drs_03_0132__row91317016387"><td class="cellrowborder" valign="top" width="19.79%" headers="mcps1.3.4.3.2.4.1.1 "><p id="drs_03_0132__p1134605382">results</p>
</td>
<td class="cellrowborder" valign="top" width="20.21%" headers="mcps1.3.4.3.2.4.1.2 "><p id="drs_03_0132__p1613490163817">Array of <a href="#drs_03_0132__response_RetryTaskResp">RetryTaskResp</a> objects</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.4.3.2.4.1.3 "><p id="drs_03_0132__p1913590113812">List of tasks that can be resumed in batches.</p>
</td>
</tr>
<tr id="drs_03_0132__row3131806384"><td class="cellrowborder" valign="top" width="19.79%" headers="mcps1.3.4.3.2.4.1.1 "><p id="drs_03_0132__p513770133812">count</p>
</td>
<td class="cellrowborder" valign="top" width="20.21%" headers="mcps1.3.4.3.2.4.1.2 "><p id="drs_03_0132__p91391207388">Integer</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.4.3.2.4.1.3 "><p id="drs_03_0132__p81400019382">Total number.</p>
</td>
</tr>
</tbody>
</table>
</div>
<div class="tablenoborder"><a name="drs_03_0132__response_RetryTaskResp"></a><a name="response_RetryTaskResp"></a><table cellpadding="4" cellspacing="0" summary="" id="drs_03_0132__response_RetryTaskResp" frame="border" border="1" rules="all"><caption><b>Table 6 </b>RetryTaskResp</caption><thead align="left"><tr id="drs_03_0132__row41429083811"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.4.2.4.1.1"><p id="drs_03_0132__p2143150173812">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.4.2.4.1.2"><p id="drs_03_0132__p131437093815">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="60%" id="mcps1.3.4.4.2.4.1.3"><p id="drs_03_0132__p91443019383">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="drs_03_0132__row12142809388"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.4.2.4.1.1 "><p id="drs_03_0132__p2014517011382">id</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.4.2.4.1.2 "><p id="drs_03_0132__p18146170123814">String</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.4.4.2.4.1.3 "><p id="drs_03_0132__p714819011387">Task ID.</p>
</td>
</tr>
<tr id="drs_03_0132__row11142908389"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.4.2.4.1.1 "><p id="drs_03_0132__p814910053812">status</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.4.2.4.1.2 "><p id="drs_03_0132__p1814915018384">String</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.4.4.2.4.1.3 "><p id="drs_03_0132__p151501607381">Status</p>
</td>
</tr>
<tr id="drs_03_0132__row9142000386"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.4.2.4.1.1 "><p id="drs_03_0132__p115010053814">error_code</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.4.2.4.1.2 "><p id="drs_03_0132__p315017011386">String</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.4.4.2.4.1.3 "><p id="drs_03_0132__p4152110103810">Error code, which is optional and indicates the returned information about the failure status.</p>
</td>
</tr>
<tr id="drs_03_0132__row1014280133817"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.4.2.4.1.1 "><p id="drs_03_0132__p1015317013817">error_msg</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.4.2.4.1.2 "><p id="drs_03_0132__p1815412013819">String</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.4.4.2.4.1.3 "><p id="drs_03_0132__p1615417023818">Error message, which is optional and indicates the returned information about the failure status.</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="section" id="drs_03_0132__section121551023814"><h4 class="sectiontitle">Example Request</h4><p id="drs_03_0132__p1715514011389">Example of resuming tasks in batches:</p>
<pre class="screen" id="drs_03_0132__screen942091461811">https://{Endpoint}/v3/054babbbde80d4602f5cc0043a40ed8c/jobs/batch-retry-task</pre>
<pre class="screen" id="drs_03_0132__screen53152101819">{
"jobs" : [ {
"job_id" : "140b5236-88ad-43c8-811c-1268453jb101"
} ]
}</pre>
</div>
<div class="section" id="drs_03_0132__section101646013810"><h4 class="sectiontitle">Example Response</h4><p id="drs_03_0132__p1616416033812"><strong id="drs_03_0132__b15164505380">Status code: 200</strong></p>
<p id="drs_03_0132__p51651010385">OK</p>
<pre class="screen" id="drs_03_0132__screen17168207388">{
"results" : [ {
"id" : "140b5236-88ad-43c8-811c-1268453jb101",
"status" : "success"
} ],
"count" : 1
}</pre>
</div>
<div class="section" id="drs_03_0132__section1117714010386"><h4 class="sectiontitle">Status Code</h4>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="drs_03_0132__status_code" frame="border" border="1" rules="all"><thead align="left"><tr id="drs_03_0132__row817720123816"><th align="left" class="cellrowborder" valign="top" width="15%" id="mcps1.3.7.2.1.3.1.1"><p id="drs_03_0132__p2178104384">Status Code</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="85%" id="mcps1.3.7.2.1.3.1.2"><p id="drs_03_0132__p1517814003814">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="drs_03_0132__row191773016381"><td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.7.2.1.3.1.1 "><p id="drs_03_0132__p1417930123819">200</p>
</td>
<td class="cellrowborder" valign="top" width="85%" headers="mcps1.3.7.2.1.3.1.2 "><p id="drs_03_0132__p1517914073818">OK</p>
</td>
</tr>
<tr id="drs_03_0132__row131771806386"><td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.7.2.1.3.1.1 "><p id="drs_03_0132__p19180404383">400</p>
</td>
<td class="cellrowborder" valign="top" width="85%" headers="mcps1.3.7.2.1.3.1.2 "><p id="drs_03_0132__p8180140103812">Bad Request</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="section" id="drs_03_0132__section518110163815"><h4 class="sectiontitle">Error Code</h4><p id="drs_03_0132__p141817043818">For details, see <a href="drs_05_0004.html">Error Code</a>.</p>
</div>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="drs_03_0101.html">Public API Management</a></div>
</div>
</div>