doc-exports/docs/mrs/api-ref/mrs_02_0044.html
Yang, Tong bd2b57f749 MRS API 2.0.38.SP20 version
Reviewed-by: gtema <artem.goncharov@gmail.com>
Co-authored-by: Yang, Tong <yangtong2@huawei.com>
Co-committed-by: Yang, Tong <yangtong2@huawei.com>
2022-11-16 15:06:08 +00:00

295 lines
19 KiB
HTML

<a name="mrs_02_0044"></a><a name="mrs_02_0044"></a>
<h1 class="topictitle1">Querying the Job Object List</h1>
<div id="body1484210107928"><div class="section" id="mrs_02_0044__section40666287163540"><h4 class="sectiontitle">Function</h4><p id="mrs_02_0044__p39994334163542">This API is used to query the job object list. This API is compatible with Sahara.</p>
</div>
<div class="section" id="mrs_02_0044__section25682805163556"><h4 class="sectiontitle">URI</h4><ul id="mrs_02_0044__ul2095591163640"><li id="mrs_02_0044__li10997729163640">Format<p id="mrs_02_0044__p53372870163653"><a name="mrs_02_0044__li10997729163640"></a><a name="li10997729163640"></a>GET /v1.1/{project_id}/jobs</p>
</li><li id="mrs_02_0044__li17220269163646">Parameter description
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="mrs_02_0044__table49499141194754" frame="border" border="1" rules="all"><caption><b>Table 1 </b>URI parameter description</caption><thead align="left"><tr id="mrs_02_0044__row33700024194754"><th align="left" class="cellrowborder" valign="top" width="25%" id="mcps1.3.2.2.2.1.2.4.1.1"><p id="mrs_02_0044__p16571835194812">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="25%" id="mcps1.3.2.2.2.1.2.4.1.2"><p id="mrs_02_0044__p141410194812">Mandatory</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="50%" id="mcps1.3.2.2.2.1.2.4.1.3"><p id="mrs_02_0044__p11454278194812">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="mrs_02_0044__row6505449415356"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.2.2.2.1.2.4.1.1 "><p id="mrs_02_0044__p3492262515356">project_id</p>
</td>
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.2.2.2.1.2.4.1.2 "><p id="mrs_02_0044__p1016041415356">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.2.2.2.1.2.4.1.3 "><p id="mrs_02_0044__p1768719515356">Project ID. For details on how to obtain the project ID, see <a href="mrs_02_0011.html">Obtaining a Project ID</a>.</p>
</td>
</tr>
<tr id="mrs_02_0044__row20659256153330"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.2.2.2.1.2.4.1.1 "><p id="mrs_02_0044__p10159747154837">limit</p>
</td>
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.2.2.2.1.2.4.1.2 "><p id="mrs_02_0044__p44704178154837">No</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.2.2.2.1.2.4.1.3 "><p id="mrs_02_0044__p49662373154837">Maximum number of objects in response data</p>
<p id="mrs_02_0044__p45168427145211">Value range: 1 to 1073741822</p>
</td>
</tr>
<tr id="mrs_02_0044__row6317415154849"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.2.2.2.1.2.4.1.1 "><p id="mrs_02_0044__p41948639154849">marker</p>
</td>
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.2.2.2.1.2.4.1.2 "><p id="mrs_02_0044__p42396583154849">No</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.2.2.2.1.2.4.1.3 "><p id="mrs_02_0044__p11571175154849">The ID is the ID of the last element in the list that will not be returned.</p>
</td>
</tr>
<tr id="mrs_02_0044__row25723845154843"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.2.2.2.1.2.4.1.1 "><p id="mrs_02_0044__p3256680154843">sort_by</p>
</td>
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.2.2.2.1.2.4.1.2 "><p id="mrs_02_0044__p62464499154843">No</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.2.2.2.1.2.4.1.3 "><p id="mrs_02_0044__p191524715193">Sort field. A hyphen (-) before the sort field indicates to sort in descending order. Examples:</p>
<ul id="mrs_02_0044__ul5167941115195"><li id="mrs_02_0044__li4752566615198"><strong id="mrs_02_0044__b768316531424">sort_by=name </strong>indicates to sort by <strong id="mrs_02_0044__b15379142016432">name </strong>in ascending order.</li><li id="mrs_02_0044__li3034789115195"><strong id="mrs_02_0044__b5895360616342">sort_by=-name</strong> indicates to sort by name in descending order.</li></ul>
</td>
</tr>
</tbody>
</table>
</div>
</li></ul>
</div>
<div class="section" id="mrs_02_0044__section7976792193238"><h4 class="sectiontitle">Request</h4><p id="mrs_02_0044__p1842961591514"><strong id="mrs_02_0044__b139822112354">Request parameters</strong></p>
<p id="mrs_02_0044__p106160258151">None</p>
</div>
<div class="section" id="mrs_02_0044__section38599577193858"><h4 class="sectiontitle">Response</h4>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="mrs_02_0044__table60955430142546" frame="border" border="1" rules="all"><caption><b>Table 2 </b>Response parameter description</caption><thead align="left"><tr id="mrs_02_0044__row49351044142546"><th align="left" class="cellrowborder" valign="top" width="25%" id="mcps1.3.4.2.2.4.1.1"><p id="mrs_02_0044__p38011657142546">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="25%" id="mcps1.3.4.2.2.4.1.2"><p id="mrs_02_0044__p17947989142546">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="50%" id="mcps1.3.4.2.2.4.1.3"><p id="mrs_02_0044__p44500971142546">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="mrs_02_0044__row47808898142546"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.2.2.4.1.1 "><p id="mrs_02_0044__p63251747142556">markers</p>
</td>
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.2.2.4.1.2 "><p id="mrs_02_0044__p39304444142556">Object</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.4.2.2.4.1.3 "><p id="mrs_02_0044__p1657435617402">Markers object</p>
<p id="mrs_02_0044__p55104884142556">For details, see <a href="#mrs_02_0044__table35904709104244">Table 3</a>.</p>
</td>
</tr>
<tr id="mrs_02_0044__row2052251142546"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.2.2.4.1.1 "><p id="mrs_02_0044__p50715590142556">jobs</p>
</td>
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.2.2.4.1.2 "><p id="mrs_02_0044__p20371352142556">Array</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.4.2.2.4.1.3 "><p id="mrs_02_0044__p3423101220415">Job object list</p>
<p id="mrs_02_0044__p1450079142556">For details, see <a href="#mrs_02_0044__table5154210817547">Table 4</a>.</p>
</td>
</tr>
</tbody>
</table>
</div>
<div class="tablenoborder"><a name="mrs_02_0044__table35904709104244"></a><a name="table35904709104244"></a><table cellpadding="4" cellspacing="0" summary="" id="mrs_02_0044__table35904709104244" frame="border" border="1" rules="all"><caption><b>Table 3 </b><strong id="mrs_02_0044__b15312142617418">markers</strong> parameter description</caption><thead align="left"><tr id="mrs_02_0044__row49938240104244"><th align="left" class="cellrowborder" valign="top" width="25%" id="mcps1.3.4.3.2.4.1.1"><p id="mrs_02_0044__p18465671104244">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="25%" id="mcps1.3.4.3.2.4.1.2"><p id="mrs_02_0044__p21768128104244">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="50%" id="mcps1.3.4.3.2.4.1.3"><p id="mrs_02_0044__p18387972104244">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="mrs_02_0044__row13030764104244"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.3.2.4.1.1 "><p id="mrs_02_0044__p63118498104319">prev</p>
</td>
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.3.2.4.1.2 "><p id="mrs_02_0044__p43381604104319">String</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.4.3.2.4.1.3 "><p id="mrs_02_0044__p39594016104319">Marker on the previous page</p>
</td>
</tr>
<tr id="mrs_02_0044__row58460908104244"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.3.2.4.1.1 "><p id="mrs_02_0044__p46558357104319">next</p>
</td>
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.3.2.4.1.2 "><p id="mrs_02_0044__p66061904104319">String</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.4.3.2.4.1.3 "><p id="mrs_02_0044__p53737691104319">Marker on the next page</p>
</td>
</tr>
</tbody>
</table>
</div>
<div class="tablenoborder"><a name="mrs_02_0044__table5154210817547"></a><a name="table5154210817547"></a><table cellpadding="4" cellspacing="0" summary="" id="mrs_02_0044__table5154210817547" frame="border" border="1" rules="all"><caption><b>Table 4 </b><strong id="mrs_02_0044__b1028015474118">jobs</strong> parameter description</caption><thead align="left"><tr id="mrs_02_0044__row5182537317547"><th align="left" class="cellrowborder" valign="top" width="25%" id="mcps1.3.4.4.2.4.1.1"><p id="mrs_02_0044__p3710571317547">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="25%" id="mcps1.3.4.4.2.4.1.2"><p id="mrs_02_0044__p4673655817547">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="50%" id="mcps1.3.4.4.2.4.1.3"><p id="mrs_02_0044__p2756483917547">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="mrs_02_0044__row6552698617547"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.4.2.4.1.1 "><p id="mrs_02_0044__p38654942173327">description</p>
</td>
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.4.2.4.1.2 "><p id="mrs_02_0044__p45958699173327">String</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.4.4.2.4.1.3 "><p id="mrs_02_0044__p65699732173327">Job object description</p>
</td>
</tr>
<tr id="mrs_02_0044__row4779481717637"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.4.2.4.1.1 "><p id="mrs_02_0044__p42808336173327">tenant_id</p>
</td>
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.4.2.4.1.2 "><p id="mrs_02_0044__p55508321174021">String</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.4.4.2.4.1.3 "><p id="mrs_02_0044__p1024215139405">Project ID. For details on how to obtain the project ID, see <a href="mrs_02_0011.html">Obtaining a Project ID</a>.</p>
</td>
</tr>
<tr id="mrs_02_0044__row1495495217648"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.4.2.4.1.1 "><p id="mrs_02_0044__p61232516173327">created_at</p>
</td>
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.4.2.4.1.2 "><p id="mrs_02_0044__p9124128174021">String</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.4.4.2.4.1.3 "><p id="mrs_02_0044__p8513737173327">Job object creation time</p>
</td>
</tr>
<tr id="mrs_02_0044__row2384662617658"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.4.2.4.1.1 "><p id="mrs_02_0044__p12110587173327">mains</p>
</td>
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.4.2.4.1.2 "><p id="mrs_02_0044__p17782978173327">Array</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.4.4.2.4.1.3 "><p id="mrs_02_0044__p43671551173327">Executable program set of a job object</p>
</td>
</tr>
<tr id="mrs_02_0044__row305452361779"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.4.2.4.1.1 "><p id="mrs_02_0044__p24571699173327">updated_at</p>
</td>
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.4.2.4.1.2 "><p id="mrs_02_0044__p35399396173327">String</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.4.4.2.4.1.3 "><p id="mrs_02_0044__p54671175173327">Job object update time</p>
</td>
</tr>
<tr id="mrs_02_0044__row5615267117721"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.4.2.4.1.1 "><p id="mrs_02_0044__p5825773173327">libs</p>
</td>
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.4.2.4.1.2 "><p id="mrs_02_0044__p45331175173327">Array</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.4.4.2.4.1.3 "><p id="mrs_02_0044__p16981856173327">Dependency package set of a job object</p>
</td>
</tr>
<tr id="mrs_02_0044__row4660982117733"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.4.2.4.1.1 "><p id="mrs_02_0044__p49256169173327">is_protected</p>
</td>
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.4.2.4.1.2 "><p id="mrs_02_0044__p38038412173327">Bool</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.4.4.2.4.1.3 "><p id="mrs_02_0044__p59429132173327">Whether a job object is protected</p>
<ul id="mrs_02_0044__ul45445577141414"><li id="mrs_02_0044__li6357014141414">true</li><li id="mrs_02_0044__li57213130141414">false</li></ul>
<p id="mrs_02_0044__p14310885151440">The current version does not support this function.</p>
</td>
</tr>
<tr id="mrs_02_0044__row2048741417746"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.4.2.4.1.1 "><p id="mrs_02_0044__p5748711173327">interface</p>
</td>
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.4.2.4.1.2 "><p id="mrs_02_0044__p34473875173327">Array</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.4.4.2.4.1.3 "><p id="mrs_02_0044__p9833738173327">User-defined interface set</p>
</td>
</tr>
<tr id="mrs_02_0044__row36805501785"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.4.2.4.1.1 "><p id="mrs_02_0044__p30196392173327">is_public</p>
</td>
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.4.2.4.1.2 "><p id="mrs_02_0044__p54822332173327">Bool</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.4.4.2.4.1.3 "><p id="mrs_02_0044__p66821146173327">Whether a job object is public</p>
<ul id="mrs_02_0044__ul16102444162419"><li id="mrs_02_0044__li10704269162419">true</li><li id="mrs_02_0044__li29229564162419">false</li></ul>
<p id="mrs_02_0044__p61739489162419">The current version does not support this function.</p>
</td>
</tr>
<tr id="mrs_02_0044__row2196179617822"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.4.2.4.1.1 "><p id="mrs_02_0044__p22804970173327">type</p>
</td>
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.4.2.4.1.2 "><p id="mrs_02_0044__p2469217174057">String</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.4.4.2.4.1.3 "><p id="mrs_02_0044__p47664891173327">Job object type</p>
</td>
</tr>
<tr id="mrs_02_0044__row2742286517547"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.4.2.4.1.1 "><p id="mrs_02_0044__p45574254173327">id</p>
</td>
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.4.2.4.1.2 "><p id="mrs_02_0044__p66698908174057">String</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.4.4.2.4.1.3 "><p id="mrs_02_0044__p30735983173327">Job object ID</p>
</td>
</tr>
<tr id="mrs_02_0044__row3736230917853"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.4.2.4.1.1 "><p id="mrs_02_0044__p36233460173327">name</p>
</td>
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.4.2.4.1.2 "><p id="mrs_02_0044__p7478336174057">String</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.4.4.2.4.1.3 "><p id="mrs_02_0044__p43748149173327">Job object name</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="section" id="mrs_02_0044__section1210015461189"><h4 class="sectiontitle">Example</h4><ul id="mrs_02_0044__ul1958913536182"><li id="mrs_02_0044__li1558945321814">Example request<pre class="screen" id="mrs_02_0044__screen1174261716185">GET /v1.1/{project_id}/jobs?limit=2&amp;sort_by=name&amp;marker=4f59aa66-bf38-402c-9b6f-320e77219b9b</pre>
</li><li id="mrs_02_0044__li543710159193">Example response<pre class="screen" id="mrs_02_0044__screen3432927173115">{
"markers": {
"prev": "62a287e9-76c3-458d-a2f8-56e2d824a9ee",
"next": null
},
"jobs": [
{
"name": "my-mapreduce-job",
"type": "MapReduce",
"description": "This is the Map Reduce job template",
"mains": [],
"libs": [
{
"name": "my-job-binary-666",
"url": "/simple/mapreduce/program",
"description": "this is the job binary template",
"id": "2628d0e4-6109-4a09-a338-c4ee1b0963ed",
"tenant_id": "5a3314075bfa49b9ae360f4ecd333695",
"is_public": false,
"is_protected": false,
"extra": null
}
],
"created_at": "2017-06-22T09:39:13",
"updated_at": "2017-06-22T09:39:13",
"id": "38a04cba-c113-4868-b11f-f50e8b1bf252",
"tenant_id": "5a3314075bfa49b9ae360f4ecd333695",
"is_public": false,
"is_protected": false,
"interface": []
},
{
"name": "my-mapreduce-job-update",
"type": "MapReduce",
"description": "This is the Map Reduce job template",
"mains": [],
"libs": [
{
"name": "my-job-binary-666",
"url": "/simple/mapreduce/program",
"description": "this is the job binary template",
"id": "2628d0e4-6109-4a09-a338-c4ee1b0963ed",
"tenant_id": "5a3314075bfa49b9ae360f4ecd333695",
"is_public": false,
"is_protected": false,
"extra": null
}
],
"created_at": "2017-06-22T12:05:58",
"updated_at": "2017-06-22T12:05:58",
"id": "b8ea4daa-0042-45e0-a522-e8b714e74760",
"tenant_id": "5a3314075bfa49b9ae360f4ecd333695",
"is_public": false,
"is_protected": false,
"interface": []
}
]
}</pre>
</li></ul>
</div>
<div class="section" id="mrs_02_0044__section7365446163631"><h4 class="sectiontitle">Status Code</h4><p id="mrs_02_0044__p5547365016031"><a href="#mrs_02_0044__table1584477916050">Table 5</a> describes the status code of this API.</p>
<div class="tablenoborder"><a name="mrs_02_0044__table1584477916050"></a><a name="table1584477916050"></a><table cellpadding="4" cellspacing="0" summary="" id="mrs_02_0044__table1584477916050" frame="border" border="1" rules="all"><caption><b>Table 5 </b>Status code</caption><thead align="left"><tr id="mrs_02_0044__row1339492016050"><th align="left" class="cellrowborder" valign="top" width="30%" id="mcps1.3.6.3.2.3.1.1"><p id="mrs_02_0044__p3411176516050">Status code</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="70%" id="mcps1.3.6.3.2.3.1.2"><p id="mrs_02_0044__p1158961516050">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="mrs_02_0044__row3719767816050"><td class="cellrowborder" valign="top" width="30%" headers="mcps1.3.6.3.2.3.1.1 "><p id="mrs_02_0044__p6022194016050">200</p>
</td>
<td class="cellrowborder" valign="top" width="70%" headers="mcps1.3.6.3.2.3.1.2 "><p id="mrs_02_0044__p4613894216050">The job object list is queried successfully.</p>
</td>
</tr>
</tbody>
</table>
</div>
<p id="mrs_02_0044__p12887821175212">For the description about error status codes, see <a href="mrs_02_0015.html">Status Codes</a>.</p>
</div>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="mrs_02_0039.html">Job Object APIs (V1, Not Recommended)</a></div>
</div>
</div>