doc-exports/docs/drs/api-ref/drs_03_0122.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

35 lines
2.0 KiB
HTML

<a name="drs_03_0122"></a><a name="drs_03_0122"></a>
<h1 class="topictitle1">Scenario 1: Querying Task Statuses in Batches</h1>
<div id="body0000001073080816"><div class="section" id="drs_03_0122__section1594274162812"><h4 class="sectiontitle">Scenarios</h4><p id="drs_03_0122__p1494394116281">This section describes how to query the status of all tasks of a tenant by calling the API described in <a href="drs_api_0150.html">Querying Task Statuses in Batches</a>.</p>
</div>
<div class="section" id="drs_03_0122__section1728115871716"><h4 class="sectiontitle">Procedure</h4><ol id="drs_03_0122__ol160124915146"><li id="drs_03_0122__li170174911416"><span>Obtain the ID of the task to be queried by referring to <a href="drs_api_0115.html">Obtaining a Task ID</a>.</span></li><li id="drs_03_0122__li26531229161513"><span>URI format: /v3/{project_id}/jobs/batch-status</span><p><ul id="drs_03_0122__ul19341311122215"><li id="drs_03_0122__li18645111452219">Example request:<p id="drs_03_0122__p0381161420156"><a name="drs_03_0122__li18645111452219"></a><a name="li18645111452219"></a>POST: https://{endpoint}/v3/054ba152d480d55b2f5dc0069e7ddef0/jobs/batch-status</p>
<p id="drs_03_0122__p17381414151511">Obtain the endpoint from Regions and Endpoints.</p>
</li><li id="drs_03_0122__li76700843519">Request example:<pre class="codeblock" id="drs_03_0122__codeblock6203120143910">{
"jobs": ["9a470239-2308-4bb5-a6bc-1040402fjb21", "dc67695a-ee3e-49b8-a022-a099bd81jb21"],
"pageReq": {
"cur_page": 1,
"per_page": 10
}
}</pre>
</li><li id="drs_03_0122__li20127933361">Example Response:<pre class="codeblock" id="drs_03_0122__codeblock129605623919">{
"results": [{
"id": "9a470239-2308-4bb5-a6bc-1040402fjb21",
"status": "INCRE_TRANSFER_STARTED"
}, {
"id": "dc67695a-ee3e-49b8-a022-a099bd81jb21",
"status": "INCRE_TRANSFER_FAILED"
}],
"count": 2
}</pre>
</li></ul>
</p></li></ol>
</div>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="drs_03_0121.html">Application Examples</a></div>
</div>
</div>