Updated on 2025-11-17 GMT+08:00

Querying Data Operations

Function

Query data operation information.

Calling Method

For details, see Calling APIs.

URI

GET /v1/{project_id}/security/permission-sets/datasource/actions

Table 1 Path Parameters

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.

Table 2 Query Parameters

Parameter

Mandatory

Type

Description

parent_permission_set_id

Yes

String

Parent permission set ID. For details about how to obtain the value, see Querying Information About a Single Data Connection.

Notes:

  • If this parameter is set to 0, all database tables can be queried.

  • If the value is the ID of the parent privilege set, the query is based on the privilege in the parent privilege set.

cluster_id

Yes

String

Cluster ID. For details about how to obtain it, see Querying Information About a Data Connection.

  • This parameter is mandatory for Hive and GaussDB(DWS) and not required for DLI.

datasource_type

Yes

String

Data source type:

  • Hive data source

  • DWS Data Source

  • DLI Data Source

database_name

No

String

Database Name

Note: When this parameter is used as a query keyword, it cannot coexist with url. You need to specify either of them for query.

schema_name

No

String

Indicates a schema name.

table_name

No

String

Name of a data table.

column_name

No

String

Data field name.

url

No

String

URL.

Note: This parameter cannot be used together with **database_name**.

Request Parameters

Table 3 Request header 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.

Response Parameters

Status code: 200

Table 4 Response body parameters

Parameter

Type

Description

permission_actions

Array of strings

Permission operation list.

Status code: 400

Table 5 Response body parameters

Parameter

Type

Description

error_code

String

Error code.

error_msg

String

Error message.

Example Requests

/v1/0833a5737480d53b2f25c010dc1a7b88/security/permission-sets/datasource/actions?parent_permission_set_id=0&cluster_id=dc425074-26b3-479c-9e2f-b103c0cdd90f&datasource_type=HIVE&database_name=bigdatatest

{
  "parent_permission_set_id" : "0",
  "cluster_id" : "dc425074-26b3-479c-9e2f-b103c0cdd90f",
  "datasource_type" : "HIVE",
  "database_name" : "bigdatatest"
}

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