doc-exports/docs/ims/api-ref/en-us_topic_0000001361199224.html
Hasko, Vladimir 0c7b91f4bd Initial import of IMS API
Reviewed-by: gtema <artem.goncharov@gmail.com>
Co-authored-by: Hasko, Vladimir <vladimir.hasko@t-systems.com>
Co-committed-by: Hasko, Vladimir <vladimir.hasko@t-systems.com>
2022-10-05 08:51:25 +00:00

203 lines
17 KiB
HTML

<a name="EN-US_TOPIC_0000001361199224"></a><a name="EN-US_TOPIC_0000001361199224"></a>
<h1 class="topictitle1">Asynchronous Job Query</h1>
<div id="body1449025499002"><div class="section" id="EN-US_TOPIC_0000001361199224__section6534076917543"><h4 class="sectiontitle">Function</h4><p id="EN-US_TOPIC_0000001361199224__p156101427122915">This API is an extension one. It is used to query the execution status of an asynchronous job, for example, an image exporting job.</p>
</div>
<div class="section" id="EN-US_TOPIC_0000001361199224__section5323664117543"><h4 class="sectiontitle">URI</h4><p id="EN-US_TOPIC_0000001361199224__p5107674017543">GET /v1/{project_id}/jobs/{job_id}</p>
<div class="p" id="EN-US_TOPIC_0000001361199224__p16336635112616"><a href="#EN-US_TOPIC_0000001361199224__table4357530317543">Table 1</a> lists the parameters in the URI.
<div class="tablenoborder"><a name="EN-US_TOPIC_0000001361199224__table4357530317543"></a><a name="table4357530317543"></a><table cellpadding="4" cellspacing="0" summary="" id="EN-US_TOPIC_0000001361199224__table4357530317543" frame="border" border="1" rules="all"><caption><b>Table 1 </b>Parameter description</caption><thead align="left"><tr id="EN-US_TOPIC_0000001361199224__row4437355317543"><th align="left" class="cellrowborder" valign="top" width="21.43%" id="mcps1.3.2.3.2.2.4.1.1"><p id="EN-US_TOPIC_0000001361199224__p3748803717543"><strong id="EN-US_TOPIC_0000001361199224__b24725868162658">Parameter</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="29.349999999999998%" id="mcps1.3.2.3.2.2.4.1.2"><p id="EN-US_TOPIC_0000001361199224__p1663218617543">Mandatory</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="49.220000000000006%" id="mcps1.3.2.3.2.2.4.1.3"><p id="EN-US_TOPIC_0000001361199224__p502984817543">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="EN-US_TOPIC_0000001361199224__row476451817543"><td class="cellrowborder" valign="top" width="21.43%" headers="mcps1.3.2.3.2.2.4.1.1 "><p id="EN-US_TOPIC_0000001361199224__p5038164417543">project_id</p>
</td>
<td class="cellrowborder" valign="top" width="29.349999999999998%" headers="mcps1.3.2.3.2.2.4.1.2 "><p id="EN-US_TOPIC_0000001361199224__p5438136317543">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="49.220000000000006%" headers="mcps1.3.2.3.2.2.4.1.3 "><p id="EN-US_TOPIC_0000001361199224__p4281427417543">Specifies the project ID.</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0000001361199224__row4978415317543"><td class="cellrowborder" valign="top" width="21.43%" headers="mcps1.3.2.3.2.2.4.1.1 "><p id="EN-US_TOPIC_0000001361199224__p598456817543">job_id</p>
</td>
<td class="cellrowborder" valign="top" width="29.349999999999998%" headers="mcps1.3.2.3.2.2.4.1.2 "><p id="EN-US_TOPIC_0000001361199224__p1498798817543">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="49.220000000000006%" headers="mcps1.3.2.3.2.2.4.1.3 "><p id="EN-US_TOPIC_0000001361199224__p606747617543">Specifies the asynchronous job ID.</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
<div class="section" id="EN-US_TOPIC_0000001361199224__section5460728517543"><h4 class="sectiontitle">Request</h4><ul id="EN-US_TOPIC_0000001361199224__ul1742418109373"><li id="EN-US_TOPIC_0000001361199224__li7672716112719">Request parameters<p id="EN-US_TOPIC_0000001361199224__p194382062717"><a name="EN-US_TOPIC_0000001361199224__li7672716112719"></a><a name="li7672716112719"></a>None</p>
</li><li id="EN-US_TOPIC_0000001361199224__li1342413108371">Example request<pre class="codeblock" id="EN-US_TOPIC_0000001361199224__codeblock5433366217619">GET /v1/ac234de25c6741d2b1273da49eea1b9e/jobs/ff8080814dbd65d7014dbe0d84db0013</pre>
</li></ul>
</div>
<div class="section" id="EN-US_TOPIC_0000001361199224__section5889951917543"><h4 class="sectiontitle">Response</h4><ul id="EN-US_TOPIC_0000001361199224__ul5308951911520"><li id="EN-US_TOPIC_0000001361199224__li804362911520">Response parameters
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="EN-US_TOPIC_0000001361199224__table528379811520" frame="border" border="1" rules="all"><thead align="left"><tr id="EN-US_TOPIC_0000001361199224__row1392930311520"><th align="left" class="cellrowborder" valign="top" width="19.470000000000002%" id="mcps1.3.4.2.1.1.1.4.1.1"><p id="EN-US_TOPIC_0000001361199224__p5453179311520">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="25.56%" id="mcps1.3.4.2.1.1.1.4.1.2"><p id="EN-US_TOPIC_0000001361199224__p574394205922">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="54.97%" id="mcps1.3.4.2.1.1.1.4.1.3"><p id="EN-US_TOPIC_0000001361199224__p5499914011520">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="EN-US_TOPIC_0000001361199224__row2574533511520"><td class="cellrowborder" valign="top" width="19.470000000000002%" headers="mcps1.3.4.2.1.1.1.4.1.1 "><p id="EN-US_TOPIC_0000001361199224__p499736211520">status</p>
</td>
<td class="cellrowborder" valign="top" width="25.56%" headers="mcps1.3.4.2.1.1.1.4.1.2 "><p id="EN-US_TOPIC_0000001361199224__p46525967205922">String</p>
</td>
<td class="cellrowborder" valign="top" width="54.97%" headers="mcps1.3.4.2.1.1.1.4.1.3 "><p id="EN-US_TOPIC_0000001361199224__p213318211520">Specifies the job status. The value can be:</p>
<ul id="EN-US_TOPIC_0000001361199224__ul20396680017"><li id="EN-US_TOPIC_0000001361199224__li143961388019"><strong id="EN-US_TOPIC_0000001361199224__b39049298151716">SUCCESS</strong>: The job is successfully executed.</li><li id="EN-US_TOPIC_0000001361199224__li20396289013"><strong id="EN-US_TOPIC_0000001361199224__b55570798151716">FAIL</strong>: The job failed to be executed.</li><li id="EN-US_TOPIC_0000001361199224__li103962820013"><strong id="EN-US_TOPIC_0000001361199224__b3103968151716">RUNNING</strong>: The job is in progress.</li><li id="EN-US_TOPIC_0000001361199224__li14396388013"><strong id="EN-US_TOPIC_0000001361199224__b39990109151716">INIT</strong>: The job is being initialized.</li></ul>
</td>
</tr>
<tr id="EN-US_TOPIC_0000001361199224__row6606192511520"><td class="cellrowborder" valign="top" width="19.470000000000002%" headers="mcps1.3.4.2.1.1.1.4.1.1 "><p id="EN-US_TOPIC_0000001361199224__p4941574211520">job_id</p>
</td>
<td class="cellrowborder" valign="top" width="25.56%" headers="mcps1.3.4.2.1.1.1.4.1.2 "><p id="EN-US_TOPIC_0000001361199224__p10506968205922">String</p>
</td>
<td class="cellrowborder" valign="top" width="54.97%" headers="mcps1.3.4.2.1.1.1.4.1.3 "><p id="EN-US_TOPIC_0000001361199224__p4325217111520">Specifies the task ID.</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0000001361199224__row5372522511520"><td class="cellrowborder" valign="top" width="19.470000000000002%" headers="mcps1.3.4.2.1.1.1.4.1.1 "><p id="EN-US_TOPIC_0000001361199224__p5677596811520">job_type</p>
</td>
<td class="cellrowborder" valign="top" width="25.56%" headers="mcps1.3.4.2.1.1.1.4.1.2 "><p id="EN-US_TOPIC_0000001361199224__p45758078205922">String</p>
</td>
<td class="cellrowborder" valign="top" width="54.97%" headers="mcps1.3.4.2.1.1.1.4.1.3 "><p id="EN-US_TOPIC_0000001361199224__p3545068711520">Specifies the job type.</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0000001361199224__row5062073411520"><td class="cellrowborder" valign="top" width="19.470000000000002%" headers="mcps1.3.4.2.1.1.1.4.1.1 "><p id="EN-US_TOPIC_0000001361199224__p663876511520">begin_time</p>
</td>
<td class="cellrowborder" valign="top" width="25.56%" headers="mcps1.3.4.2.1.1.1.4.1.2 "><p id="EN-US_TOPIC_0000001361199224__p15416808205922">String</p>
</td>
<td class="cellrowborder" valign="top" width="54.97%" headers="mcps1.3.4.2.1.1.1.4.1.3 "><p id="EN-US_TOPIC_0000001361199224__p86908111520">Specifies the start time of the job. The value is in UTC format.</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0000001361199224__row782172911520"><td class="cellrowborder" valign="top" width="19.470000000000002%" headers="mcps1.3.4.2.1.1.1.4.1.1 "><p id="EN-US_TOPIC_0000001361199224__p2958027411520">end_time</p>
</td>
<td class="cellrowborder" valign="top" width="25.56%" headers="mcps1.3.4.2.1.1.1.4.1.2 "><p id="EN-US_TOPIC_0000001361199224__p40801918205922">String</p>
</td>
<td class="cellrowborder" valign="top" width="54.97%" headers="mcps1.3.4.2.1.1.1.4.1.3 "><p id="EN-US_TOPIC_0000001361199224__p4719198811520">Specifies the end time of the job. The value is in UTC format.</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0000001361199224__row2207471011520"><td class="cellrowborder" valign="top" width="19.470000000000002%" headers="mcps1.3.4.2.1.1.1.4.1.1 "><p id="EN-US_TOPIC_0000001361199224__p4322112411520">error_code</p>
</td>
<td class="cellrowborder" valign="top" width="25.56%" headers="mcps1.3.4.2.1.1.1.4.1.2 "><p id="EN-US_TOPIC_0000001361199224__p16621098205922">String</p>
</td>
<td class="cellrowborder" valign="top" width="54.97%" headers="mcps1.3.4.2.1.1.1.4.1.3 "><p id="EN-US_TOPIC_0000001361199224__p1125016611520">Specifies the error code.</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0000001361199224__row3414263711520"><td class="cellrowborder" valign="top" width="19.470000000000002%" headers="mcps1.3.4.2.1.1.1.4.1.1 "><p id="EN-US_TOPIC_0000001361199224__p1409017611520">fail_reason</p>
</td>
<td class="cellrowborder" valign="top" width="25.56%" headers="mcps1.3.4.2.1.1.1.4.1.2 "><p id="EN-US_TOPIC_0000001361199224__p4131665205922">String</p>
</td>
<td class="cellrowborder" valign="top" width="54.97%" headers="mcps1.3.4.2.1.1.1.4.1.3 "><p id="EN-US_TOPIC_0000001361199224__p45364511520">Specifies the cause of the failure.</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0000001361199224__row408280811520"><td class="cellrowborder" valign="top" width="19.470000000000002%" headers="mcps1.3.4.2.1.1.1.4.1.1 "><p id="EN-US_TOPIC_0000001361199224__p6227201211520">entities</p>
</td>
<td class="cellrowborder" valign="top" width="25.56%" headers="mcps1.3.4.2.1.1.1.4.1.2 "><p id="EN-US_TOPIC_0000001361199224__p66229469205922">Object</p>
</td>
<td class="cellrowborder" valign="top" width="54.97%" headers="mcps1.3.4.2.1.1.1.4.1.3 "><p id="EN-US_TOPIC_0000001361199224__p287496515">Specifies the custom attributes of the job.</p>
<p id="EN-US_TOPIC_0000001361199224__p7619211219">If the job status is normal, the image ID will be returned. If the status is abnormal, an error code and details will be returned.</p>
<p id="EN-US_TOPIC_0000001361199224__p1086820511520">For details, see <a href="#EN-US_TOPIC_0000001361199224__table791935535712">Table 2</a>.</p>
</td>
</tr>
</tbody>
</table>
</div>
<div class="tablenoborder"><a name="EN-US_TOPIC_0000001361199224__table791935535712"></a><a name="table791935535712"></a><table cellpadding="4" cellspacing="0" summary="" id="EN-US_TOPIC_0000001361199224__table791935535712" frame="border" border="1" rules="all"><caption><b>Table 2 </b>Data structure description of the entities field</caption><thead align="left"><tr id="EN-US_TOPIC_0000001361199224__row99193554577"><th align="left" class="cellrowborder" valign="top" width="23.522352235223522%" id="mcps1.3.4.2.1.2.2.4.1.1"><p id="EN-US_TOPIC_0000001361199224__p208253244593"><strong id="EN-US_TOPIC_0000001361199224__b229941852">Parameter</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="21.67216721672167%" id="mcps1.3.4.2.1.2.2.4.1.2"><p id="EN-US_TOPIC_0000001361199224__p118251624185918">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="54.80548054805481%" id="mcps1.3.4.2.1.2.2.4.1.3"><p id="EN-US_TOPIC_0000001361199224__p198257249595">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="EN-US_TOPIC_0000001361199224__row7919185585717"><td class="cellrowborder" valign="top" width="23.522352235223522%" headers="mcps1.3.4.2.1.2.2.4.1.1 "><p id="EN-US_TOPIC_0000001361199224__p2091995520577">image_id</p>
</td>
<td class="cellrowborder" valign="top" width="21.67216721672167%" headers="mcps1.3.4.2.1.2.2.4.1.2 "><p id="EN-US_TOPIC_0000001361199224__p1091918553576">String</p>
</td>
<td class="cellrowborder" valign="top" width="54.80548054805481%" headers="mcps1.3.4.2.1.2.2.4.1.3 "><p id="EN-US_TOPIC_0000001361199224__p491975575711">Specifies the image ID.</p>
</td>
</tr>
</tbody>
</table>
</div>
</li></ul>
<ul id="EN-US_TOPIC_0000001361199224__ul613174517543"><li id="EN-US_TOPIC_0000001361199224__li5518571217543">Example response<pre class="codeblock" id="EN-US_TOPIC_0000001361199224__codeblock1424922094754">STATUS CODE 200</pre>
<div class="codecoloring" codetype="Java" id="EN-US_TOPIC_0000001361199224__screen1711074594724"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre> 1
2
3
4
5
6
7
8
9
10
11
12</pre></div></td><td class="code"><div class="highlight"><pre><span></span><span class="p">{</span>
<span class="s">&quot;status&quot;</span><span class="p">:</span> <span class="s">&quot;SUCCESS&quot;</span><span class="p">,</span>
<span class="s">&quot;entities&quot;</span><span class="p">:</span> <span class="p">{</span>
<span class="s">&quot;image_id&quot;</span><span class="p">:</span> <span class="s">&quot;e9e91bff-14b6-4a0b-8377-4ed0813e3360&quot;</span>
<span class="p">},</span>
<span class="s">&quot;job_id&quot;</span><span class="p">:</span> <span class="s">&quot;ff8080814dbd65d7014dbe0d84db0013&quot;</span><span class="p">,</span>
<span class="s">&quot;job_type&quot;</span><span class="p">:</span> <span class="s">&quot;createImageByInstance&quot;</span><span class="p">,</span>
<span class="s">&quot;begin_time&quot;</span><span class="p">:</span> <span class="s">&quot;04-Jun-2015 18:11:06:586&quot;</span><span class="p">,</span>
<span class="s">&quot;end_time&quot;</span><span class="p">:</span> <span class="s">&quot;&quot;</span><span class="p">,</span>
<span class="s">&quot;error_code&quot;</span><span class="p">:</span> <span class="kc">null</span><span class="p">,</span>
<span class="s">&quot;fail_reason&quot;</span><span class="p">:</span> <span class="kc">null</span>
<span class="p">}</span>
</pre></div>
</td></tr></table></div>
</li></ul>
</div>
<div class="section" id="EN-US_TOPIC_0000001361199224__section3678893217543"><h4 class="sectiontitle">Returned Values</h4><ul id="EN-US_TOPIC_0000001361199224__ul2711350917543"><li id="EN-US_TOPIC_0000001361199224__li4269498917543">Normal<p id="EN-US_TOPIC_0000001361199224__p4871058617543"><a name="EN-US_TOPIC_0000001361199224__li4269498917543"></a><a name="li4269498917543"></a>200</p>
</li><li id="EN-US_TOPIC_0000001361199224__li3574209117543">Abnormal
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="EN-US_TOPIC_0000001361199224__table395981717657" frame="border" border="1" rules="all"><thead align="left"><tr id="EN-US_TOPIC_0000001361199224__row1597872817657"><th align="left" class="cellrowborder" valign="top" width="46.54%" id="mcps1.3.5.2.2.1.1.3.1.1"><p id="EN-US_TOPIC_0000001361199224__p1920862517657">Returned Value</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="53.459999999999994%" id="mcps1.3.5.2.2.1.1.3.1.2"><p id="EN-US_TOPIC_0000001361199224__p1239479817657">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="EN-US_TOPIC_0000001361199224__row6445460017657"><td class="cellrowborder" valign="top" width="46.54%" headers="mcps1.3.5.2.2.1.1.3.1.1 "><p id="EN-US_TOPIC_0000001361199224__p5344010217657">400 Bad Request</p>
</td>
<td class="cellrowborder" valign="top" width="53.459999999999994%" headers="mcps1.3.5.2.2.1.1.3.1.2 "><p id="EN-US_TOPIC_0000001361199224__p3368100917657">Request error.</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0000001361199224__row3469362617657"><td class="cellrowborder" valign="top" width="46.54%" headers="mcps1.3.5.2.2.1.1.3.1.1 "><p id="EN-US_TOPIC_0000001361199224__p5872033917657">401 Unauthorized</p>
</td>
<td class="cellrowborder" valign="top" width="53.459999999999994%" headers="mcps1.3.5.2.2.1.1.3.1.2 "><p id="EN-US_TOPIC_0000001361199224__p5872698817657">Authentication failed.</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0000001361199224__row5878084417657"><td class="cellrowborder" valign="top" width="46.54%" headers="mcps1.3.5.2.2.1.1.3.1.1 "><p id="EN-US_TOPIC_0000001361199224__p6362789617657">403 Forbidden</p>
</td>
<td class="cellrowborder" valign="top" width="53.459999999999994%" headers="mcps1.3.5.2.2.1.1.3.1.2 "><p id="EN-US_TOPIC_0000001361199224__p5358597717657">You do not have the rights to perform the operation.</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0000001361199224__row1251175317657"><td class="cellrowborder" valign="top" width="46.54%" headers="mcps1.3.5.2.2.1.1.3.1.1 "><p id="EN-US_TOPIC_0000001361199224__p681909217657">500 Internal Server Error</p>
</td>
<td class="cellrowborder" valign="top" width="53.459999999999994%" headers="mcps1.3.5.2.2.1.1.3.1.2 "><p id="EN-US_TOPIC_0000001361199224__p1547559217657">Internal service error.</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0000001361199224__row506260017657"><td class="cellrowborder" valign="top" width="46.54%" headers="mcps1.3.5.2.2.1.1.3.1.1 "><p id="EN-US_TOPIC_0000001361199224__p741745117657">503 Service Unavailable</p>
</td>
<td class="cellrowborder" valign="top" width="53.459999999999994%" headers="mcps1.3.5.2.2.1.1.3.1.2 "><p id="EN-US_TOPIC_0000001361199224__p6394266717657">The service is unavailable.</p>
</td>
</tr>
</tbody>
</table>
</div>
</li></ul>
</div>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="en-us_topic_0000001411399165.html">IMS APIs</a></div>
</div>
</div>