doc-exports/docs/cts/api-ref/en-us_topic_0168602253.html
Ying, Jiayu 14be087a3b CTS API 1122 version
Reviewed-by: Hasko, Vladimir <vladimir.hasko@t-systems.com>
Co-authored-by: Ying, Jiayu <jiayuying1@huawei.com>
Co-committed-by: Ying, Jiayu <jiayuying1@huawei.com>
2022-12-09 10:04:38 +00:00

206 lines
17 KiB
HTML

<a name="en-us_topic_0168602253"></a><a name="en-us_topic_0168602253"></a>
<h1 class="topictitle1">Querying a Tracker</h1>
<div id="body1481525738173"><div class="section" id="en-us_topic_0168602253__section36020887"><h4 class="sectiontitle">Function</h4><p id="en-us_topic_0168602253__p52964449">This API is used to query the details of a tracker. The details include the name of the tracker, name of the OBS bucket for storing traces, and prefix of the trace files stored in the OBS bucket.</p>
</div>
<div class="section" id="en-us_topic_0168602253__section55752527"><h4 class="sectiontitle">URI</h4><p id="en-us_topic_0168602253__p10058158">GET /v1.0/{project_id}/tracker?tracker_name={tracker_name}</p>
<div class="p" id="en-us_topic_0168602253__p176951139366">The URI parameters are described in <a href="#en-us_topic_0168602253__table9404449">Table1 Parameters in the URI</a>.
<div class="tablenoborder"><a name="en-us_topic_0168602253__table9404449"></a><a name="table9404449"></a><table cellpadding="4" cellspacing="0" summary="" id="en-us_topic_0168602253__table9404449" frame="border" border="1" rules="all"><caption><b>Table 1 </b>Parameters in the URI</caption><thead align="left"><tr id="en-us_topic_0168602253__row63328883"><th align="left" class="cellrowborder" valign="top" width="17%" id="mcps1.3.2.3.2.2.5.1.1"><p id="en-us_topic_0168602253__p29365919"><strong id="en-us_topic_0168602253__b842352706114947">Parameter</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="33%" id="mcps1.3.2.3.2.2.5.1.2"><p id="en-us_topic_0168602253__p29829272"><strong id="en-us_topic_0168602253__b842352706114949">Mandatory</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="25%" id="mcps1.3.2.3.2.2.5.1.3"><p id="en-us_topic_0168602253__p251973"><strong id="en-us_topic_0168602253__b842352706114951">Type</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="25%" id="mcps1.3.2.3.2.2.5.1.4"><p id="en-us_topic_0168602253__p20409871"><strong id="en-us_topic_0168602253__b842352706114953">Description</strong></p>
</th>
</tr>
</thead>
<tbody><tr id="en-us_topic_0168602253__row42586845"><td class="cellrowborder" valign="top" width="17%" headers="mcps1.3.2.3.2.2.5.1.1 "><p id="en-us_topic_0168602253__p26982424">project_id</p>
</td>
<td class="cellrowborder" valign="top" width="33%" headers="mcps1.3.2.3.2.2.5.1.2 "><p id="en-us_topic_0168602253__p38092711">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.2.3.2.2.5.1.3 "><p id="en-us_topic_0168602253__p65610739">String</p>
</td>
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.2.3.2.2.5.1.4 "><p id="en-us_topic_0168602253__p12869603">Project ID</p>
</td>
</tr>
<tr id="en-us_topic_0168602253__row41229856143234"><td class="cellrowborder" valign="top" width="17%" headers="mcps1.3.2.3.2.2.5.1.1 "><p id="en-us_topic_0168602253__p4797734143243">tracker_name</p>
</td>
<td class="cellrowborder" valign="top" width="33%" headers="mcps1.3.2.3.2.2.5.1.2 "><p id="en-us_topic_0168602253__p53072175143243">No</p>
</td>
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.2.3.2.2.5.1.3 "><p id="en-us_topic_0168602253__p3878953143243">String</p>
</td>
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.2.3.2.2.5.1.4 "><p id="en-us_topic_0168602253__p45759804143243">Tracker name.</p>
<p id="en-us_topic_0168602253__p9185054143243">If this parameter is not specified, all trackers will be queried.</p>
<p id="en-us_topic_0168602253__p15556623143243">Currently, only one tracker is allowed for each tenant. The tracker name is <strong id="en-us_topic_0168602253__b9961441113115">system</strong>.</p>
</td>
</tr>
</tbody>
</table>
</div>
<div class="note" id="en-us_topic_0168602253__note220977241196"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><p id="en-us_topic_0168602253__p450852231196">It is expected that CTS can support multiple trackers in the future. In this case, if you send a request where the parameter <strong id="en-us_topic_0168602253__b11396487389">tracker_name</strong> is not specified (<strong id="en-us_topic_0168602253__b1791132972312">GET /v1.0/{project_id}/tracker</strong>), the response will be in array format. Otherwise, the response will be in object format.</p>
</div></div>
</div>
</div>
<div class="section" id="en-us_topic_0168602253__section32010697"><h4 class="sectiontitle">Request</h4><ul id="en-us_topic_0168602253__ul35804895"><li id="en-us_topic_0168602253__li53808606">Parameter description<p id="en-us_topic_0168602253__p10313875143326"><a name="en-us_topic_0168602253__li53808606"></a><a name="li53808606"></a>None</p>
</li></ul>
<ul id="en-us_topic_0168602253__ul26059286"><li id="en-us_topic_0168602253__li33206990">Example request<pre class="screen" id="en-us_topic_0168602253__screen3244921615208">GET /v1.0/{project_id}/tracker?tracker_name=system</pre>
</li></ul>
</div>
<div class="section" id="en-us_topic_0168602253__section19660823"><h4 class="sectiontitle">Response</h4><ul id="en-us_topic_0168602253__ul48704899"><li id="en-us_topic_0168602253__li35690909">Parameter description
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="en-us_topic_0168602253__table34021727165117" frame="border" border="1" rules="all"><caption><b>Table 2 </b></caption><thead align="left"><tr id="en-us_topic_0168602253__row9402327185113"><th align="left" class="cellrowborder" valign="top" width="25.06%" id="mcps1.3.4.2.1.1.2.5.1.1"><p id="en-us_topic_0168602253__p370518328513"><strong id="en-us_topic_0168602253__a0eb8e97159684639b27d5812ded25b6b">Parameter</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="24.94%" id="mcps1.3.4.2.1.1.2.5.1.2"><p id="en-us_topic_0168602253__p1370620329518"><strong id="en-us_topic_0168602253__b189830177">Sub-Parameter</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="25%" id="mcps1.3.4.2.1.1.2.5.1.3"><p id="en-us_topic_0168602253__p5706113285116"><strong id="en-us_topic_0168602253__b842352706115123">Type</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="25%" id="mcps1.3.4.2.1.1.2.5.1.4"><p id="en-us_topic_0168602253__p1670613324514"><strong id="en-us_topic_0168602253__b842352706115259">Description</strong></p>
</th>
</tr>
</thead>
<tbody><tr id="en-us_topic_0168602253__row104022274513"><td class="cellrowborder" valign="top" width="25.06%" headers="mcps1.3.4.2.1.1.2.5.1.1 "><p id="en-us_topic_0168602253__p11706032155110">tracker_name</p>
</td>
<td class="cellrowborder" valign="top" width="24.94%" headers="mcps1.3.4.2.1.1.2.5.1.2 "><p id="en-us_topic_0168602253__p187065324511">-</p>
</td>
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.2.1.1.2.5.1.3 "><p id="en-us_topic_0168602253__p12706232165112">String</p>
</td>
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.2.1.1.2.5.1.4 "><p id="en-us_topic_0168602253__p0706153210514">Tracker name. It is set as <strong id="en-us_topic_0168602253__b1570292255720">system</strong> by default.</p>
</td>
</tr>
<tr id="en-us_topic_0168602253__row84031927145116"><td class="cellrowborder" valign="top" width="25.06%" headers="mcps1.3.4.2.1.1.2.5.1.1 "><p id="en-us_topic_0168602253__p47061032185119">bucket_name</p>
</td>
<td class="cellrowborder" valign="top" width="24.94%" headers="mcps1.3.4.2.1.1.2.5.1.2 "><p id="en-us_topic_0168602253__p3706113275119">-</p>
</td>
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.2.1.1.2.5.1.3 "><p id="en-us_topic_0168602253__p77061732185119">String</p>
</td>
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.2.1.1.2.5.1.4 "><p id="en-us_topic_0168602253__p1270619328512">OBS bucket name. It starts with a number or lowercase letter and contains 3 to 63 characters, including lowercase letters, numbers, hyphens (-), and periods (.)</p>
</td>
</tr>
<tr id="en-us_topic_0168602253__row16403192725111"><td class="cellrowborder" valign="top" width="25.06%" headers="mcps1.3.4.2.1.1.2.5.1.1 "><p id="en-us_topic_0168602253__p57061324514">file_prefix_name</p>
</td>
<td class="cellrowborder" valign="top" width="24.94%" headers="mcps1.3.4.2.1.1.2.5.1.2 "><p id="en-us_topic_0168602253__p12706632195112">-</p>
</td>
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.2.1.1.2.5.1.3 "><p id="en-us_topic_0168602253__p870623214516">String</p>
</td>
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.2.1.1.2.5.1.4 "><p id="en-us_topic_0168602253__p370617325511">Prefix of trace files that need to be stored in OBS buckets</p>
</td>
</tr>
<tr id="en-us_topic_0168602253__row12403132711512"><td class="cellrowborder" valign="top" width="25.06%" headers="mcps1.3.4.2.1.1.2.5.1.1 "><p id="en-us_topic_0168602253__p11706332205116">status</p>
</td>
<td class="cellrowborder" valign="top" width="24.94%" headers="mcps1.3.4.2.1.1.2.5.1.2 "><p id="en-us_topic_0168602253__p1270663285118">-</p>
</td>
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.2.1.1.2.5.1.3 "><p id="en-us_topic_0168602253__p13706332115117">String</p>
</td>
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.2.1.1.2.5.1.4 "><p id="en-us_topic_0168602253__p470663213519">Status of a tracker. The value can be <strong id="en-us_topic_0168602253__b1049118137214">enabled</strong> or <strong id="en-us_topic_0168602253__b049101310212">disabled</strong>.</p>
</td>
</tr>
<tr id="en-us_topic_0168602253__row74033271514"><td class="cellrowborder" valign="top" width="25.06%" headers="mcps1.3.4.2.1.1.2.5.1.1 "><p id="en-us_topic_0168602253__p77061932115115">detail</p>
</td>
<td class="cellrowborder" valign="top" width="24.94%" headers="mcps1.3.4.2.1.1.2.5.1.2 "><p id="en-us_topic_0168602253__p16706532105114">-</p>
</td>
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.2.1.1.2.5.1.3 "><p id="en-us_topic_0168602253__p1570617325517">String</p>
</td>
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.2.1.1.2.5.1.4 "><p id="en-us_topic_0168602253__p187062327512">This parameter is returned only when the tracker status is abnormal. It specifies the cause of the exception. The value will be <strong id="en-us_topic_0168602253__b1990810321315">checkBucketExistFailed</strong>, which indicates the failure to check the bucket, or <strong id="en-us_topic_0168602253__b1342112261415">noBucket</strong>, which indicates that the bucket does not exist.</p>
</td>
</tr>
<tr id="en-us_topic_0168602253__row512212415512"><td class="cellrowborder" rowspan="3" valign="top" width="25.06%" headers="mcps1.3.4.2.1.1.2.5.1.1 "><p id="en-us_topic_0168602253__p201226419517"></p>
<p id="en-us_topic_0168602253__p1470613325514">lts</p>
<p id="en-us_topic_0168602253__p56381643135110"></p>
</td>
<td class="cellrowborder" valign="top" width="24.94%" headers="mcps1.3.4.2.1.1.2.5.1.2 "><p id="en-us_topic_0168602253__p87519485518">is_lts_enabled</p>
</td>
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.2.1.1.2.5.1.3 "><p id="en-us_topic_0168602253__p109401849205115">Boolean</p>
</td>
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.2.1.1.2.5.1.4 "><p id="en-us_topic_0168602253__p31221741105110">Whether trace analysis is enabled</p>
</td>
</tr>
<tr id="en-us_topic_0168602253__row1840312716513"><td class="cellrowborder" valign="top" headers="mcps1.3.4.2.1.1.2.5.1.1 "><p id="en-us_topic_0168602253__p970616324515">log_group_name</p>
</td>
<td class="cellrowborder" valign="top" headers="mcps1.3.4.2.1.1.2.5.1.2 "><p id="en-us_topic_0168602253__p14706832115110">String</p>
</td>
<td class="cellrowborder" valign="top" headers="mcps1.3.4.2.1.1.2.5.1.3 "><p id="en-us_topic_0168602253__p14706123214512">Name of the LTS log group</p>
</td>
</tr>
<tr id="en-us_topic_0168602253__row10638114395110"><td class="cellrowborder" valign="top" headers="mcps1.3.4.2.1.1.2.5.1.1 "><p id="en-us_topic_0168602253__p6638174325111">log_topic_name</p>
</td>
<td class="cellrowborder" valign="top" headers="mcps1.3.4.2.1.1.2.5.1.2 "><p id="en-us_topic_0168602253__p207061832125120">String</p>
</td>
<td class="cellrowborder" valign="top" headers="mcps1.3.4.2.1.1.2.5.1.3 "><p id="en-us_topic_0168602253__p1370614320517">Name of the LTS log stream</p>
</td>
</tr>
</tbody>
</table>
</div>
</li></ul>
<ul id="en-us_topic_0168602253__ul59471393"><li id="en-us_topic_0168602253__li65480490">Example response<pre class="screen" id="en-us_topic_0168602253__screen58878620154340">{
"bucket_name" : "my_created_bucket",
"tracker_name" : "system",
"detail" : "noBucket",
"file_prefix_name" : "some_folder",
"status" : "disabled",
"lts" : {
"is_lts_enabled" : true,
"log_group_name" : "CTS",
"log_topic_name" : "tracker"
},
"bucket_name" : "1214",
"tracker_name" : "system",
}</pre>
</li></ul>
</div>
<div class="section" id="en-us_topic_0168602253__section42729680"><h4 class="sectiontitle">Returned Value</h4><ul id="en-us_topic_0168602253__ul6710104"><li id="en-us_topic_0168602253__li60390938">Normal
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="en-us_topic_0168602253__table6647531" frame="border" border="1" rules="all"><caption><b>Table 3 </b>Return code for successful requests</caption><thead align="left"><tr id="en-us_topic_0168602253__row10320902"><th align="left" class="cellrowborder" valign="top" width="42.42%" id="mcps1.3.5.2.1.1.2.3.1.1"><p id="en-us_topic_0168602253__p30686701"><strong id="en-us_topic_0168602253__b842352706115013">Returned Value</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="57.58%" id="mcps1.3.5.2.1.1.2.3.1.2"><p id="en-us_topic_0168602253__p2594873"><strong id="en-us_topic_0168602253__b842352706115016">Description</strong></p>
</th>
</tr>
</thead>
<tbody><tr id="en-us_topic_0168602253__row8858194"><td class="cellrowborder" valign="top" width="42.42%" headers="mcps1.3.5.2.1.1.2.3.1.1 "><p id="en-us_topic_0168602253__p46425119">200</p>
</td>
<td class="cellrowborder" valign="top" width="57.58%" headers="mcps1.3.5.2.1.1.2.3.1.2 "><p id="en-us_topic_0168602253__p2338313">The request is successful and the query result is returned.</p>
</td>
</tr>
</tbody>
</table>
</div>
</li><li id="en-us_topic_0168602253__li21044820">Abnormal
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="en-us_topic_0168602253__table55185655" frame="border" border="1" rules="all"><caption><b>Table 4 </b>Return code for failed requests</caption><thead align="left"><tr id="en-us_topic_0168602253__row52664332"><th align="left" class="cellrowborder" valign="top" width="42.42%" id="mcps1.3.5.2.2.1.2.3.1.1"><p id="en-us_topic_0168602253__p37952469"><strong id="en-us_topic_0168602253__b842352706115021">Returned Value</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="57.58%" id="mcps1.3.5.2.2.1.2.3.1.2"><p id="en-us_topic_0168602253__p54251110"><strong id="en-us_topic_0168602253__b842352706114414">Description</strong></p>
</th>
</tr>
</thead>
<tbody><tr id="en-us_topic_0168602253__row17196062143218"><td class="cellrowborder" valign="top" width="42.42%" headers="mcps1.3.5.2.2.1.2.3.1.1 "><p id="en-us_topic_0168602253__p18626238143219">400</p>
</td>
<td class="cellrowborder" valign="top" width="57.58%" headers="mcps1.3.5.2.2.1.2.3.1.2 "><p id="en-us_topic_0168602253__p32330300143219">The server failed to process the request.</p>
</td>
</tr>
<tr id="en-us_topic_0168602253__row32263784"><td class="cellrowborder" valign="top" width="42.42%" headers="mcps1.3.5.2.2.1.2.3.1.1 "><p id="en-us_topic_0168602253__p63229698">500</p>
</td>
<td class="cellrowborder" valign="top" width="57.58%" headers="mcps1.3.5.2.2.1.2.3.1.2 "><p id="en-us_topic_0168602253__p21331933">Failed to complete the request because of an internal service error.</p>
</td>
</tr>
<tr id="en-us_topic_0168602253__row17231827102823"><td class="cellrowborder" valign="top" width="42.42%" headers="mcps1.3.5.2.2.1.2.3.1.1 "><p id="en-us_topic_0168602253__p30719169102843">401</p>
</td>
<td class="cellrowborder" valign="top" width="57.58%" headers="mcps1.3.5.2.2.1.2.3.1.2 "><p id="en-us_topic_0168602253__p5224799102843">Your access request is rejected.</p>
</td>
</tr>
<tr id="en-us_topic_0168602253__row6592212102831"><td class="cellrowborder" valign="top" width="42.42%" headers="mcps1.3.5.2.2.1.2.3.1.1 "><p id="en-us_topic_0168602253__p50782544102843">403</p>
</td>
<td class="cellrowborder" valign="top" width="57.58%" headers="mcps1.3.5.2.2.1.2.3.1.2 "><p id="en-us_topic_0168602253__p13237565202942">You are forbidden to access the requested page.</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_0168602232.html">Tracker Management</a></div>
</div>
</div>