forked from docs/doc-exports
Reviewed-by: Bobkova, Natalia <natalia.bobkova@t-systems.com> Co-authored-by: Zaoxu, Li <lizaoxu@huawei.com> Co-committed-by: Zaoxu, Li <lizaoxu@huawei.com>
399 lines
30 KiB
HTML
399 lines
30 KiB
HTML
<a name="smn_api_56001"></a><a name="smn_api_56001"></a>
|
|
|
|
<h1 class="topictitle1">Querying Topics by Tag</h1>
|
|
<div id="body1523350913840"><div class="section" id="smn_api_56001__section34083598194741"><h4 class="sectiontitle">Description</h4><ul id="smn_api_56001__ul33304380203733"><li id="smn_api_56001__li51147505203733">API name<p id="smn_api_56001__p38624841203741"><a name="smn_api_56001__li51147505203733"></a><a name="li51147505203733"></a>GetResourceInstances</p>
|
|
</li></ul>
|
|
<ul id="smn_api_56001__ul20998054203745"><li id="smn_api_56001__li46884910203750">Function<p id="smn_api_56001__p15906587714"><a name="smn_api_56001__li46884910203750"></a><a name="li46884910203750"></a>Query topics by tag.</p>
|
|
</li></ul>
|
|
</div>
|
|
<div class="section" id="smn_api_56001__section16663308194741"><h4 class="sectiontitle">URI</h4><ul id="smn_api_56001__ul7550747194741"><li id="smn_api_56001__li847867194741">URI format<p id="smn_api_56001__p788919441774"><a name="smn_api_56001__li847867194741"></a><a name="li847867194741"></a>POST /v2/{project_id}/{resource_type}/resource_instances/action</p>
|
|
</li></ul>
|
|
<ul id="smn_api_56001__ul1568365194741"><li id="smn_api_56001__li14115291194741">Parameter description
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="smn_api_56001__table692210424914" frame="border" border="1" rules="all"><thead align="left"><tr id="smn_api_56001__row199531142096"><th align="left" class="cellrowborder" valign="top" width="21.84%" id="mcps1.3.2.3.1.1.1.5.1.1"><p id="smn_api_56001__p18953142091"><strong id="smn_api_56001__b842352706191030">Parameter</strong></p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="26.44%" id="mcps1.3.2.3.1.1.1.5.1.2"><p id="smn_api_56001__p189530421394"><strong id="smn_api_56001__b593421527191713">Mandatory</strong></p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="17.24%" id="mcps1.3.2.3.1.1.1.5.1.3"><p id="smn_api_56001__p129538421390"><strong id="smn_api_56001__b84235270619112">Type</strong></p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="34.48%" id="mcps1.3.2.3.1.1.1.5.1.4"><p id="smn_api_56001__p9953194213916"><strong id="smn_api_56001__b84235270619115">Description</strong></p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="smn_api_56001__row129533421894"><td class="cellrowborder" valign="top" width="21.84%" headers="mcps1.3.2.3.1.1.1.5.1.1 "><p id="smn_api_56001__p15953144211913">project_id</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="26.44%" headers="mcps1.3.2.3.1.1.1.5.1.2 "><p id="smn_api_56001__p59531421199">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="17.24%" headers="mcps1.3.2.3.1.1.1.5.1.3 "><p id="smn_api_56001__p1095317425913">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="34.48%" headers="mcps1.3.2.3.1.1.1.5.1.4 "><p id="smn_api_56001__p995315422920">Project ID</p>
|
|
<p id="smn_api_56001__p118812918506">See <a href="smn_api_66000.html">Obtaining a Project ID</a>.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="smn_api_56001__row99537424915"><td class="cellrowborder" valign="top" width="21.84%" headers="mcps1.3.2.3.1.1.1.5.1.1 "><p id="smn_api_56001__p99531421797">resource_type</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="26.44%" headers="mcps1.3.2.3.1.1.1.5.1.2 "><p id="smn_api_56001__p1495310421799">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="17.24%" headers="mcps1.3.2.3.1.1.1.5.1.3 "><p id="smn_api_56001__p149531342296">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="34.48%" headers="mcps1.3.2.3.1.1.1.5.1.4 "><p id="smn_api_56001__p52661238184213">Resource type</p>
|
|
<p id="smn_api_56001__p16612591087">Only <strong id="smn_api_56001__b20161638143910">smn_topic</strong> (topic) is supported.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</li></ul>
|
|
</div>
|
|
<div class="section" id="smn_api_56001__section1142871194741"><h4 class="sectiontitle">Request</h4><ul id="smn_api_56001__ul25463739194741"><li id="smn_api_56001__li27847059194741">Parameter description
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="smn_api_56001__table163121742121118" frame="border" border="1" rules="all"><thead align="left"><tr id="smn_api_56001__row154221042181113"><th align="left" class="cellrowborder" valign="top" width="16.87168716871687%" id="mcps1.3.3.2.1.1.1.5.1.1"><p id="smn_api_56001__p1442284241113"><strong id="smn_api_56001__b106537827">Parameter</strong></p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="22.562256225622562%" id="mcps1.3.3.2.1.1.1.5.1.2"><p id="smn_api_56001__p184221942111116"><strong id="smn_api_56001__b1483848975">Mandatory</strong></p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="23.94239423942394%" id="mcps1.3.3.2.1.1.1.5.1.3"><p id="smn_api_56001__p11422242101116"><strong id="smn_api_56001__b1419601132">Type</strong></p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="36.62366236623662%" id="mcps1.3.3.2.1.1.1.5.1.4"><p id="smn_api_56001__p172161339171313"><strong id="smn_api_56001__b1947102590">Description</strong></p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="smn_api_56001__row144221542181111"><td class="cellrowborder" valign="top" width="16.87168716871687%" headers="mcps1.3.3.2.1.1.1.5.1.1 "><p id="smn_api_56001__p164228426114">tags</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="22.562256225622562%" headers="mcps1.3.3.2.1.1.1.5.1.2 "><p id="smn_api_56001__p4422542161112">No</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="23.94239423942394%" headers="mcps1.3.3.2.1.1.1.5.1.3 "><p id="smn_api_56001__p13422124291118">Tags structure array</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="36.62366236623662%" headers="mcps1.3.3.2.1.1.1.5.1.4 "><p id="smn_api_56001__p132727111254">Includes specified tags. For details, see <a href="#smn_api_56001__table12385184281216">Table 1</a>.</p>
|
|
<div class="note" id="smn_api_56001__note156841029125418"><span class="notetitle"> NOTE: </span><div class="notebody"><p id="smn_api_56001__p513517108261">The structure body is mandatory. A maximum of 20 tag keys are allowed in each query operation. The tag key cannot be left blank or set to the empty string. Each tag key can have up to 20 tag values. Each tag key and tag values of one key must be unique. Resources identified by different keys are in AND relationship.</p>
|
|
</div></div>
|
|
</td>
|
|
</tr>
|
|
<tr id="smn_api_56001__row17422114231115"><td class="cellrowborder" valign="top" width="16.87168716871687%" headers="mcps1.3.3.2.1.1.1.5.1.1 "><p id="smn_api_56001__p74221442111112">tags_any</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="22.562256225622562%" headers="mcps1.3.3.2.1.1.1.5.1.2 "><p id="smn_api_56001__p10422942171111">No</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="23.94239423942394%" headers="mcps1.3.3.2.1.1.1.5.1.3 "><p id="smn_api_56001__p204221142151112">Tags structure array</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="36.62366236623662%" headers="mcps1.3.3.2.1.1.1.5.1.4 "><p id="smn_api_56001__p11216103951310">Includes any of the specified tags. For details, see <a href="#smn_api_56001__table12385184281216">Table 1</a>.</p>
|
|
<div class="note" id="smn_api_56001__note431014399542"><span class="notetitle"> NOTE: </span><div class="notebody"><p id="smn_api_56001__p866964112266">The structure body is mandatory. A maximum of 20 tag keys are allowed in each query operation. The tag key cannot be left blank or set to the empty string. Each tag key can have up to 20 tag values. Each tag key and tag values of one key must be unique. Resources identified by different keys are in OR relationship.</p>
|
|
</div></div>
|
|
</td>
|
|
</tr>
|
|
<tr id="smn_api_56001__row13422164220114"><td class="cellrowborder" valign="top" width="16.87168716871687%" headers="mcps1.3.3.2.1.1.1.5.1.1 "><p id="smn_api_56001__p11422174261116">not_tags</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="22.562256225622562%" headers="mcps1.3.3.2.1.1.1.5.1.2 "><p id="smn_api_56001__p20422442141118">No</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="23.94239423942394%" headers="mcps1.3.3.2.1.1.1.5.1.3 "><p id="smn_api_56001__p1866963145215">Tags structure array</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="36.62366236623662%" headers="mcps1.3.3.2.1.1.1.5.1.4 "><p id="smn_api_56001__p82165399139">Excludes specified tags. For details, see <a href="#smn_api_56001__table12385184281216">Table 1</a>.</p>
|
|
<div class="note" id="smn_api_56001__note2715124713543"><span class="notetitle"> NOTE: </span><div class="notebody"><p id="smn_api_56001__p5575151173112">The structure body is mandatory. A maximum of 20 tag keys are allowed in each query operation. The tag key cannot be left blank or set to the empty string. Each tag key can have up to 20 tag values. Each tag key and tag values of one key must be unique. Resources identified by different keys are in NAND relationship.</p>
|
|
</div></div>
|
|
</td>
|
|
</tr>
|
|
<tr id="smn_api_56001__row0422194219118"><td class="cellrowborder" valign="top" width="16.87168716871687%" headers="mcps1.3.3.2.1.1.1.5.1.1 "><p id="smn_api_56001__p9422042101110">not_tags_any</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="22.562256225622562%" headers="mcps1.3.3.2.1.1.1.5.1.2 "><p id="smn_api_56001__p1342216420115">No</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="23.94239423942394%" headers="mcps1.3.3.2.1.1.1.5.1.3 "><p id="smn_api_56001__p64221742121116">Tags structure array</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="36.62366236623662%" headers="mcps1.3.3.2.1.1.1.5.1.4 "><p id="smn_api_56001__p12160393138">Excludes any of the specified tags. For details, see <a href="#smn_api_56001__table12385184281216">Table 1</a>.</p>
|
|
<div class="note" id="smn_api_56001__note121691756185412"><span class="notetitle"> NOTE: </span><div class="notebody"><p id="smn_api_56001__p4524152918316">The structure body is mandatory. A maximum of 20 tag keys are allowed in each query operation. The tag key cannot be left blank or set to the empty string. Each tag key can have up to 20 tag values. Each tag key and tag values of one key must be unique. Resources identified by different keys are in NOR relationship.</p>
|
|
</div></div>
|
|
</td>
|
|
</tr>
|
|
<tr id="smn_api_56001__row15422042151113"><td class="cellrowborder" valign="top" width="16.87168716871687%" headers="mcps1.3.3.2.1.1.1.5.1.1 "><p id="smn_api_56001__p174221442151111">limit</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="22.562256225622562%" headers="mcps1.3.3.2.1.1.1.5.1.2 "><p id="smn_api_56001__p342213429119">No</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="23.94239423942394%" headers="mcps1.3.3.2.1.1.1.5.1.3 "><p id="smn_api_56001__p8422442161119">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="36.62366236623662%" headers="mcps1.3.3.2.1.1.1.5.1.4 "><p id="smn_api_56001__p5699151414544">The maximum number of resources to be queried</p>
|
|
<ul id="smn_api_56001__ul2162893714"><li id="smn_api_56001__li014718231379">If <strong id="smn_api_56001__b842352706152943">action</strong> is set to <strong id="smn_api_56001__b842352706152951">count</strong>, this parameter does not take effect.</li><li id="smn_api_56001__li1616212917710">If <strong id="smn_api_56001__b84235270692122">action</strong> is set to <strong id="smn_api_56001__b84235270692134">filter</strong>, this parameter takes effect. Its value ranges from 1 to 1000 (default).</li></ul>
|
|
</td>
|
|
</tr>
|
|
<tr id="smn_api_56001__row5422142171118"><td class="cellrowborder" valign="top" width="16.87168716871687%" headers="mcps1.3.3.2.1.1.1.5.1.1 "><p id="smn_api_56001__p8437842141117">offset</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="22.562256225622562%" headers="mcps1.3.3.2.1.1.1.5.1.2 "><p id="smn_api_56001__p9437174281113">No</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="23.94239423942394%" headers="mcps1.3.3.2.1.1.1.5.1.3 "><p id="smn_api_56001__p1343724215117">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="36.62366236623662%" headers="mcps1.3.3.2.1.1.1.5.1.4 "><p id="smn_api_56001__p138117139135">Start location of pagination query. The query starts from the next resource of the specified location. You do not need to specify this parameter when you query resources on the first page. When you query resources on subsequent pages, set this parameter to the location returned in the response body for the previous query.</p>
|
|
<ul id="smn_api_56001__ul1279161261617"><li id="smn_api_56001__li9397920161316">If <strong id="smn_api_56001__b1214012720">action</strong> is set to <strong id="smn_api_56001__b2109352059">count</strong>, this parameter does not take effect.</li><li id="smn_api_56001__li92797127168">If <strong id="smn_api_56001__b84235270692726">action</strong> is set to <strong id="smn_api_56001__b84235270692731">filter</strong>, this parameter takes effect. Its value can be 0 (default) or a positive integer.</li></ul>
|
|
</td>
|
|
</tr>
|
|
<tr id="smn_api_56001__row54371642161115"><td class="cellrowborder" valign="top" width="16.87168716871687%" headers="mcps1.3.3.2.1.1.1.5.1.1 "><p id="smn_api_56001__p4437164210116">action</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="22.562256225622562%" headers="mcps1.3.3.2.1.1.1.5.1.2 "><p id="smn_api_56001__p44377426118">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="23.94239423942394%" headers="mcps1.3.3.2.1.1.1.5.1.3 "><p id="smn_api_56001__p10437742171119">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="36.62366236623662%" headers="mcps1.3.3.2.1.1.1.5.1.4 "><p id="smn_api_56001__p277291081511">Operation to be performed. The operation can be <strong id="smn_api_56001__b84235270616546">filter</strong> or <strong id="smn_api_56001__b84235270616552">count</strong> (case-sensitive).</p>
|
|
<p id="smn_api_56001__p1061044516952"><strong id="smn_api_56001__b1749576416952">filter</strong>: queries resources in pages based on filter conditions.</p>
|
|
<p id="smn_api_56001__p4081382911230"><strong id="smn_api_56001__b84235270620460">count</strong>: queries the total number of resources meeting filter conditions.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="smn_api_56001__row543716422116"><td class="cellrowborder" valign="top" width="16.87168716871687%" headers="mcps1.3.3.2.1.1.1.5.1.1 "><p id="smn_api_56001__p13437164216113">matches</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="22.562256225622562%" headers="mcps1.3.3.2.1.1.1.5.1.2 "><p id="smn_api_56001__p14437184241113">No</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="23.94239423942394%" headers="mcps1.3.3.2.1.1.1.5.1.3 "><p id="smn_api_56001__p11437114217112">Match condition structure array</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="36.62366236623662%" headers="mcps1.3.3.2.1.1.1.5.1.4 "><p id="smn_api_56001__p2991175121517">Key-value pair to be matched</p>
|
|
<p id="smn_api_56001__p8184185775619">The key can only be <strong id="smn_api_56001__b842352706161550">resource_name</strong>.</p>
|
|
<p id="smn_api_56001__p11842575562">The value will be exactly matched.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
|
|
<div class="tablenoborder"><a name="smn_api_56001__table12385184281216"></a><a name="table12385184281216"></a><table cellpadding="4" cellspacing="0" summary="" id="smn_api_56001__table12385184281216" frame="border" border="1" rules="all"><caption><b>Table 1 </b>Tags structure</caption><thead align="left"><tr id="smn_api_56001__row12526442141213"><th align="left" class="cellrowborder" valign="top" width="18.16%" id="mcps1.3.3.2.1.2.2.6.1.1"><p id="smn_api_56001__p1252612428129"><strong id="smn_api_56001__b47901755163415">Parameter</strong></p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="12.030000000000001%" id="mcps1.3.3.2.1.2.2.6.1.2"><p id="smn_api_56001__p852612421125"><strong id="smn_api_56001__b1997376221">Mandatory</strong></p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="16.81%" id="mcps1.3.3.2.1.2.2.6.1.3"><p id="smn_api_56001__p14526542121214"><strong id="smn_api_56001__b1995168232">Type</strong></p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="18.65%" id="mcps1.3.3.2.1.2.2.6.1.4"><p id="smn_api_56001__p17526124281215"><strong id="smn_api_56001__b63411457103415">Description</strong></p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="34.35%" id="mcps1.3.3.2.1.2.2.6.1.5"><p id="smn_api_56001__p12294162622414"><strong id="smn_api_56001__b167841358163418">Constraint</strong></p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="smn_api_56001__row1526194218129"><td class="cellrowborder" valign="top" width="18.16%" headers="mcps1.3.3.2.1.2.2.6.1.1 "><p id="smn_api_56001__p65262427126">key</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="12.030000000000001%" headers="mcps1.3.3.2.1.2.2.6.1.2 "><p id="smn_api_56001__p4526154211123">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="16.81%" headers="mcps1.3.3.2.1.2.2.6.1.3 "><p id="smn_api_56001__p35261242171216">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="18.65%" headers="mcps1.3.3.2.1.2.2.6.1.4 "><p id="smn_api_56001__p552604213129">Tag key</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="34.35%" headers="mcps1.3.3.2.1.2.2.6.1.5 "><p id="smn_api_56001__p6294172612244">A key can contain up to 36 Unicode characters and cannot be left blank.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="smn_api_56001__row55261142141216"><td class="cellrowborder" valign="top" width="18.16%" headers="mcps1.3.3.2.1.2.2.6.1.1 "><p id="smn_api_56001__p1852614219127">values</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="12.030000000000001%" headers="mcps1.3.3.2.1.2.2.6.1.2 "><p id="smn_api_56001__p11526104271211">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="16.81%" headers="mcps1.3.3.2.1.2.2.6.1.3 "><p id="smn_api_56001__p45262426129">String list</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="18.65%" headers="mcps1.3.3.2.1.2.2.6.1.4 "><p id="smn_api_56001__p152694220126">Value list</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="34.35%" headers="mcps1.3.3.2.1.2.2.6.1.5 "><p id="smn_api_56001__p18294152612244">Each value can contain up to 43 Unicode characters. If a value starts with an asterisk (*), the string following the asterisk is fuzzy-matched. The <strong id="smn_api_56001__b18353175912112">values</strong> field cannot be missing, but can be an empty list. If it is empty, any value will be matched. Values are in the OR relationship.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</li><li id="smn_api_56001__li1873356132">Example request<pre class="screen" id="smn_api_56001__screen5698195161310">POST https://{SMN_Endpoint}/v2/{project_id}/{resource_type}/resource_instances/action</pre>
|
|
<ul id="smn_api_56001__ul863811274512"><li id="smn_api_56001__li1118214961317">Request body when <strong id="smn_api_56001__b8423527069451">action</strong> is set to <strong id="smn_api_56001__b84235270694459">filter</strong><pre class="screen" id="smn_api_56001__screen6135153201618">{
|
|
"offset": "100",
|
|
"limit": "100",
|
|
"action": "filter",
|
|
"matches":[
|
|
{
|
|
"key": "resource_name",
|
|
"value": "resource1"
|
|
}
|
|
],
|
|
"not_tags": [
|
|
{
|
|
"key": "key1",
|
|
"values": ["*value1","value2"]
|
|
},
|
|
{
|
|
"key": "key2",
|
|
"values": ["*value21","value22"]
|
|
}
|
|
],
|
|
"tags": [
|
|
{
|
|
"key": "key1",
|
|
"values": ["*value1","value2"]
|
|
}
|
|
],
|
|
"tags_any": [
|
|
{
|
|
"key": "key1",
|
|
"values": ["value1", "value2"]
|
|
}
|
|
],
|
|
"not_tags_any": [
|
|
{
|
|
"key": "key1",
|
|
"values": ["value1", "value2"]
|
|
}
|
|
]
|
|
}</pre>
|
|
</li><li id="smn_api_56001__li1544895220157">Request body when <strong id="smn_api_56001__b1904181061">action</strong> is set to <strong id="smn_api_56001__b608983442">count</strong><pre class="screen" id="smn_api_56001__screen1214633101620">{
|
|
"action": "count",
|
|
"not_tags": [
|
|
{
|
|
"key": "key1",
|
|
"values": ["value1", "*value2"]
|
|
}
|
|
],
|
|
"tags": [
|
|
{
|
|
"key": "key1",
|
|
"values": ["value1", "value2"]
|
|
}
|
|
],
|
|
"tags_any": [
|
|
{
|
|
"key": "key1",
|
|
"values": [ "value1", "value2"]
|
|
}
|
|
],
|
|
"not_tags_any": [
|
|
{
|
|
"key": "key1",
|
|
"values": ["value1", "value2"]
|
|
}
|
|
],
|
|
"matches":[
|
|
{
|
|
"key": "resource_name",
|
|
"value": "resource"
|
|
}
|
|
]
|
|
}</pre>
|
|
</li></ul>
|
|
</li></ul>
|
|
</div>
|
|
<div class="section" id="smn_api_56001__section13775125191714"><h4 class="sectiontitle">Response</h4><ul id="smn_api_56001__ul19931151171720"><li id="smn_api_56001__li89311451181715">Parameter description
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="smn_api_56001__table479165191720" frame="border" border="1" rules="all"><thead align="left"><tr id="smn_api_56001__row17931135116172"><th align="left" class="cellrowborder" valign="top" width="24.552455245524552%" id="mcps1.3.4.2.1.1.1.4.1.1"><p id="smn_api_56001__p15931551181711"><strong id="smn_api_56001__b61024355">Parameter</strong></p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="34.9034903490349%" id="mcps1.3.4.2.1.1.1.4.1.2"><p id="smn_api_56001__p1293118514171"><strong id="smn_api_56001__b829959181">Type</strong></p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="40.54405440544054%" id="mcps1.3.4.2.1.1.1.4.1.3"><p id="smn_api_56001__p1493155131717"><strong id="smn_api_56001__b576657895">Description</strong></p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="smn_api_56001__row189311551101713"><td class="cellrowborder" valign="top" width="24.552455245524552%" headers="mcps1.3.4.2.1.1.1.4.1.1 "><p id="smn_api_56001__p093165181714">resources</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="34.9034903490349%" headers="mcps1.3.4.2.1.1.1.4.1.2 "><p id="smn_api_56001__p19931165111175">Resource structure array</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="40.54405440544054%" headers="mcps1.3.4.2.1.1.1.4.1.3 "><p id="smn_api_56001__p0482182011216">For details, see <a href="#smn_api_56001__table97917514177">Table 2</a>.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="smn_api_56001__row1393115111174"><td class="cellrowborder" valign="top" width="24.552455245524552%" headers="mcps1.3.4.2.1.1.1.4.1.1 "><p id="smn_api_56001__p9931195191717">total_count</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="34.9034903490349%" headers="mcps1.3.4.2.1.1.1.4.1.2 "><p id="smn_api_56001__p89313512179">Integer</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="40.54405440544054%" headers="mcps1.3.4.2.1.1.1.4.1.3 "><p id="smn_api_56001__p7931251111720">Total number of resources.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
|
|
<div class="tablenoborder"><a name="smn_api_56001__table97917514177"></a><a name="table97917514177"></a><table cellpadding="4" cellspacing="0" summary="" id="smn_api_56001__table97917514177" frame="border" border="1" rules="all"><caption><b>Table 2 </b>Resource structure</caption><thead align="left"><tr id="smn_api_56001__row20931851161717"><th align="left" class="cellrowborder" valign="top" width="24.54%" id="mcps1.3.4.2.1.2.2.4.1.1"><p id="smn_api_56001__p169312051161713"><strong id="smn_api_56001__b520919401466">Parameter</strong></p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="35.480000000000004%" id="mcps1.3.4.2.1.2.2.4.1.2"><p id="smn_api_56001__p093195116179"><strong id="smn_api_56001__b1150262545">Type</strong></p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="39.98%" id="mcps1.3.4.2.1.2.2.4.1.3"><p id="smn_api_56001__p59319515179"><strong id="smn_api_56001__b13369124134610">Description</strong></p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="smn_api_56001__row393195119172"><td class="cellrowborder" valign="top" width="24.54%" headers="mcps1.3.4.2.1.2.2.4.1.1 "><p id="smn_api_56001__p1793165110171">resource_id</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="35.480000000000004%" headers="mcps1.3.4.2.1.2.2.4.1.2 "><p id="smn_api_56001__p69311951191710">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="39.98%" headers="mcps1.3.4.2.1.2.2.4.1.3 "><p id="smn_api_56001__p1931175111170">Resource ID</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="smn_api_56001__row493125112176"><td class="cellrowborder" valign="top" width="24.54%" headers="mcps1.3.4.2.1.2.2.4.1.1 "><p id="smn_api_56001__p2931165110176">resource_detail</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="35.480000000000004%" headers="mcps1.3.4.2.1.2.2.4.1.2 "><p id="smn_api_56001__p293145151713">Object</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="39.98%" headers="mcps1.3.4.2.1.2.2.4.1.3 "><p id="smn_api_56001__p1793113514176">Resource details Resource object used for extension. <strong id="smn_api_56001__b10749412101518">resource_detail</strong> is left blank by default.</p>
|
|
<p id="smn_api_56001__p826215381712">For topic resources, the value of this field is <strong id="smn_api_56001__b842352706143216">{"topic_urn":"${TopicUrn}","display_name":"display name"}</strong>.</p>
|
|
<p id="smn_api_56001__p1226217381177">For other resources, the value is <strong id="smn_api_56001__b82963378259">null</strong>.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="smn_api_56001__row8931195121716"><td class="cellrowborder" valign="top" width="24.54%" headers="mcps1.3.4.2.1.2.2.4.1.1 "><p id="smn_api_56001__p29311851181715">tags</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="35.480000000000004%" headers="mcps1.3.4.2.1.2.2.4.1.2 "><p id="smn_api_56001__p69311851201711">Resource_tag structure array</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="39.98%" headers="mcps1.3.4.2.1.2.2.4.1.3 "><p id="smn_api_56001__p20931135117174">List of queried tags. If no tag is matched, an empty array is returned. For details, see <a href="#smn_api_56001__table178221351151717">Table 3</a>.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="smn_api_56001__row493125112175"><td class="cellrowborder" valign="top" width="24.54%" headers="mcps1.3.4.2.1.2.2.4.1.1 "><p id="smn_api_56001__p9931135131716">resource_name</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="35.480000000000004%" headers="mcps1.3.4.2.1.2.2.4.1.2 "><p id="smn_api_56001__p99312519176">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="39.98%" headers="mcps1.3.4.2.1.2.2.4.1.3 "><p id="smn_api_56001__p893175191714">Resource name</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
|
|
<div class="tablenoborder"><a name="smn_api_56001__table178221351151717"></a><a name="table178221351151717"></a><table cellpadding="4" cellspacing="0" summary="" id="smn_api_56001__table178221351151717" frame="border" border="1" rules="all"><caption><b>Table 3 </b>Resource_tag structure</caption><thead align="left"><tr id="smn_api_56001__row139311651171713"><th align="left" class="cellrowborder" valign="top" width="24.672467246724672%" id="mcps1.3.4.2.1.3.2.5.1.1"><p id="smn_api_56001__p993135161718"><strong id="smn_api_56001__b6377153915111">Parameter</strong></p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="16.5016501650165%" id="mcps1.3.4.2.1.3.2.5.1.2"><p id="smn_api_56001__p13931451141710"><strong id="smn_api_56001__b496436261">Type</strong></p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="15.291529152915292%" id="mcps1.3.4.2.1.3.2.5.1.3"><p id="smn_api_56001__p393125141712"><strong id="smn_api_56001__b36311841175120">Description</strong></p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="43.53435343534354%" id="mcps1.3.4.2.1.3.2.5.1.4"><p id="smn_api_56001__p1715443212610"><strong id="smn_api_56001__b134437429517">Constraint</strong></p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="smn_api_56001__row3931105113173"><td class="cellrowborder" valign="top" width="24.672467246724672%" headers="mcps1.3.4.2.1.3.2.5.1.1 "><p id="smn_api_56001__p17931145131711">key</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="16.5016501650165%" headers="mcps1.3.4.2.1.3.2.5.1.2 "><p id="smn_api_56001__p16931751111714">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="15.291529152915292%" headers="mcps1.3.4.2.1.3.2.5.1.3 "><p id="smn_api_56001__p393175116171">Tag key</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="43.53435343534354%" headers="mcps1.3.4.2.1.3.2.5.1.4 "><p id="smn_api_56001__p171314419267">A key can contain up to 36 Unicode characters, including only digits, letters, hyphens (-), and underscores (_). A key cannot be left blank, be an empty string, or start or end with a space.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="smn_api_56001__row39312515173"><td class="cellrowborder" valign="top" width="24.672467246724672%" headers="mcps1.3.4.2.1.3.2.5.1.1 "><p id="smn_api_56001__p09311651171711">value</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="16.5016501650165%" headers="mcps1.3.4.2.1.3.2.5.1.2 "><p id="smn_api_56001__p14931751141720">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="15.291529152915292%" headers="mcps1.3.4.2.1.3.2.5.1.3 "><p id="smn_api_56001__p159313515179">Tag value</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="43.53435343534354%" headers="mcps1.3.4.2.1.3.2.5.1.4 "><p id="smn_api_56001__p344164632615">A value can contain up to 43 Unicode characters, including only digits, letters, hyphens (-), and underscores (_). A value can be an empty string, but it cannot start or end with a space.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</li></ul>
|
|
<ul id="smn_api_56001__ul8931651101717"><li id="smn_api_56001__li29312513174">Example response<p id="smn_api_56001__p293117515178"><a name="smn_api_56001__li29312513174"></a><a name="li29312513174"></a>Response body when <strong id="smn_api_56001__b8423527069924">action</strong> is set to <strong id="smn_api_56001__b8423527069921">filter</strong></p>
|
|
<pre class="screen" id="smn_api_56001__screen1393117519172">{
|
|
"resources": [
|
|
{
|
|
"resource_detail": {
|
|
"topic_urn":"urn:smn:regionId:f96188c7ccaf4ffba0c9aa149ab2bd57:resource1",
|
|
"display_name":"testtest"
|
|
},
|
|
"resource_id": "cffe4fc4c9a54219b60dbaf7b586e132",
|
|
"resource_name": "resource1",
|
|
"tags": [
|
|
{
|
|
"key": "key1",
|
|
"value": "value1"
|
|
}
|
|
]
|
|
}
|
|
],
|
|
"total_count": 1000
|
|
}</pre>
|
|
<p id="smn_api_56001__p19947125121719">Response body when <strong id="smn_api_56001__b781703309">action</strong> is set to <strong id="smn_api_56001__b1546560817">count</strong></p>
|
|
<pre class="screen" id="smn_api_56001__screen59473514173">{
|
|
"total_count": 1000
|
|
}</pre>
|
|
</li></ul>
|
|
</div>
|
|
<div class="section" id="smn_api_56001__section104011733101818"><h4 class="sectiontitle">Returned Value</h4><p id="smn_api_56001__p144041524121813">See <a href="smn_api_63002.html">Returned Value</a>.</p>
|
|
</div>
|
|
<div class="section" id="smn_api_56001__section73211020122511"><h4 class="sectiontitle">Error Codes</h4><p id="smn_api_56001__p9759142919265">See <a href="smn_api_64000.html">Error Codes</a>.</p>
|
|
</div>
|
|
</div>
|
|
<div>
|
|
<div class="familylinks">
|
|
<div class="parentlink"><strong>Parent topic:</strong> <a href="smn_api_56000.html">Resource Tag Operations</a></div>
|
|
</div>
|
|
</div>
|
|
|