Querying the Configurable Operation Permission of a Role on a Group of Databases and Tables
Function
This API is used to query the configurable operation rights of a role on a group of databases and tables.
Calling Method
For details, see Calling APIs.
URI
POST /v1/{project_id}/security/permission-sets/datasource/role/batch-actions
|
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 |
|---|---|---|---|
|
workspace |
Yes |
String |
Workspace ID. For details about how to obtain the workspace ID, see Instance ID and Workspace ID. |
|
X-Auth-Token |
Yes |
String |
IAM token, which is obtained by calling the IAM API for obtaining a user token (value of X-Subject-Token in the response header). This parameter is mandatory for token authentication. |
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
parent_permission_set_id |
Yes |
String |
Parent permission set ID. |
|
cluster_id |
Yes |
String |
Cluster ID. |
|
datasource_type |
Yes |
String |
Data source type, which is Hive |
|
database_names |
Yes |
Array of strings |
Currently, batch authorization supports only multi-table authorization in a single database or multi-database authorization in the same cluster. You can determine whether the two types of authorization are supported by checking whether tables in the input parameter is empty. |
|
schemas |
No |
Array of strings |
The dws permission involves schemas. This field is reserved. When performing DWS batch authorization, ensure that the batch authorization is performed in a single schema or in a single database. |
|
table_names |
No |
Array of strings |
List of data tables. |
|
column_names |
No |
Array of strings |
Data field list. |
Response Parameters
Status code: 200
|
Parameter |
Type |
Description |
|---|---|---|
|
permission_actions |
Array of strings |
Permission operation list. |
Status code: 400
|
Parameter |
Type |
Description |
|---|---|---|
|
error_code |
String |
Error code. |
|
error_msg |
String |
Error message. |
Example Requests
/v1/0833a5737480d53b2f25c010dc1a7b88/security/permission-sets/datasource/role/batch-actions
{
"parent_permission_set_id" : "24dd53c92ddbb12fe762f9d9d42a031a",
"cluster_id" : "dc425074-26b3-479c-9e2f-b103c0cdd90f",
"datasource_type" : "HIVE",
"database_names" : [ "default" ],
"table_names" : [ "auto_test_qwaw" ],
"column_names" : [ ]
}
Example Responses
Status code: 200
OK
{
"permission_actions" : [ "ALL", "SELECT", "UPDATE", "CREATE", "DROP", "ALTER", "INDEX", "READ", "WRITE" ]
}
Status Codes
|
Status Code |
Description |
|---|---|
|
200 |
OK |
|
400 |
Bad Request |
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.