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 |
|---|---|---|---|
|
string |
Yes |
Target workspace ID. |
|
string |
Yes |
Target role 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 |
|---|---|---|
|
string |
|
|
string |
|
|
string |
Original data-privilege request ID. |
|
string |
Server-generated operation ID. |
|
string |
Audit event ID. |
|
string |
Operation state: |
|
integer |
Current data-privilege version. |
|
string |
Session privilege refresh status. |
|
string |
MatrixOne privilege fact version. |
|
object array |
Privilege execution result for each resource. |
|
string |
Trace ID. |
Error response¶
{"code":"ErrParamInvalid","msg":"Invalid request parameters","data":null}
Field |
Type |
Description |
|---|---|---|
|
string |
Error code. |
|
string |
Error message. |
|
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.