This API is used to query users who have permission to access the specified table or column in the table.
GET /v1.0/{project_id}/databases/{database_name}/tables/{table_name}/users
Parameter |
Mandatory |
Description |
---|---|---|
project_id |
Yes |
Project ID, which is used for resource isolation. For details about how to obtain its value, see Obtaining a Project ID. |
database_name |
Yes |
Name of the database where the table to be queried resides. |
table_name |
Yes |
Name of a table that is to be queried. |
None
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
is_success |
No |
Boolean |
Whether the request is successfully executed. Value true indicates that the request is successfully executed. |
message |
No |
String |
System prompt. If execution succeeds, the parameter setting may be left blank. |
privileges |
No |
Array <Objects> |
Permission information. For details, see Table 3. |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
is_admin |
No |
Boolean |
Whether the table user is an administrator. |
object |
No |
String |
Objects on which a user has permission.
|
privileges |
No |
Array<String> |
Permission of the user on the object. |
user_name |
No |
String |
Name of the user who has the permission. |
None
{ "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" } ] }
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 Error Code.