Files
doc-exports/docs/geminidb/api-ref/topic_300000015.html
wangdengke2 59805c5073 GeminiDB_API
Reviewed-by: Gladkov, Maksim <mgladkov@noreply.gitea.eco.tsi-dev.otc-service.com>
Co-authored-by: wangdengke2 <wangdengke2@huawei.com>
Co-committed-by: wangdengke2 <wangdengke2@huawei.com>
2026-03-12 09:56:41 +00:00

182 lines
13 KiB
HTML

<a name="topic_300000015"></a><a name="topic_300000015"></a>
<h1 class="topictitle1">Querying Tags of a Specified Project</h1>
<div id="body0000001437061477"><div class="section" id="topic_300000015__section0139158134210"><h4 class="sectiontitle">Function</h4><p id="topic_300000015__p163933813426">This API is used to query tags of a specified project.</p>
</div>
<div class="section" id="topic_300000015__section21408817423"><h4 class="sectiontitle">URI</h4><p id="topic_300000015__p1739310819428">GET https://{Endpoint}/v3/{project_id}/tags</p>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="topic_300000015__table101417811426" frame="border" border="1" rules="all"><caption><b>Table 1 </b>URI parameters</caption><thead align="left"><tr id="topic_300000015__row19394185421"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.2.3.2.5.1.1"><p id="topic_300000015__p539418824211">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.2.3.2.5.1.2"><p id="topic_300000015__p73941087426">Mandatory</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.2.3.2.5.1.3"><p id="topic_300000015__p939419810422">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="40%" id="mcps1.3.2.3.2.5.1.4"><p id="topic_300000015__p33944816424">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="topic_300000015__row539416824216"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.3.2.5.1.1 "><p id="topic_300000015__p11394285424">project_id</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.3.2.5.1.2 "><p id="topic_300000015__p1639458104217">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.3.2.5.1.3 "><p id="topic_300000015__p113946817427">String</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.2.3.2.5.1.4 "><p id="topic_300000015__p1239488144210">Project ID of a tenant in a region. To obtain this value, see <a href="nosql_projectid.html">Obtaining a Project ID</a>.</p>
</td>
</tr>
</tbody>
</table>
</div>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="topic_300000015__table814918184218" frame="border" border="1" rules="all"><caption><b>Table 2 </b>Query parameters</caption><thead align="left"><tr id="topic_300000015__row539411812425"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.2.4.2.5.1.1"><p id="topic_300000015__p1339512884216">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.2.4.2.5.1.2"><p id="topic_300000015__p20395168144213">Mandatory</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.2.4.2.5.1.3"><p id="topic_300000015__p1739516874212">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="40%" id="mcps1.3.2.4.2.5.1.4"><p id="topic_300000015__p2395198104216">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="topic_300000015__row103951581424"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.4.2.5.1.1 "><p id="topic_300000015__p113952844217">offset</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.4.2.5.1.2 "><p id="topic_300000015__p203954811423">No</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.4.2.5.1.3 "><p id="topic_300000015__p3395284429">Integer</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.2.4.2.5.1.4 "><p id="topic_300000015__p4395385427">Index offset.</p>
<ul id="topic_300000015__ul113956812429"><li id="topic_300000015__li13395081426">The query starts from the next piece of data indexed by this parameter. The value is <strong id="topic_300000015__b14781225347">0</strong> by default.</li><li id="topic_300000015__li639519818425">The value must be a non-negative number.</li></ul>
</td>
</tr>
<tr id="topic_300000015__row2395108184213"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.4.2.5.1.1 "><p id="topic_300000015__p8395181425">limit</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.4.2.5.1.2 "><p id="topic_300000015__p739658194210">No</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.4.2.5.1.3 "><p id="topic_300000015__p17396158124212">Integer</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.2.4.2.5.1.4 "><p id="topic_300000015__p163961804214">Maximum records to be queried.</p>
<ul id="topic_300000015__ul15396118134220"><li id="topic_300000015__li5396118164212">The value ranges from <strong id="topic_300000015__b1126982217514">1</strong> to <strong id="topic_300000015__b1827013223513">100</strong>.</li><li id="topic_300000015__li339617824217">If this parameter is not transferred, the first 100 records are queried by default.</li></ul>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="section" id="topic_300000015__section121679844214"><h4 class="sectiontitle">Request Parameters</h4>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="topic_300000015__HeaderParameter" frame="border" border="1" rules="all"><caption><b>Table 3 </b>Request header parameters</caption><thead align="left"><tr id="topic_300000015__row19778114912455"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.2.2.5.1.1"><p id="topic_300000015__p477810490454">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.2.2.5.1.2"><p id="topic_300000015__p477817499454">Mandatory</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.2.2.5.1.3"><p id="topic_300000015__p1177834911450">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="40%" id="mcps1.3.3.2.2.5.1.4"><p id="topic_300000015__p19778949124514">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="topic_300000015__row9780134924518"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.2.5.1.1 "><p id="topic_300000015__p1678024919457">X-Auth-Token</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.2.5.1.2 "><p id="topic_300000015__p37805499453">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.2.5.1.3 "><p id="topic_300000015__p778004918459">String</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.3.2.2.5.1.4 "><p id="topic_300000015__p578094914452">User token</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="section" id="topic_300000015__section718017813427"><h4 class="sectiontitle">Response Parameters</h4><p id="topic_300000015__p739738174211"><strong id="topic_300000015__b128771885610">Status code: 200</strong></p>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="topic_300000015__table1518217810423" frame="border" border="1" rules="all"><caption><b>Table 4 </b>Response body parameters</caption><thead align="left"><tr id="topic_300000015__row1939748144216"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.3.2.4.1.1"><p id="topic_300000015__p23974894218">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="35.14%" id="mcps1.3.4.3.2.4.1.2"><p id="topic_300000015__p839758194214">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="44.86%" id="mcps1.3.4.3.2.4.1.3"><p id="topic_300000015__p173975874214">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="topic_300000015__row73971185425"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.3.2.4.1.1 "><p id="topic_300000015__p15397118204213">tags</p>
</td>
<td class="cellrowborder" valign="top" width="35.14%" headers="mcps1.3.4.3.2.4.1.2 "><p id="topic_300000015__p123978810423">Array of <a href="#topic_300000015__table219011824212">Tag</a> objects</p>
</td>
<td class="cellrowborder" valign="top" width="44.86%" headers="mcps1.3.4.3.2.4.1.3 "><p id="topic_300000015__p1639711824220">All tags.</p>
</td>
</tr>
<tr id="topic_300000015__row1539768114219"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.3.2.4.1.1 "><p id="topic_300000015__p4397887423">total_count</p>
</td>
<td class="cellrowborder" valign="top" width="35.14%" headers="mcps1.3.4.3.2.4.1.2 "><p id="topic_300000015__p439710814214">Integer</p>
</td>
<td class="cellrowborder" valign="top" width="44.86%" headers="mcps1.3.4.3.2.4.1.3 "><p id="topic_300000015__p13398587422">Total number of records.</p>
</td>
</tr>
</tbody>
</table>
</div>
<div class="tablenoborder"><a name="topic_300000015__table219011824212"></a><a name="table219011824212"></a><table cellpadding="4" cellspacing="0" summary="" id="topic_300000015__table219011824212" frame="border" border="1" rules="all"><caption><b>Table 5 </b>Tag</caption><thead align="left"><tr id="topic_300000015__row73981187428"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.4.2.4.1.1"><p id="topic_300000015__p1739814811422">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="34.589999999999996%" id="mcps1.3.4.4.2.4.1.2"><p id="topic_300000015__p03985812422">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="45.410000000000004%" id="mcps1.3.4.4.2.4.1.3"><p id="topic_300000015__p4398158104212">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="topic_300000015__row113988819425"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.4.2.4.1.1 "><p id="topic_300000015__p153981088420">type</p>
</td>
<td class="cellrowborder" valign="top" width="34.589999999999996%" headers="mcps1.3.4.4.2.4.1.2 "><p id="topic_300000015__p239858154211">String</p>
</td>
<td class="cellrowborder" valign="top" width="45.410000000000004%" headers="mcps1.3.4.4.2.4.1.3 "><p id="topic_300000015__p163981189427">Tag type. The value can be:</p>
<ul id="topic_300000015__ul153987813429"><li id="topic_300000015__li17398883428"><strong id="topic_300000015__b10980358184518">user</strong></li><li id="topic_300000015__li1739868124219"><strong id="topic_300000015__b2981263468">system</strong></li></ul>
</td>
</tr>
<tr id="topic_300000015__row13984894218"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.4.2.4.1.1 "><p id="topic_300000015__p103981086429">key</p>
</td>
<td class="cellrowborder" valign="top" width="34.589999999999996%" headers="mcps1.3.4.4.2.4.1.2 "><p id="topic_300000015__p43981884216">String</p>
</td>
<td class="cellrowborder" valign="top" width="45.410000000000004%" headers="mcps1.3.4.4.2.4.1.3 "><p id="topic_300000015__p103983810421">Tag key. The tag key must be specified and can include a maximum of 36 Unicode characters.</p>
<p id="topic_300000015__p17398481429">The key is case-sensitive and can contain digits, uppercase letters, lowercase letters, underscores (_), and hyphens (-).</p>
</td>
</tr>
<tr id="topic_300000015__row5398787421"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.4.2.4.1.1 "><p id="topic_300000015__p03981483427">values</p>
</td>
<td class="cellrowborder" valign="top" width="34.589999999999996%" headers="mcps1.3.4.4.2.4.1.2 "><p id="topic_300000015__p33981084420">Array of strings</p>
</td>
<td class="cellrowborder" valign="top" width="45.410000000000004%" headers="mcps1.3.4.4.2.4.1.3 "><p id="topic_300000015__p13995834216">Tag values. The value can include a maximum of 43 Unicode characters and can also be an empty string.</p>
<p id="topic_300000015__p839914818425">The value is case-sensitive and can contain digits, uppercase letters, lowercase letters, underscores (_), periods (.), and hyphens (-).</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="section" id="topic_300000015__section4656123835316"><h4 class="sectiontitle">Example Requests</h4><div class="p" id="topic_300000015__p126725082915">URI example<pre class="screen" id="topic_300000015__screen796744261119">GET https://{Endpoint}/v3/0549b4a43100d4f32f51c01c2fe4acdb/tags?offset=1&amp;limit=10</pre>
</div>
</div>
<div class="section" id="topic_300000015__section4229148104216"><h4 class="sectiontitle">Example Responses</h4><p id="topic_300000015__p5400138114210"><strong id="topic_300000015__b4681814151111">Status code: 200</strong></p>
<p id="topic_300000015__p19400178194220">Success</p>
<pre class="screen" id="topic_300000015__screen04000810428">{
"tags" : [ {
"key" : "key1",
"values" : [ "value1", "value2" ],
"type" : "user"
}, {
"key" : "key2",
"values" : [ "value1", "value2" ],
"type" : "system"
} ],
"total_count" : 2
}</pre>
</div>
<div class="section" id="topic_300000015__section19107202213585"><h4 class="sectiontitle">Status Codes</h4><p id="topic_300000015__en-us_topic_0000001354223196_p201216122353">See <a href="nosql_status_code.html">Status Codes</a>.</p>
</div>
<div class="section" id="topic_300000015__section21121922155813"><h4 class="sectiontitle">Error Codes</h4><p id="topic_300000015__en-us_topic_0000001354223196_p1265915205719">See <a href="nosql_error_code.html">Error Codes</a>.</p>
</div>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="topic_300000005.html">Tags</a></div>
</div>
</div>