forked from docs/doc-exports
Reviewed-by: gtema <artem.goncharov@gmail.com> Co-authored-by: zhangyue <zhangyue164@huawei.com> Co-committed-by: zhangyue <zhangyue164@huawei.com>
122 lines
11 KiB
HTML
122 lines
11 KiB
HTML
<a name="en-us_topic_0057845599"></a><a name="en-us_topic_0057845599"></a>
|
|
|
|
<h1 class="topictitle1">Querying Whether a User Belongs to a User Group</h1>
|
|
<div id="body1492670576102"><div class="section" id="en-us_topic_0057845599__section495175389414"><h4 class="sectiontitle">Function</h4><p id="en-us_topic_0057845599__p14729421679">This API is used to query whether a user belongs to a user group.</p>
|
|
</div>
|
|
<div class="section" id="en-us_topic_0057845599__section3019338085013"><h4 class="sectiontitle">URI</h4><ul id="en-us_topic_0057845599__en-us_topic_0032920307_ul52733512"><li id="en-us_topic_0057845599__en-us_topic_0032920307_li4839561">URI format<p id="en-us_topic_0057845599__p47994226103437"><a name="en-us_topic_0057845599__en-us_topic_0032920307_li4839561"></a><a name="en-us_topic_0032920307_li4839561"></a>HEAD /v3/groups/{group_id}/users/{user_id}</p>
|
|
</li><li id="en-us_topic_0057845599__li40941434103446">URI parameters
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="en-us_topic_0057845599__en-us_topic_0032920307_table36168141" frame="border" border="1" rules="all"><thead align="left"><tr id="en-us_topic_0057845599__en-us_topic_0032920307_row15662289"><th align="left" class="cellrowborder" valign="top" width="19.36%" id="mcps1.3.2.2.2.1.1.5.1.1"><p id="en-us_topic_0057845599__en-us_topic_0032920307_p60685926"><strong id="en-us_topic_0057845599__b842352706112123">Parameter</strong></p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="19.24%" id="mcps1.3.2.2.2.1.1.5.1.2"><p id="en-us_topic_0057845599__en-us_topic_0032920307_p16612996"><strong id="en-us_topic_0057845599__a105e6ed8c3de4c5a9dde97ae5a71071e_1">Mandatory</strong></p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="17.18%" id="mcps1.3.2.2.2.1.1.5.1.3"><p id="en-us_topic_0057845599__en-us_topic_0032920307_p3475410"><strong id="en-us_topic_0057845599__b842352706143526_1">Type</strong></p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="44.22%" id="mcps1.3.2.2.2.1.1.5.1.4"><p id="en-us_topic_0057845599__en-us_topic_0032920307_p13072760"><strong id="en-us_topic_0057845599__b20601766145329_1">Description</strong></p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="en-us_topic_0057845599__en-us_topic_0032920307_row52260639"><td class="cellrowborder" valign="top" width="19.36%" headers="mcps1.3.2.2.2.1.1.5.1.1 "><p id="en-us_topic_0057845599__en-us_topic_0032920307_p5253358">group_id</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="19.24%" headers="mcps1.3.2.2.2.1.1.5.1.2 "><p id="en-us_topic_0057845599__en-us_topic_0032920307_p22868878">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="17.18%" headers="mcps1.3.2.2.2.1.1.5.1.3 "><p id="en-us_topic_0057845599__en-us_topic_0032920307_p40439847">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="44.22%" headers="mcps1.3.2.2.2.1.1.5.1.4 "><p id="en-us_topic_0057845599__en-us_topic_0032920307_p54402144">ID of a user group.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="en-us_topic_0057845599__row980208103522"><td class="cellrowborder" valign="top" width="19.36%" headers="mcps1.3.2.2.2.1.1.5.1.1 "><p id="en-us_topic_0057845599__p8821877103522">user_id</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="19.24%" headers="mcps1.3.2.2.2.1.1.5.1.2 "><p id="en-us_topic_0057845599__p43483414103522">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="17.18%" headers="mcps1.3.2.2.2.1.1.5.1.3 "><p id="en-us_topic_0057845599__p32495677103522">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="44.22%" headers="mcps1.3.2.2.2.1.1.5.1.4 "><p id="en-us_topic_0057845599__p14904143103522">ID of a user.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</li></ul>
|
|
</div>
|
|
<div class="section" id="en-us_topic_0057845599__section1437107585444"><h4 class="sectiontitle">Request Parameters</h4><ul id="en-us_topic_0057845599__ul3118448103456"><li id="en-us_topic_0057845599__li46500394103456">Parameters in the request header
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="en-us_topic_0057845599__en-us_topic_0032920307_table21736211" frame="border" border="1" rules="all"><thead align="left"><tr id="en-us_topic_0057845599__en-us_topic_0032920307_row48433347"><th align="left" class="cellrowborder" valign="top" width="19.49%" id="mcps1.3.3.2.1.1.1.5.1.1"><p id="en-us_topic_0057845599__en-us_topic_0032920307_p30787047"><strong id="en-us_topic_0057845599__a173ae121cc9e48328ca613e72f2a1504">Parameter</strong></p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="18.86%" id="mcps1.3.3.2.1.1.1.5.1.2"><p id="en-us_topic_0057845599__en-us_topic_0032920307_p10722842"><strong id="en-us_topic_0057845599__a105e6ed8c3de4c5a9dde97ae5a71071e_3">Mandatory</strong></p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="17.57%" id="mcps1.3.3.2.1.1.1.5.1.3"><p id="en-us_topic_0057845599__en-us_topic_0032920307_p63243911"><strong id="en-us_topic_0057845599__b842352706143526_3">Type</strong></p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="44.080000000000005%" id="mcps1.3.3.2.1.1.1.5.1.4"><p id="en-us_topic_0057845599__en-us_topic_0032920307_p22483156"><strong id="en-us_topic_0057845599__b20601766145329_3">Description</strong></p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="en-us_topic_0057845599__en-us_topic_0032920307_row9196329"><td class="cellrowborder" valign="top" width="19.49%" headers="mcps1.3.3.2.1.1.1.5.1.1 "><p id="en-us_topic_0057845599__en-us_topic_0032920307_p6705199">Content-Type</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="18.86%" headers="mcps1.3.3.2.1.1.1.5.1.2 "><p id="en-us_topic_0057845599__en-us_topic_0032920307_p6250253">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="17.57%" headers="mcps1.3.3.2.1.1.1.5.1.3 "><p id="en-us_topic_0057845599__en-us_topic_0032920307_p36508524">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="44.080000000000005%" headers="mcps1.3.3.2.1.1.1.5.1.4 "><p id="en-us_topic_0057845599__en-us_topic_0032920307_p4400500">Fill <strong id="en-us_topic_0057845599__b842352706161331">application/json;charset=utf8</strong> in this field.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="en-us_topic_0057845599__en-us_topic_0032920307_row39604502"><td class="cellrowborder" valign="top" width="19.49%" headers="mcps1.3.3.2.1.1.1.5.1.1 "><p id="en-us_topic_0057845599__en-us_topic_0032920307_p53848109">X-Auth-Token</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="18.86%" headers="mcps1.3.3.2.1.1.1.5.1.2 "><p id="en-us_topic_0057845599__en-us_topic_0032920307_p66729601">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="17.57%" headers="mcps1.3.3.2.1.1.1.5.1.3 "><p id="en-us_topic_0057845599__en-us_topic_0032920307_p36388601">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="44.080000000000005%" headers="mcps1.3.3.2.1.1.1.5.1.4 "><p id="en-us_topic_0057845599__p3946364911720">Authenticated token with the <strong id="en-us_topic_0057845599__b750798910387">Security Administrator</strong> permission.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</li></ul>
|
|
<ul id="en-us_topic_0057845599__ul2355895152636"><li id="en-us_topic_0057845599__li9667726152636">Example request<pre class="screen" id="en-us_topic_0057845599__screen12992164152636"><em id="en-us_topic_0057845599__i57349465152647">curl -i -k -H 'Accept:application/json' -H 'Content-Type:application/json;charset=utf8' -H "X-Auth-Token:$token" -X HEAD https://sample.domain.com/v3/groups/00007111583e457389b0d4252643181b/users/edb66d2b656c43d0b67fb143d670bb3a</em></pre>
|
|
</li></ul>
|
|
</div>
|
|
<div class="section" id="en-us_topic_0057845599__section8667210111114"><h4 class="sectiontitle">Response Parameters</h4><p id="en-us_topic_0057845599__p1066714103119">None</p>
|
|
</div>
|
|
<div class="section" id="en-us_topic_0057845599__section5556784894735"><h4 class="sectiontitle">Status Codes</h4>
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="en-us_topic_0057845599__en-us_topic_0032920307_table25927028" frame="border" border="1" rules="all"><thead align="left"><tr id="en-us_topic_0057845599__en-us_topic_0032920307_row10578662"><th align="left" class="cellrowborder" valign="top" width="50%" id="mcps1.3.5.2.1.3.1.1"><p id="en-us_topic_0057845599__en-us_topic_0032920307_p51565323"><strong id="en-us_topic_0057845599__b37286657175230">Status Code</strong></p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="50%" id="mcps1.3.5.2.1.3.1.2"><p id="en-us_topic_0057845599__en-us_topic_0032920307_p16041657"><strong id="en-us_topic_0057845599__b20601766145329_5">Description</strong></p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="en-us_topic_0057845599__en-us_topic_0032920307_row24305815"><td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.5.2.1.3.1.1 "><p id="en-us_topic_0057845599__en-us_topic_0032920307_p22613965">204</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.5.2.1.3.1.2 "><p id="en-us_topic_0057845599__en-us_topic_0032920307_p19791876">The user belongs to this user group.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="en-us_topic_0057845599__en-us_topic_0032920307_row43909159"><td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.5.2.1.3.1.1 "><p id="en-us_topic_0057845599__en-us_topic_0032920307_p66980994">400</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.5.2.1.3.1.2 "><p id="en-us_topic_0057845599__en-us_topic_0032920307_p56751409">The server failed to process the request.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="en-us_topic_0057845599__row460808479497"><td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.5.2.1.3.1.1 "><p id="en-us_topic_0057845599__p120744399497">401</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.5.2.1.3.1.2 "><p id="en-us_topic_0057845599__p385055099497">Authentication failed.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="en-us_topic_0057845599__en-us_topic_0032920307_row41000636"><td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.5.2.1.3.1.1 "><p id="en-us_topic_0057845599__en-us_topic_0032920307_p32717189">403</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.5.2.1.3.1.2 "><p id="en-us_topic_0057845599__en-us_topic_0032920307_p32846614">Access denied.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="en-us_topic_0057845599__row2569718985351"><td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.5.2.1.3.1.1 "><p id="en-us_topic_0057845599__p2994811485351">404</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.5.2.1.3.1.2 "><p id="en-us_topic_0057845599__p987817085351">The server could not find the requested page, or the user does not belong to this user group.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div>
|
|
<div class="familylinks">
|
|
<div class="parentlink"><strong>Parent topic:</strong> <a href="en-us_topic_0057845641.html">User Group Management</a></div>
|
|
</div>
|
|
</div>
|
|
|