This API is used to view the permissions granted to a user.
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.
|
offset |
No |
Integer |
Specifies the offset of the page-based query. |
limit |
No |
Integer |
Number of records to be displayed of the page-based query. |
The following is an example of the URL containing the query parameter:
GET /v1.0/{project_id}/authorization/privileges?object={object}
None
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 |
Yes |
String |
Object name. |
object_type |
Yes |
String |
Object type. |
privileges |
No |
Array of Object |
Permission information. For details, see Table 4. |
count |
No |
Integer |
Total number of permissions. |
None
{ "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" ] } ] }
Table 5 describes the status code.
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.
Error Code |
Error Message |
---|---|
DLI.0001 |
user input validation failed, object_type sql or saprk is not supported now |