Checking the Permissions Granted to a User
Function
This API is used to check the permissions granted to a user.
- Parameter descriptions:
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
project_id |
Yes |
String |
Project ID, which is used for resource isolation. For details about how to obtain its value, see Obtaining a Project ID. |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
object |
Yes |
String |
Data object to be assigned, which corresponds to the object in API permission assignment.
|
The following is an example of the URL containing the query parameter:
GET /v1.0/{project_id}/authorization/privileges?object={object}
Request
None
Response
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
is_success |
Yes |
Boolean |
Whether the request is successfully executed. Value true indicates that the request is successfully executed. |
message |
Yes |
String |
Indicates the system prompt. If execution succeeds, this parameter may be left blank. |
object_name |
No |
String |
Object name. |
object_type |
No |
String |
Object type. |
privileges |
No |
Array of Object |
Permission information. For details, see Table 4. |
count |
No |
Integer |
Total number of permissions. |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
object |
No |
String |
Data object whose permissions are to be granted, which corresponds to the object in the permission assignment API. |
is_admin |
No |
Boolean |
Whether the database user is an administrator. |
user_name |
No |
String |
Name of the user who has permission on the current database. |
privileges |
No |
Array of Strings |
Permission of the user on the database. |
Example Request
None
Example Response
{ "is_success": true, "message": "", "object_name": "9561", "object_type": "flink", "count": 2, "privileges": [ { "user_name": "testuser1", "is_admin": true, "privileges": [ "ALL" ] }, { "user_name": "user1", "is_admin": false, "privileges": [ "GET" ] } ] }
Status Codes
Table 5 describes the status code.
Error Codes
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 Codes.
Error Code |
Error Message |
---|---|
DLI.0001 |
user input validation failed, object_type sql or saprk is not supported now |
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