Querying a User's Permissions on a Table
Function
This API is used to query the permissions of a user on a table.
Calling Method
For details, see Calling APIs.
URI
POST /v1/{project_id}/security/permission-application/user-table-permissions
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
project_id |
Yes |
String |
Project ID. For details about how to obtain the project ID, see Project ID and Account ID. |
Request Parameters
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
instance |
No |
String |
DataArts Studio instance ID |
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
table_list |
No |
Array of table_list objects |
Table to be queried |
|
proposer |
Yes |
proposer object |
Users to be queried |
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
datasource_type |
Yes |
String |
Data source type. This parameter is mandatory. The value can be HIVE, DLI, or DWS. |
|
cluster_id |
No |
String |
Data source cluster ID. This parameter is mandatory for MRS and GaussDB(DWS) data sources. This parameter is optional for the DLI data source. |
|
database_name |
Yes |
String |
Database name. This parameter is mandatory. |
|
schema_name |
No |
String |
Schema name of the DWS data source. This parameter is optional for the MRS and DLI data sources and is mandatory for the DWS data source. |
|
table_name |
Yes |
String |
Table name. This parameter is mandatory. |
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
id |
Yes |
String |
ID of the user or user group, which can be obtained from an IAM API. This parameter is mandatory. |
|
name |
No |
String |
Name of the user or user group, which can be obtained from an IAM API. This parameter is optional. |
|
type |
Yes |
Integer |
Type. This parameter is mandatory. Value 0 indicates a user. |
Response Parameters
Status code: 200
|
Parameter |
Type |
Description |
|---|---|---|
|
table_list |
Array of table_list objects |
Table to be queried |
|
proposer |
proposer object |
Users to be queried |
|
Parameter |
Type |
Description |
|---|---|---|
|
datasource_type |
String |
Data source type. This parameter is mandatory. The value can be HIVE, DLI, or DWS. |
|
cluster_id |
String |
Data source cluster ID. This parameter is mandatory for MRS and GaussDB(DWS) data sources. This parameter is optional for the DLI data source. |
|
database_name |
String |
Database name. This parameter is mandatory. |
|
schema_name |
String |
Schema name of the DWS data source. This parameter is optional for the MRS and DLI data sources and is mandatory for the DWS data source. |
|
table_name |
String |
Table name. This parameter is mandatory. |
|
Parameter |
Type |
Description |
|---|---|---|
|
id |
String |
ID of the user or user group, which can be obtained from an IAM API. This parameter is mandatory. |
|
name |
String |
Name of the user or user group, which can be obtained from an IAM API. This parameter is optional. |
|
type |
Integer |
Type. This parameter is mandatory. Value 0 indicates a user. |
Example Requests
None
Example Responses
Status code: 200
ok
{
"proposer" : {
"id" : "c0d7abd912d840f0bd3e03eba249a0fc",
"name" : "lyh",
"type" : 0
},
"table_list" : [ {
"cluster_id" : "ddba4908-0316-4676-af32-313e9f25f322",
"database_name" : "dls",
"datasource_type" : "HIVE",
"schema_name" : null,
"table_name" : "dls_hive_samples_101"
} ]
}
Status Codes
|
Status Code |
Description |
|---|---|
|
200 |
ok |
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.