doc-exports/docs/cfw/api-ref/ListJob.html
2024-04-11 14:16:27 +08:00

184 lines
12 KiB
HTML

<a name="ListJob"></a><a name="ListJob"></a>
<h1 class="topictitle1">List Job Status</h1>
<div id="body12711440163518"><div class="section" id="ListJob__section1827112400359"><h4 class="sectiontitle">Function</h4><p id="ListJob__p1127264023519">This API is used to obtain job status.</p>
</div>
<div class="section" id="ListJob__section527244003513"><h4 class="sectiontitle">URI</h4><p id="ListJob__p1627344013510">GET /v3/{project_id}/jobs/{job_id}</p>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="ListJob__table10282184016354" frame="border" border="1" rules="all"><caption><b>Table 1 </b>Path Parameters</caption><thead align="left"><tr id="ListJob__row12275124073518"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.2.3.2.5.1.1"><p id="ListJob__p1228213409357">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.2.3.2.5.1.2"><p id="ListJob__p228284093514">Mandatory</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.2.3.2.5.1.3"><p id="ListJob__p1828318409355">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="40%" id="mcps1.3.2.3.2.5.1.4"><p id="ListJob__p12837403358">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="ListJob__row827644093512"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.3.2.5.1.1 "><p id="ListJob__p172832040143515">project_id</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.3.2.5.1.2 "><p id="ListJob__p62841240103514">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.3.2.5.1.3 "><p id="ListJob__p18284144014358">String</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.2.3.2.5.1.4 "><p id="ListJob__p22847401359">Project ID</p>
</td>
</tr>
<tr id="ListJob__row13276124014358"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.3.2.5.1.1 "><p id="ListJob__p62847401352">job_id</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.3.2.5.1.2 "><p id="ListJob__p8290144033512">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.3.2.5.1.3 "><p id="ListJob__p32921440113520">String</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.2.3.2.5.1.4 "><p id="ListJob__p729374015352">job id</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="section" id="ListJob__section829334016352"><h4 class="sectiontitle">Request Parameters</h4>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="ListJob__HeaderParameter" frame="border" border="1" rules="all"><caption><b>Table 2 </b>Request header parameters</caption><thead align="left"><tr id="ListJob__row17294144010354"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.2.2.5.1.1"><p id="ListJob__p11296194063510">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.2.2.5.1.2"><p id="ListJob__p1429624012351">Mandatory</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.2.2.5.1.3"><p id="ListJob__p3301124033520">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="40%" id="mcps1.3.3.2.2.5.1.4"><p id="ListJob__p53021540183512">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="ListJob__row13295114010352"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.2.5.1.1 "><p id="ListJob__p1030374043520">X-Auth-Token</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.2.5.1.2 "><p id="ListJob__p830394003515">No</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.2.5.1.3 "><p id="ListJob__p18303194013358">String</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.3.2.2.5.1.4 "><p id="ListJob__p173041340143511">User token. It can be obtained by calling the IAM API used to obtain a user token. The value of X-Subject-Token in the response header is a token.</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="section" id="ListJob__section8304340163516"><h4 class="sectiontitle">Response Parameters</h4><p id="ListJob__p230474019351"><strong id="ListJob__b7304204020352">Status code: 200</strong></p>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="ListJob__response_GetJobResp" frame="border" border="1" rules="all"><caption><b>Table 3 </b>Response body parameters</caption><thead align="left"><tr id="ListJob__row3308040183518"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.3.2.4.1.1"><p id="ListJob__p3315140133511">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.3.2.4.1.2"><p id="ListJob__p531504015353">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="60%" id="mcps1.3.4.3.2.4.1.3"><p id="ListJob__p431617404356">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="ListJob__row4308640133511"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.3.2.4.1.1 "><p id="ListJob__p93171640153519">error_code</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.3.2.4.1.2 "><p id="ListJob__p183171940123514">String</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.4.3.2.4.1.3 "><p id="ListJob__p931744020354">Error code</p>
<p id="ListJob__p12318164016358">Minimum: <strong id="ListJob__b12318740143510">8</strong></p>
<p id="ListJob__p83181940113510">Maximum: <strong id="ListJob__b431854093510">36</strong></p>
</td>
</tr>
<tr id="ListJob__row131484063513"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.3.2.4.1.1 "><p id="ListJob__p332419404357">error_msg</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.3.2.4.1.2 "><p id="ListJob__p2324540143512">String</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.4.3.2.4.1.3 "><p id="ListJob__p33251140103515">Description</p>
<p id="ListJob__p143334403358">Minimum: <strong id="ListJob__b19333174043519">2</strong></p>
<p id="ListJob__p833320405355">Maximum: <strong id="ListJob__b163334407352">512</strong></p>
</td>
</tr>
<tr id="ListJob__row63145406359"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.3.2.4.1.1 "><p id="ListJob__p193331740133517">data</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.3.2.4.1.2 "><p id="ListJob__p63341040163516"><a href="#ListJob__response_data">data</a> object</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.4.3.2.4.1.3 "><p id="ListJob__p19334204018356">Job Result</p>
</td>
</tr>
</tbody>
</table>
</div>
<div class="tablenoborder"><a name="ListJob__response_data"></a><a name="response_data"></a><table cellpadding="4" cellspacing="0" summary="" id="ListJob__response_data" frame="border" border="1" rules="all"><caption><b>Table 4 </b>data</caption><thead align="left"><tr id="ListJob__row634044013354"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.4.2.4.1.1"><p id="ListJob__p203481640113519">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.4.2.4.1.2"><p id="ListJob__p163481340143516">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="60%" id="mcps1.3.4.4.2.4.1.3"><p id="ListJob__p153481840103510">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="ListJob__row193401540113518"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.4.2.4.1.1 "><p id="ListJob__p434911409357">id</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.4.2.4.1.2 "><p id="ListJob__p1634984003515">String</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.4.4.2.4.1.3 "><p id="ListJob__p1435044083519">Job Id</p>
</td>
</tr>
<tr id="ListJob__row734094011359"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.4.2.4.1.1 "><p id="ListJob__p1835584015357">status</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.4.2.4.1.2 "><p id="ListJob__p153551140173516">String</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.4.4.2.4.1.3 "><p id="ListJob__p163561140133513">Job execution status. Running means the job is being executed, Success means the job is successful, Failed means the job is failed.</p>
<p id="ListJob__p1035610405355">Enumeration values:</p>
<ul id="ListJob__ul1535610404356"><li id="ListJob__li14356154012359"><strong id="ListJob__b12356440153510">Running</strong></li><li id="ListJob__li3356104023516"><strong id="ListJob__b6357940113513">Success</strong></li><li id="ListJob__li1135716406357"><strong id="ListJob__b8357184033515">Failed</strong></li></ul>
</td>
</tr>
<tr id="ListJob__row7340144013512"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.4.2.4.1.1 "><p id="ListJob__p53571040143510">begin_time</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.4.2.4.1.2 "><p id="ListJob__p16357134019354">String</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.4.4.2.4.1.3 "><p id="ListJob__p535764016354">Creation time, in the format yyyy-mm-ddThh:mm:ssZ. where T refers to the beginning of a certain time; Z refers to the time zone offset.</p>
</td>
</tr>
<tr id="ListJob__row8340240143514"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.4.2.4.1.1 "><p id="ListJob__p14358114023516">end_time</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.4.2.4.1.2 "><p id="ListJob__p436316405359">String</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.4.4.2.4.1.3 "><p id="ListJob__p193645409357">End time, in the format "yyyy-mm-ddThh:mm:ssZ". where T refers to the beginning of a certain time; Z refers to the time zone offset.</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="section" id="ListJob__section183641040153515"><h4 class="sectiontitle">Example Requests</h4><p id="ListJob__p836419404356">Get job status of the job which job id is f588ce71-e26c-400d-8981-f854355f6849 and project id is 09bb24e6fe80d23d2fa2c010b53b418c.</p>
<pre class="screen" id="ListJob__screen6364240163511">/v3/09bb24e6fe80d23d2fa2c010b53b418c/jobs/f588ce71-e26c-400d-8981-f854355f6849</pre>
</div>
<div class="section" id="ListJob__section1136512400353"><h4 class="sectiontitle">Example Responses</h4><p id="ListJob__p17365194053516"><strong id="ListJob__b1836534063513">Status code: 200</strong></p>
<p id="ListJob__p1236584017355">Get Job Response</p>
<pre class="screen" id="ListJob__screen9366154033516">{
"data" : {
"begin_time" : 1641370501000,
"end_time" : 1641370515000,
"id" : "f588ce71-e26c-400d-8981-f854355f6849",
"status" : "Success"
}
}</pre>
</div>
<div class="section" id="ListJob__section120519434357"><h4 class="sectiontitle">Status Codes</h4>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="ListJob__status_code" frame="border" border="1" rules="all"><thead align="left"><tr id="ListJob__row044264020350"><th align="left" class="cellrowborder" valign="top" width="15%" id="mcps1.3.7.2.1.3.1.1"><p id="ListJob__p5205543173514">Status Code</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="85%" id="mcps1.3.7.2.1.3.1.2"><p id="ListJob__p72055439352">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="ListJob__row744224013351"><td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.7.2.1.3.1.1 "><p id="ListJob__p920612431355">200</p>
</td>
<td class="cellrowborder" valign="top" width="85%" headers="mcps1.3.7.2.1.3.1.2 "><p id="ListJob__p1620624319356">Get Job Response</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="section" id="ListJob__section2206134319358"><h4 class="sectiontitle">Error Codes</h4><p id="ListJob__p1206443133515">See <a href="ErrorCode.html">Error Codes</a>.</p>
</div>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="topic_300000000.html">Firewall Management</a></div>
</div>
</div>