Querying Table Users
Function
This API is used to query users who have permission to access the specified table or column in the table.
URI
- URI format
GET /v1.0/{project_id}/databases/{database_name}/tables/{table_name}/users
- Parameter description
Table 1 URI parameters 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.
Request
None
Response
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. |
Example Request
None
Example Response
{ "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.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot