Repair data privilege operation

Reprocess a data-privilege change that needs repair or has an unconfirmed result. Repair creates a new change operation; continue tracking its new result.

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

Preparation before calling

First select a role, then view the data privilege operation and confirm it can be repaired. Prepare a personal access token with required workspace permissions and the target workspace ID.

Request parameters

curl -X POST "https://moi.matrixorigin.cn/newmoi/workspaces/$WORKSPACE_ID/iam/roles/$ROLE_ID/data-privilege-operations/$REQUEST_ID:repair" -H "X-API-Key: $AI_STUDIO_API_KEY" -H "X-Workspace-ID: $WORKSPACE_ID" -H "Content-Type: application/json" -d '{"request_id":"req-001","expected_data_privilege_version":1}'

Path parameters

Parameter

Type

Required

Description

workspace_id

string

Yes

Target workspace ID.

role_id

string

Yes

Target role ID.

request_id

string

Yes

Original data-privilege request ID to repair.

Request body

Parameter

Type

Required

Description

request_id

string

Yes

New caller-generated idempotency request ID for this repair.

expected_data_privilege_version

integer

Yes

Expected data-privilege version; cannot be less than 0.

Successful response

Returns the repair operation state. When its state is applying, view the new operation with this repair request’s request_id, not the original request ID in the path.

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

Field

Type

Description

code

string

OK on success.

msg

string

OK on success.

data.request_id

string

Repair request ID used to view the repair operation.

data.operation_id

string

Server-generated repair operation ID.

data.audit_event_id

string

Repair audit event ID.

data.state

string

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

data.data_privilege_version

integer

Data-privilege version after repair.

data.idempotent_replay

boolean

Whether this is an idempotent replay of the repair request.

data.session_invalidation_status

string

Session privilege refresh status.

data.matrixone_fact_version

string

MatrixOne privilege fact version.

data.resource_results

object array

Repair 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

Last updated on