View data privileges

View the current data access permissions, permission sources, and editable status of the specified role. When table_id is passed in, the column and row-level permission details of the table are returned. If not passed, return to the role permissions overview.

HTTP
GET $CLOUDSIGMA_API_BASE/workspaces/{workspace_id}/iam/roles/{role_id}/data-privileges

Before you call

Configure the CloudSigma regional endpoint and authentication before calling. The endpoint, credentials, workspace, and resource IDs must belong to the same region. First select the character.

Prepare personal access token and target workspace ID that can access the target workspace.

Request parameters

Replace $WORKSPACE_ID, $ROLE_ID, $CLOUDSIGMA_API_KEY in the example with actual values.

Shell
curl -X GET "$CLOUDSIGMA_API_BASE/workspaces/$WORKSPACE_ID/iam/roles/$ROLE_ID/data-privileges" \
  -H "X-API-Key: $CLOUDSIGMA_API_KEY" \
  -H "X-Workspace-ID: $WORKSPACE_ID"

Parameter

Type

Required

Description

workspace_id

string

Yes

Target workspace ID.

role_id

string

Yes

Target role ID.

Query parameters

Parameter

Type

Required

Description

table_id

string

No

Catalog table ID to view details of. Returns column and row level permission details for the table when passed in. If not passed, return to the role permissions overview.

Successful response

JSON
{
  "code": "OK",
  "msg": "OK",
  "data": {
    "target_role_id": "role-001",
    "data_privilege_version": 2,
    "matrixone_fact_version": "fact-v2",
    "items": [],
    "request_id": "req-001",
    "trace_id": "trace-001"
  }
}

Field

Type

Description

data.target_role_id

string

The role ID being viewed.

data.data_privilege_version

integer

The current data permission version, submitted as the expected version when updating.

data.matrixone_fact_version

string

OmniFabric permissions fact version.

data.items

array of object

The data permission items of the role.

data.items[].resource_type

string

Resource type. Value: database, table.

data.items[].resource_id

string

Resource ID.

data.items[].display_name

string

Display name.

data.items[].action_id

string

Permission actions.

data.items[].privilege

string

MatrixOne permissions. Values: create_table, select, insert, update, delete.

data.items[].with_grant_option

boolean

Omit this field or send false. true is currently rejected.

data.items[].source

string

Source. Value: matrixone, moi_operation.

data.items[].drift_status

string

Permission drift status. Values: in_sync, changed, unknown, rule_without_select, resource_unresolved, missing_in_mo, mo_fact_only, unmanaged_rule, capability_disabled, apply_failed, not_attempted.

data.items[].ui_config_snapshot

object or null

Row and column configuration snapshot.

data.items[].ui_config_snapshot.black_column_list

array of string

A set of prohibited columns.

data.items[].ui_config_snapshot.rule_list

array of object

Row filtering rules.

data.items[].ui_config_snapshot.rule_list[].column

string

Column name.

data.items[].ui_config_snapshot.rule_list[].relation

string

Conditional connection relationship. Value: and, or.

data.items[].ui_config_snapshot.rule_list[].expression_list

array of object

SQL expression rules.

data.items[].ui_config_snapshot.rule_list[].expression_list[].operator

string

Comparison operators. Values: =, !=, >, >=, <, <=, like, regexp_like, in, not in, expression.

data.items[].ui_config_snapshot.rule_list[].expression_list[].expression

array of string or null

List of conditional values.

data.items[].ui_config_snapshot.rule_list[].expression_list[].match_type

string

Value matching type. Values: empty string, c, i, m, n, u.

data.items[].columns

array of object

Column definition.

data.items[].columns[].name

string

Name.

data.items[].columns[].type

string

type.

data.items[].table_schema_version

string

Table structure version.

data.items[].subject_attribute_version

string

Principal attribute version.

data.items[].rule_fingerprint

string

Rule fingerprint.

data.items[].editable

boolean

Whether it is editable.

data.items[].disabled_reason

string

Reason for deactivation. Values: empty string, RULE_WITHOUT_SELECT_PRIVILEGE, RESOURCE_UNRESOLVED, MISSING_IN_MATRIXONE, DESIRED_SNAPSHOT_INVALID, MATRIXONE_FACT_CHANGED, ROW_COLUMN_RULE_CHANGED, ROW_COLUMN_RULE_SNAPSHOT_UNAVAILABLE, ROW_COLUMN_RULE_UNMANAGED, TABLE_SCHEMA_UNAVAILABLE.

data.request_id

string

Request association ID.

data.trace_id

string

Link tracking ID.

Confirm current data permissions

Before verifying or performing data permission changes, confirm the role’s current data access permissions. Prepare for changes according to the authorization status returned on this page.

Error response

JSON
{
  "code": "ErrParamInvalid",
  "msg": "请求参数无效",
  "data": null
}

Field

Type

Description

code

string

error code.

msg

string

error message.

data

null

—。

Last updated on