forked from docs/doc-exports
Reviewed-by: Pruthi, Vineet <vineet.pruthi@t-systems.com> Co-authored-by: Su, Xiaomeng <suxiaomeng1@huawei.com> Co-committed-by: Su, Xiaomeng <suxiaomeng1@huawei.com>
171 lines
13 KiB
HTML
171 lines
13 KiB
HTML
<a name="dli_02_0041"></a><a name="dli_02_0041"></a>
|
|
|
|
<h1 class="topictitle1">Querying Table Users</h1>
|
|
<div id="body8662426"><div class="section" id="dli_02_0041__sd6e8c88e7f1940f2874203753a466f65"><h4 class="sectiontitle">Function</h4><p id="dli_02_0041__en-us_topic_0069077918_p8886982">This API is used to query users who have permission to access the specified table or column in the table.</p>
|
|
</div>
|
|
<div class="section" id="dli_02_0041__s5d7df6cd9c2d47028149e6d4427a8c62"><h4 class="sectiontitle">URI</h4><ul id="dli_02_0041__en-us_topic_0069077918_ul48756965"><li id="dli_02_0041__en-us_topic_0069077918_li36159504">URI format<p id="dli_02_0041__en-us_topic_0069077918_p57000088"><a name="dli_02_0041__en-us_topic_0069077918_li36159504"></a><a name="en-us_topic_0069077918_li36159504"></a>GET /v1.0/{project_id}/databases/{database_name}/tables/{table_name}/users</p>
|
|
</li><li id="dli_02_0041__li5553130142810">Parameter description
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="dli_02_0041__en-us_topic_0069077918_table43238749" frame="border" border="1" rules="all"><caption><b>Table 1 </b>URI parameters</caption><thead align="left"><tr id="dli_02_0041__en-us_topic_0069077918_row10278610"><th align="left" class="cellrowborder" valign="top" width="18.87%" id="mcps1.3.2.2.2.1.2.4.1.1"><p id="dli_02_0041__a35bce72f7ded4b6ca6e6e7b072f761fe">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="11.05%" id="mcps1.3.2.2.2.1.2.4.1.2"><p id="dli_02_0041__ac062951b77994dac995dfc893a33c0b0">Mandatory</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="70.08%" id="mcps1.3.2.2.2.1.2.4.1.3"><p id="dli_02_0041__aa286ad371d454f5aa19bff6be13f6014">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="dli_02_0041__row6409104654212"><td class="cellrowborder" valign="top" width="18.87%" headers="mcps1.3.2.2.2.1.2.4.1.1 "><p id="dli_02_0041__en-us_topic_0069077803_p43412436">project_id</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="11.05%" headers="mcps1.3.2.2.2.1.2.4.1.2 "><p id="dli_02_0041__en-us_topic_0069077803_p26746391">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="70.08%" headers="mcps1.3.2.2.2.1.2.4.1.3 "><p id="dli_02_0041__p1310472724012">Project ID, which is used for resource isolation. For details about how to obtain its value, see <a href="dli_02_0183.html">Obtaining a Project ID</a>.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="dli_02_0041__en-us_topic_0069077918_row24370534"><td class="cellrowborder" valign="top" width="18.87%" headers="mcps1.3.2.2.2.1.2.4.1.1 "><p id="dli_02_0041__en-us_topic_0069077918_p27856265">database_name</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="11.05%" headers="mcps1.3.2.2.2.1.2.4.1.2 "><p id="dli_02_0041__en-us_topic_0069077918_p41764972">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="70.08%" headers="mcps1.3.2.2.2.1.2.4.1.3 "><p id="dli_02_0041__en-us_topic_0069077918_p27519543">Name of the database where the table to be queried resides.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="dli_02_0041__en-us_topic_0069077918_row46349299"><td class="cellrowborder" valign="top" width="18.87%" headers="mcps1.3.2.2.2.1.2.4.1.1 "><p id="dli_02_0041__en-us_topic_0069077918_p63305775">table_name</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="11.05%" headers="mcps1.3.2.2.2.1.2.4.1.2 "><p id="dli_02_0041__en-us_topic_0069077918_p27494118">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="70.08%" headers="mcps1.3.2.2.2.1.2.4.1.3 "><p id="dli_02_0041__en-us_topic_0069077918_p12431106">Name of a table that is to be queried.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</li></ul>
|
|
</div>
|
|
<div class="section" id="dli_02_0041__s0321aaf2b6284c30a7005c347cb5221f"><h4 class="sectiontitle">Request</h4><p id="dli_02_0041__p32379447153853">None</p>
|
|
</div>
|
|
<div class="section" id="dli_02_0041__sd9070f4194864f98afe3de3144ecde9f"><h4 class="sectiontitle">Response</h4>
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="dli_02_0041__en-us_topic_0069077918_table21854507" frame="border" border="1" rules="all"><caption><b>Table 2 </b>Response parameters</caption><thead align="left"><tr id="dli_02_0041__en-us_topic_0069077918_row1790386"><th align="left" class="cellrowborder" valign="top" width="11.64%" id="mcps1.3.4.2.2.5.1.1"><p id="dli_02_0041__a9eb53c603ed9485fb7c6e3f4f8ae53b3">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="9.47%" id="mcps1.3.4.2.2.5.1.2"><p id="dli_02_0041__p2014422512351">Mandatory</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="18.63%" id="mcps1.3.4.2.2.5.1.3"><p id="dli_02_0041__a22ea636f3fe441229b86c5f27471efb1">Type</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="60.260000000000005%" id="mcps1.3.4.2.2.5.1.4"><p id="dli_02_0041__ab8d3aa509ab24b35bfcfc434c8ac9a6c">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="dli_02_0041__en-us_topic_0069077918_row63130693"><td class="cellrowborder" valign="top" width="11.64%" headers="mcps1.3.4.2.2.5.1.1 "><p id="dli_02_0041__en-us_topic_0069077918_p13312517">is_success</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="9.47%" headers="mcps1.3.4.2.2.5.1.2 "><p id="dli_02_0041__p1414462510354">No</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="18.63%" headers="mcps1.3.4.2.2.5.1.3 "><p id="dli_02_0041__en-us_topic_0069077918_p34793626">Boolean</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="60.260000000000005%" headers="mcps1.3.4.2.2.5.1.4 "><p id="dli_02_0041__p1260053913153">Whether the request is successfully executed. Value <span class="parmvalue" id="dli_02_0041__parmvalue11899883161058"><b>true</b></span> indicates that the request is successfully executed.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="dli_02_0041__en-us_topic_0069077918_row64511672"><td class="cellrowborder" valign="top" width="11.64%" headers="mcps1.3.4.2.2.5.1.1 "><p id="dli_02_0041__en-us_topic_0069077918_p58062983">message</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="9.47%" headers="mcps1.3.4.2.2.5.1.2 "><p id="dli_02_0041__p101448253356">No</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="18.63%" headers="mcps1.3.4.2.2.5.1.3 "><p id="dli_02_0041__en-us_topic_0069077918_p41325255">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="60.260000000000005%" headers="mcps1.3.4.2.2.5.1.4 "><p id="dli_02_0041__p1600193917153">System prompt. If execution succeeds, the parameter setting may be left blank.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="dli_02_0041__row62331737151936"><td class="cellrowborder" valign="top" width="11.64%" headers="mcps1.3.4.2.2.5.1.1 "><p id="dli_02_0041__p27546183151952">privileges</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="9.47%" headers="mcps1.3.4.2.2.5.1.2 "><p id="dli_02_0041__p1214432517351">No</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="18.63%" headers="mcps1.3.4.2.2.5.1.3 "><p id="dli_02_0041__p6340639151952">Array <Objects></p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="60.260000000000005%" headers="mcps1.3.4.2.2.5.1.4 "><p id="dli_02_0041__p25622788151936">Permission information. For details, see <a href="#dli_02_0041__table56781141366">Table 3</a>.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
|
|
<div class="tablenoborder"><a name="dli_02_0041__table56781141366"></a><a name="table56781141366"></a><table cellpadding="4" cellspacing="0" summary="" id="dli_02_0041__table56781141366" frame="border" border="1" rules="all"><caption><b>Table 3 </b><strong id="dli_02_0041__b11183572268">privileges</strong> parameters</caption><thead align="left"><tr id="dli_02_0041__row17679514153613"><th align="left" class="cellrowborder" valign="top" width="11.64%" id="mcps1.3.4.3.2.5.1.1"><p id="dli_02_0041__p8679201415369">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="9.47%" id="mcps1.3.4.3.2.5.1.2"><p id="dli_02_0041__p1867912140364">Mandatory</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="12.989999999999998%" id="mcps1.3.4.3.2.5.1.3"><p id="dli_02_0041__p1667911142365">Type</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="65.9%" id="mcps1.3.4.3.2.5.1.4"><p id="dli_02_0041__p3679814183615">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="dli_02_0041__row368081418361"><td class="cellrowborder" valign="top" width="11.64%" headers="mcps1.3.4.3.2.5.1.1 "><p id="dli_02_0041__p176817144368">is_admin</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="9.47%" headers="mcps1.3.4.3.2.5.1.2 "><p id="dli_02_0041__p7681151412369">No</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="12.989999999999998%" headers="mcps1.3.4.3.2.5.1.3 "><p id="dli_02_0041__p106811814133611">Boolean</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="65.9%" headers="mcps1.3.4.3.2.5.1.4 "><p id="dli_02_0041__p156811114173615">Whether the table user is an administrator.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="dli_02_0041__row1168116140360"><td class="cellrowborder" valign="top" width="11.64%" headers="mcps1.3.4.3.2.5.1.1 "><p id="dli_02_0041__p368171410366">object</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="9.47%" headers="mcps1.3.4.3.2.5.1.2 "><p id="dli_02_0041__p26817149363">No</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="12.989999999999998%" headers="mcps1.3.4.3.2.5.1.3 "><p id="dli_02_0041__p14681171413368">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="65.9%" headers="mcps1.3.4.3.2.5.1.4 "><p id="dli_02_0041__p268181443618">Objects on which a user has permission.</p>
|
|
<ul id="dli_02_0041__ul26811114153611"><li id="dli_02_0041__li18681214153617">If the object is in the format of <strong id="dli_02_0041__b84235270614324">databases.<em id="dli_02_0041__i842352697143217">Database name</em>.tables.<em id="dli_02_0041__i842352697143223">Table name</em></strong>, the user has permission on the database.</li><li id="dli_02_0041__li8682161493617">If the object is in the format of <strong id="dli_02_0041__b842352706143251">databases.<em id="dli_02_0041__i842352697143257">Database name</em>.tables.<em id="dli_02_0041__i84235269714334">Table name</em>columns.<em id="dli_02_0041__i842352697143310">Column name</em></strong>, the user has permission on the table.</li></ul>
|
|
</td>
|
|
</tr>
|
|
<tr id="dli_02_0041__row7682171418365"><td class="cellrowborder" valign="top" width="11.64%" headers="mcps1.3.4.3.2.5.1.1 "><p id="dli_02_0041__p1568218145363">privileges</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="9.47%" headers="mcps1.3.4.3.2.5.1.2 "><p id="dli_02_0041__p1068212142365">No</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="12.989999999999998%" headers="mcps1.3.4.3.2.5.1.3 "><p id="dli_02_0041__p1068231493612">Array<String></p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="65.9%" headers="mcps1.3.4.3.2.5.1.4 "><p id="dli_02_0041__p13682314163612">Permission of the user on the object.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="dli_02_0041__row9682181415363"><td class="cellrowborder" valign="top" width="11.64%" headers="mcps1.3.4.3.2.5.1.1 "><p id="dli_02_0041__p11682614183616">user_name</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="9.47%" headers="mcps1.3.4.3.2.5.1.2 "><p id="dli_02_0041__p4682171483612">No</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="12.989999999999998%" headers="mcps1.3.4.3.2.5.1.3 "><p id="dli_02_0041__p5682814103618">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="65.9%" headers="mcps1.3.4.3.2.5.1.4 "><p id="dli_02_0041__p5682161413365">Name of the user who has the permission.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
<div class="section" id="dli_02_0041__section15772143623410"><h4 class="sectiontitle">Example Request</h4><p id="dli_02_0041__p534664283414">None</p>
|
|
</div>
|
|
<div class="section" id="dli_02_0041__section4788096615388"><h4 class="sectiontitle">Example Response</h4><pre class="screen" id="dli_02_0041__screen64237678153831">{
|
|
"is_success": true,
|
|
"message": "",
|
|
"privileges": [
|
|
{
|
|
"is_admin": false,
|
|
"object": "databases.dsstest.tables.csv_par_table",
|
|
"privileges": [
|
|
"SELECT"
|
|
],
|
|
"user_name": "tent2"
|
|
},
|
|
{
|
|
"is_admin": true,
|
|
"object": "databases.dsstest.tables.csv_par_table",
|
|
"privileges": [
|
|
"ALL"
|
|
],
|
|
"user_name": "tent4"
|
|
}
|
|
]
|
|
}</pre>
|
|
<div class="note" id="dli_02_0041__note21113357171028"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><p id="dli_02_0041__p36999182171028">If an error occurs when this API is invoked, the system does not return the result similar to the preceding example, but returns the error code and error information. For details, see <a href="dli_02_0056.html">Error Code</a>.</p>
|
|
</div></div>
|
|
</div>
|
|
</div>
|
|
<div>
|
|
<div class="familylinks">
|
|
<div class="parentlink"><strong>Parent topic:</strong> <a href="dli_02_0036.html">Permission-related APIs</a></div>
|
|
</div>
|
|
</div>
|
|
|