View data privilege operation

View the processing progress and per-resource results for a data-privilege change. A successful request only reads the current state; it does not mean the grant is complete.

GET https://moi.matrixorigin.cn/newmoi/workspaces/{workspace_id}/iam/roles/{role_id}/data-privilege-operations/{request_id}

Preparation before calling

First select a role. Then keep the change identifier returned by applying data privileges or by a repair operation.

Prepare a personal access token with the required permissions for the target workspace and the target workspace ID.

Select the change to track

Use the identifier returned by applying data privileges or a repair operation to view the current result of that same grant change.

Request parameters

curl -X GET "https://moi.matrixorigin.cn/newmoi/workspaces/$WORKSPACE_ID/iam/roles/$ROLE_ID/data-privilege-operations/$REQUEST_ID" \
  -H "X-API-Key: $AI_STUDIO_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.

request_id

string

Yes

Original request ID submitted when applying data privileges.

Successful response

Returns the operation state and per-resource results for the original request. Keep viewing when the state is applying; the operation is complete at succeeded. For failed, drifted, or unknown, review the resource results and decide whether to repair it.

{"code":"OK","msg":"OK","data":{"request_id":"req-001","trace_id":"trace-001","operation_id":"operation-001","audit_event_id":"audit-001","state":"succeeded","data_privilege_version":2,"idempotent_replay":false,"session_invalidation_status":"new_connections_only","matrixone_fact_version":"fact-v2","resource_results":[]}}

Field

Type

Description

code

string

OK on success.

msg

string

OK on success.

data.request_id

string

Original data-privilege request ID.

data.operation_id

string

Server-generated operation ID.

data.audit_event_id

string

Audit event ID.

data.state

string

Operation state: applying, succeeded, failed, drifted, or unknown.

data.data_privilege_version

integer

Current data-privilege version.

data.session_invalidation_status

string

Session privilege refresh status.

data.matrixone_fact_version

string

MatrixOne privilege fact version.

data.resource_results

object array

Privilege execution result for each resource.

data.trace_id

string

Trace ID.

Error response

{"code":"ErrParamInvalid","msg":"Invalid request parameters","data":null}

Field

Type

Description

code

string

Error code.

msg

string

Error message.

data

null

Next steps

Determine whether repair is applicable

Only repair a data privilege operation when its result shows that repair is needed or cannot be confirmed. Continue viewing while processing has not ended; a succeeded or clearly failed change is not eligible for repair.

Last updated on