doc-exports/docs/css/api-ref/css_03_0096.html
Zheng, Xiu bf0cbd66f9 CSS API 22.4.1 Version
Reviewed-by: Kacur, Michal <michal.kacur@t-systems.com>
Co-authored-by: Zheng, Xiu <zhengxiu@huawei.com>
Co-committed-by: Zheng, Xiu <zhengxiu@huawei.com>
2023-04-12 00:11:02 +00:00

198 lines
14 KiB
HTML

<a name="css_03_0096"></a><a name="css_03_0096"></a>
<h1 class="topictitle1">Querying the Job List</h1>
<div id="body0000001475549822"><div class="section" id="css_03_0096__section13157133984616"><h4 class="sectiontitle">Function</h4><p id="css_03_0096__p1115711397467">This API is used to query the job list in the logs of a cluster.</p>
</div>
<div class="section" id="css_03_0096__section716013914466"><h4 class="sectiontitle">URI</h4><p id="css_03_0096__p916019396464">GET /v1.0/{project_id}/clusters/{cluster_id}/logs/records</p>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="css_03_0096__table1616203916460" frame="border" border="1" rules="all"><caption><b>Table 1 </b>Path Parameters</caption><thead align="left"><tr id="css_03_0096__row11619393464"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.2.3.2.5.1.1"><p id="css_03_0096__p6162639174617">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.2.3.2.5.1.2"><p id="css_03_0096__p171631539114610">Mandatory</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.2.3.2.5.1.3"><p id="css_03_0096__p13163839114620">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="40%" id="mcps1.3.2.3.2.5.1.4"><p id="css_03_0096__p3163203912467">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="css_03_0096__row71611239154614"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.3.2.5.1.1 "><p id="css_03_0096__p201641839154610">project_id</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.3.2.5.1.2 "><p id="css_03_0096__p10164173974612">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.3.2.5.1.3 "><p id="css_03_0096__p121645398460">String</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.2.3.2.5.1.4 "><p id="css_03_0096__p12165163914461">Project ID. For details, see <a href="css_03_0071.html">Obtaining a Project ID and Name</a>.</p>
</td>
</tr>
<tr id="css_03_0096__row101611139104617"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.3.2.5.1.1 "><p id="css_03_0096__p31653395461">cluster_id</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.3.2.5.1.2 "><p id="css_03_0096__p016563914460">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.3.2.5.1.3 "><p id="css_03_0096__p1916613994615">String</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.2.3.2.5.1.4 "><p id="css_03_0096__p141661399463">ID of the cluster you want to query.</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="section" id="css_03_0096__section151662392468"><h4 class="sectiontitle">Request Parameters</h4><p id="css_03_0096__p171672039204613">None</p>
</div>
<div class="section" id="css_03_0096__section12167239124617"><h4 class="sectiontitle">Response Parameters</h4><p id="css_03_0096__p716723915463"><strong id="css_03_0096__b1316873913464">Status code: 200</strong></p>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="css_03_0096__response_ListLogsJobResponseBody" frame="border" border="1" rules="all"><caption><b>Table 2 </b>Response body parameters</caption><thead align="left"><tr id="css_03_0096__row816853915468"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.3.2.4.1.1"><p id="css_03_0096__p20169193934613">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.3.2.4.1.2"><p id="css_03_0096__p6169183919467">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="60%" id="mcps1.3.4.3.2.4.1.3"><p id="css_03_0096__p17170153954620">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="css_03_0096__row151681939134616"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.3.2.4.1.1 "><p id="css_03_0096__p19170123924615">clusterLogRecord</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.3.2.4.1.2 "><p id="css_03_0096__p9171173924614">Array of <a href="#css_03_0096__response_clusterLogRecord">clusterLogRecord</a> objects</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.4.3.2.4.1.3 "><p id="css_03_0096__p161711939144612">Cluster log entity object.</p>
</td>
</tr>
</tbody>
</table>
</div>
<div class="tablenoborder"><a name="css_03_0096__response_clusterLogRecord"></a><a name="response_clusterLogRecord"></a><table cellpadding="4" cellspacing="0" summary="" id="css_03_0096__response_clusterLogRecord" frame="border" border="1" rules="all"><caption><b>Table 3 </b>clusterLogRecord</caption><thead align="left"><tr id="css_03_0096__row111721339114611"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.4.2.4.1.1"><p id="css_03_0096__p41751039154619">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.4.2.4.1.2"><p id="css_03_0096__p19175203984610">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="60%" id="mcps1.3.4.4.2.4.1.3"><p id="css_03_0096__p317617399462">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="css_03_0096__row181721339114615"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.4.2.4.1.1 "><p id="css_03_0096__p217693964617">id</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.4.2.4.1.2 "><p id="css_03_0096__p617683910460">String</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.4.4.2.4.1.3 "><p id="css_03_0096__p13177939104613">Log task ID, which is generated based on the system UUID.</p>
</td>
</tr>
<tr id="css_03_0096__row111721539154619"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.4.2.4.1.1 "><p id="css_03_0096__p71774398461">clusterId</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.4.2.4.1.2 "><p id="css_03_0096__p1917814395464">String</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.4.4.2.4.1.3 "><p id="css_03_0096__p917833919462">Cluster ID.</p>
</td>
</tr>
<tr id="css_03_0096__row161721239134613"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.4.2.4.1.1 "><p id="css_03_0096__p817823914463">createAt</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.4.2.4.1.2 "><p id="css_03_0096__p6178939144610">String</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.4.4.2.4.1.3 "><p id="css_03_0096__p10179439154613">Creation time. Format: Unix timestamp.</p>
</td>
</tr>
<tr id="css_03_0096__row4172133914620"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.4.2.4.1.1 "><p id="css_03_0096__p0179739124618">logPath</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.4.2.4.1.2 "><p id="css_03_0096__p1017923984611">String</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.4.4.2.4.1.3 "><p id="css_03_0096__p181809392469">Storage path of backed up logs in the OBS bucket.</p>
</td>
</tr>
<tr id="css_03_0096__row517313392461"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.4.2.4.1.1 "><p id="css_03_0096__p181806399466">status</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.4.2.4.1.2 "><p id="css_03_0096__p918053913461">String</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.4.4.2.4.1.3 "><p id="css_03_0096__p1718113994616">Task status</p>
<ul id="css_03_0096__ul1918143914466"><li id="css_03_0096__li14181163944610"><strong id="css_03_0096__b0181103914462">RUNNING</strong>: The line is being backed up.</li><li id="css_03_0096__li1418173994610"><strong id="css_03_0096__b171822039144619">SUCCESS</strong>: The backup succeeded.</li><li id="css_03_0096__li15182103994610"><strong id="css_03_0096__b1318211391469">FAIL</strong>: The backup failed.</li></ul>
</td>
</tr>
<tr id="css_03_0096__row181731239174616"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.4.2.4.1.1 "><p id="css_03_0096__p15182153964620">finishedAt</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.4.2.4.1.2 "><p id="css_03_0096__p8183163916466">Long</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.4.4.2.4.1.3 "><p id="css_03_0096__p5183193944612">End time. If the creation has not been completed, the end time is <strong id="css_03_0096__b11841039204615">null</strong>. Format: Unix timestamp.</p>
</td>
</tr>
<tr id="css_03_0096__row6174173920462"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.4.2.4.1.1 "><p id="css_03_0096__p16184139154617">jobTypes</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.4.2.4.1.2 "><p id="css_03_0096__p518415396462">String</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.4.4.2.4.1.3 "><p id="css_03_0096__p11841539174612">Task type.</p>
<ul id="css_03_0096__ul1185173994613"><li id="css_03_0096__li1718543994612"><strong id="css_03_0096__b181851739154610">Manual</strong>: Manual backup.</li><li id="css_03_0096__li1218583916467"><strong id="css_03_0096__b18185163915461">Auto</strong>: Automatic backup.</li></ul>
</td>
</tr>
<tr id="css_03_0096__row1217433934611"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.4.2.4.1.1 "><p id="css_03_0096__p3185193994612">failedMsg</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.4.2.4.1.2 "><p id="css_03_0096__p18186173911469">String</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.4.4.2.4.1.3 "><p id="css_03_0096__p131861339184616">Error information. If the task did not fail, the value of this parameter is <strong id="css_03_0096__b201861539184618">null</strong>.</p>
</td>
</tr>
<tr id="css_03_0096__row7174113984618"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.4.2.4.1.1 "><p id="css_03_0096__p18186193914612">jobId</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.4.2.4.1.2 "><p id="css_03_0096__p8187143915462">String</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.4.4.2.4.1.3 "><p id="css_03_0096__p0187539144619">Task ID.</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="section" id="css_03_0096__section14188133904618"><h4 class="sectiontitle">Example Requests</h4><p id="css_03_0096__p131891539134611">None</p>
</div>
<div class="section" id="css_03_0096__section3189339164613"><h4 class="sectiontitle">Example Responses</h4><p id="css_03_0096__p1618917395461"><strong id="css_03_0096__b619003918468">Status code: 200</strong></p>
<p id="css_03_0096__p1919012395460">Request succeeded.</p>
<pre class="screen" id="css_03_0096__screen151911339124615">{
"clusterLogRecord" : [ {
"id" : "d455a541-597e-4846-a6be-baad0ea361b1",
"clusterId" : "4213d908-f5dc-4633-8401-cfd7175fca0c",
"createAt" : 1656042837000,
"logPath" : "css-backup-1610678043608/css/log",
"status" : "RUNNING",
"finishedAt" : null,
"jobTypes" : "Manual",
"failedMsg" : null,
"jobId" : "2c9080df7c171342017c5e0884f8011c"
} ]
}</pre>
</div>
<div class="section" id="css_03_0096__section3195113954612"><h4 class="sectiontitle">Status Codes</h4>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="css_03_0096__status_code" frame="border" border="1" rules="all"><thead align="left"><tr id="css_03_0096__row1119663919468"><th align="left" class="cellrowborder" valign="top" width="15%" id="mcps1.3.7.2.1.3.1.1"><p id="css_03_0096__p181972397460">Status Code</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="85%" id="mcps1.3.7.2.1.3.1.2"><p id="css_03_0096__p151971339104617">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="css_03_0096__row9196153924617"><td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.7.2.1.3.1.1 "><p id="css_03_0096__p4197039184610">200</p>
</td>
<td class="cellrowborder" valign="top" width="85%" headers="mcps1.3.7.2.1.3.1.2 "><p id="css_03_0096__p6198539194612">Request succeeded.</p>
</td>
</tr>
<tr id="css_03_0096__row1619633920460"><td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.7.2.1.3.1.1 "><p id="css_03_0096__p11198173920468">400</p>
</td>
<td class="cellrowborder" valign="top" width="85%" headers="mcps1.3.7.2.1.3.1.2 "><p id="css_03_0096__p41992393466">Invalid request.</p>
<p id="css_03_0096__p1519918392461">Modify the request before retry.</p>
</td>
</tr>
<tr id="css_03_0096__row519617393463"><td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.7.2.1.3.1.1 "><p id="css_03_0096__p1519915395465">409</p>
</td>
<td class="cellrowborder" valign="top" width="85%" headers="mcps1.3.7.2.1.3.1.2 "><p id="css_03_0096__p5199103913467">The request could not be completed due to a conflict with the current state of the resource.</p>
<p id="css_03_0096__p1420013920466">The resource that the client attempts to create already exists, or the update request fails to be processed because of a conflict.</p>
</td>
</tr>
<tr id="css_03_0096__row111961439144611"><td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.7.2.1.3.1.1 "><p id="css_03_0096__p320053924614">412</p>
</td>
<td class="cellrowborder" valign="top" width="85%" headers="mcps1.3.7.2.1.3.1.2 "><p id="css_03_0096__p5201133915465">The server did not meet one of the preconditions contained in the request.</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="css_03_0093.html">Log Management</a></div>
</div>
</div>