1
0
forked from docs/doc-exports
doc-exports/docs/css/api-ref/css_03_0102.html
Zheng, Xiu 99a2d77599 css api 23.5.1 20240520
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>
2024-06-07 17:47:08 +00:00

194 lines
13 KiB
HTML

<a name="css_03_0102"></a><a name="css_03_0102"></a>
<h1 class="topictitle1">Querying Logs</h1>
<div id="body0000001475869470"><div class="section" id="css_03_0102__section15767114183817"><h4 class="sectiontitle">Function</h4><p id="css_03_0102__p17684473814">This API is used to query log information.</p>
</div>
<div class="section" id="css_03_0102__section17769154103817"><h4 class="sectiontitle">Debugging</h4><p id="css_03_0102__p7769347382">You can debug this API in . Automatic authentication is supported.</p>
</div>
<div class="section" id="css_03_0102__section177020443816"><h4 class="sectiontitle">URI</h4><p id="css_03_0102__p1977110412382">POST /v1.0/{project_id}/clusters/{cluster_id}/logs/search</p>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="css_03_0102__table07731641383" frame="border" border="1" rules="all"><caption><b>Table 1 </b>Path parameters</caption><thead align="left"><tr id="css_03_0102__row277284183817"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.3.2.5.1.1"><p id="css_03_0102__p16773174163815">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.3.2.5.1.2"><p id="css_03_0102__p97792463810">Mandatory</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.3.2.5.1.3"><p id="css_03_0102__p6780174123817">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="40%" id="mcps1.3.3.3.2.5.1.4"><p id="css_03_0102__p07811349387">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="css_03_0102__row877216413389"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.1 "><p id="css_03_0102__p37811645382">project_id</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.2 "><p id="css_03_0102__p1478218413386">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.3 "><p id="css_03_0102__p117838415385">String</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.3.3.2.5.1.4 "><p id="css_03_0102__p11783244389">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_0102__row877217418384"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.1 "><p id="css_03_0102__p10784548384">cluster_id</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.2 "><p id="css_03_0102__p1978517473813">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.3 "><p id="css_03_0102__p3785104183817">String</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.3.3.2.5.1.4 "><p id="css_03_0102__p07861848387">ID of the cluster to be queried</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="section" id="css_03_0102__section17786134103817"><h4 class="sectiontitle">Request Parameters</h4>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="css_03_0102__request_GetLogBackupReq" frame="border" border="1" rules="all"><caption><b>Table 2 </b>Request body parameter</caption><thead align="left"><tr id="css_03_0102__row137871643388"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.2.2.5.1.1"><p id="css_03_0102__p1478944123815">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.2.2.5.1.2"><p id="css_03_0102__p47898411385">Mandatory</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.2.2.5.1.3"><p id="css_03_0102__p16790184153815">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="40%" id="mcps1.3.4.2.2.5.1.4"><p id="css_03_0102__p197913410384">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="css_03_0102__row1478774143818"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.2.2.5.1.1 "><p id="css_03_0102__p117913415380">instanceName</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.2.2.5.1.2 "><p id="css_03_0102__p479210411388">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.2.2.5.1.3 "><p id="css_03_0102__p14792441388">String</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.4.2.2.5.1.4 "><p id="css_03_0102__p15794748382">Node name. Obtain the <strong id="css_03_0102__b3525012132513">Name</strong> attribute in instances by referring to <a href="ShowClusterDetail.html">Querying Cluster Details</a>.</p>
</td>
</tr>
<tr id="css_03_0102__row37871345384"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.2.2.5.1.1 "><p id="css_03_0102__p16794747385">level</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.2.2.5.1.2 "><p id="css_03_0102__p37951344381">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.2.2.5.1.3 "><p id="css_03_0102__p17796947380">String</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.4.2.2.5.1.4 "><p id="css_03_0102__p177979414381">Log level. The log levels that can be queried are <strong id="css_03_0102__b153873915256">INFO</strong>, <strong id="css_03_0102__b5554165892519">ERROR</strong>, <strong id="css_03_0102__b1730611518268">DEBUG</strong>, and <strong id="css_03_0102__b3655161012616">WARN</strong>.</p>
</td>
</tr>
<tr id="css_03_0102__row157881848384"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.2.2.5.1.1 "><p id="css_03_0102__p1179817443815">logType</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.2.2.5.1.2 "><p id="css_03_0102__p779813443816">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.2.2.5.1.3 "><p id="css_03_0102__p67998443817">String</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.4.2.2.5.1.4 "><p id="css_03_0102__p1880094103818">Log type. The log types that can be queried are <strong id="css_03_0102__b198985429269">deprecation</strong>, <strong id="css_03_0102__b113618482265">indexingSlow</strong>, <strong id="css_03_0102__b33441453112612">searchSlow</strong>, and <strong id="css_03_0102__b618914162719">instance</strong>.</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="section" id="css_03_0102__section118005418381"><h4 class="sectiontitle">Response Parameters</h4><p id="css_03_0102__p980114453817"><strong id="css_03_0102__b1264283500113029">Status code: 200</strong></p>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="css_03_0102__response_GetLogBackupResponseBody" frame="border" border="1" rules="all"><caption><b>Table 3 </b>Response body parameter</caption><thead align="left"><tr id="css_03_0102__row1380113483817"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.5.3.2.4.1.1"><p id="css_03_0102__p12803448387">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.5.3.2.4.1.2"><p id="css_03_0102__p16804144123810">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="60%" id="mcps1.3.5.3.2.4.1.3"><p id="css_03_0102__p380510418380">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="css_03_0102__row12802134123815"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.3.2.4.1.1 "><p id="css_03_0102__p480615413816">logList</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.3.2.4.1.2 "><p id="css_03_0102__p208075423817">Array of <a href="#css_03_0102__response_logList">logList</a> objects</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.5.3.2.4.1.3 "><p id="css_03_0102__p280816433816">Log list</p>
</td>
</tr>
</tbody>
</table>
</div>
<div class="tablenoborder"><a name="css_03_0102__response_logList"></a><a name="response_logList"></a><table cellpadding="4" cellspacing="0" summary="" id="css_03_0102__response_logList" frame="border" border="1" rules="all"><caption><b>Table 4 </b>logList</caption><thead align="left"><tr id="css_03_0102__row1980924103812"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.5.4.2.4.1.1"><p id="css_03_0102__p981219463816">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.5.4.2.4.1.2"><p id="css_03_0102__p98133483819">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="60%" id="mcps1.3.5.4.2.4.1.3"><p id="css_03_0102__p1181411418386">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="css_03_0102__row081020420384"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.4.2.4.1.1 "><p id="css_03_0102__p78152415388">content</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.4.2.4.1.2 "><p id="css_03_0102__p2081534143812">String</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.5.4.2.4.1.3 "><p id="css_03_0102__p15816241385">Log content</p>
</td>
</tr>
<tr id="css_03_0102__row138101045389"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.4.2.4.1.1 "><p id="css_03_0102__p581712443817">date</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.4.2.4.1.2 "><p id="css_03_0102__p18186413819">String</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.5.4.2.4.1.3 "><p id="css_03_0102__p108180412381">Date</p>
</td>
</tr>
<tr id="css_03_0102__row081013410383"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.4.2.4.1.1 "><p id="css_03_0102__p198197453811">level</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.4.2.4.1.2 "><p id="css_03_0102__p981914411382">String</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.5.4.2.4.1.3 "><p id="css_03_0102__p8820114163811">Log level</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="section" id="css_03_0102__section148216410387"><h4 class="sectiontitle">Request Example</h4><pre class="screen" id="css_03_0102__screen188231547382">{
"instanceName" : "css-4312-ess-esn-1-1",
"level" : "INFO",
"logType" : "instance"
}</pre>
</div>
<div class="section" id="css_03_0102__section0826449385"><h4 class="sectiontitle">Response Example</h4><p id="css_03_0102__p2827124133812"><strong id="css_03_0102__b2002994291113029">Status code: 200</strong></p>
<p id="css_03_0102__p13827344385">The request is processed successfully.</p>
<pre class="screen" id="css_03_0102__screen118282412383">{
"logList" : [ {
"content" : "xxxxxx",
"date" : "2021-10-08T03:55:54,718",
"level" : "INFO"
} ]
}</pre>
</div>
<div class="section" id="css_03_0102__section1283119416386"><h4 class="sectiontitle">Status Codes</h4>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="css_03_0102__status_code" frame="border" border="1" rules="all"><thead align="left"><tr id="css_03_0102__row98327423815"><th align="left" class="cellrowborder" valign="top" width="15%" id="mcps1.3.8.2.1.3.1.1"><p id="css_03_0102__p17833174193810">Status Code</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="85%" id="mcps1.3.8.2.1.3.1.2"><p id="css_03_0102__p2834442380">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="css_03_0102__row128326420381"><td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.8.2.1.3.1.1 "><p id="css_03_0102__p7834134163817">200</p>
</td>
<td class="cellrowborder" valign="top" width="85%" headers="mcps1.3.8.2.1.3.1.2 "><p id="css_03_0102__p1383514423819">The request is processed successfully.</p>
</td>
</tr>
<tr id="css_03_0102__row148324463811"><td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.8.2.1.3.1.1 "><p id="css_03_0102__p15836344387">400</p>
</td>
<td class="cellrowborder" valign="top" width="85%" headers="mcps1.3.8.2.1.3.1.2 "><p id="css_03_0102__p6836140384">Invalid request.</p>
<p id="css_03_0102__p158371840388">Modify the request instead of retrying.</p>
</td>
</tr>
<tr id="css_03_0102__row198339414383"><td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.8.2.1.3.1.1 "><p id="css_03_0102__p15837249381">409</p>
</td>
<td class="cellrowborder" valign="top" width="85%" headers="mcps1.3.8.2.1.3.1.2 "><p id="css_03_0102__p1683813423812">The request cannot be processed due to a conflict.</p>
<p id="css_03_0102__p20839134143815">This status code indicates that the resource that the client attempts to create already exists, or the request fails to be processed because of the update of the conflict request.</p>
</td>
</tr>
<tr id="css_03_0102__row28337463817"><td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.8.2.1.3.1.1 "><p id="css_03_0102__p1083917412388">412</p>
</td>
<td class="cellrowborder" valign="top" width="85%" headers="mcps1.3.8.2.1.3.1.2 "><p id="css_03_0102__p1084074133820">The server does not meet one of the requirements that the requester puts on 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>